Permalink
Browse files

2008-04-03 Mike Kestner <mkestner@novell.com>

	* initial checkin.  DocTree widget is feature-complete for
	on-disk catalog navigation.  Layout and Painting in DocView with
	limited Mouse event forwarding to the item hierarchy.  Items include
	a generic LabelItem, HeadingItem, and LinkItem. A BannerItem with 
	heading and links to parent docs. A MarkupItem which handles raw text
	and simple markup like see/paramref/typeparamref. KitchenSinkItem
	which will eventually handle the tangled mess of nested para/code/SPAN
	and so on elements.  And SummaryTableItem which handles the
	Name/Summary tables seen on Namespace, Type, Members, and Ctor/Method
	pages.  Node pages implemented so far are the toplevel Catalog node
	and the Namespace node. 

svn path=/trunk/monodoc-widgets/; revision=99789
  • Loading branch information...
0 parents commit 732f066da11567c2617b735580b23fca8b6b10be @mkestner mkestner committed Apr 3, 2008
@@ -0,0 +1 @@
+Mike Kestner <mkestner@novell.com>
@@ -0,0 +1,21 @@
+Copyright (c) 2008 Novell, Inc. and the individuals listed
+in the ChangeLog entries.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,14 @@
+2008-04-03 Mike Kestner <mkestner@novell.com>
+
+ * initial checkin. DocTree widget is feature-complete for
+ on-disk catalog navigation. Layout and Painting in DocView with
+ limited Mouse event forwarding to the item hierarchy. Items include
+ a generic LabelItem, HeadingItem, and LinkItem. A BannerItem with
+ heading and links to parent docs. A MarkupItem which handles raw text
+ and simple markup like see/paramref/typeparamref. KitchenSinkItem
+ which will eventually handle the tangled mess of nested para/code/SPAN
+ and so on elements. And SummaryTableItem which handles the
+ Name/Summary tables seen on Namespace, Type, Members, and Ctor/Method
+ pages. Node pages implemented so far are the toplevel Catalog node
+ and the Namespace node.
+
@@ -0,0 +1,5 @@
+SUBDIRS= src sample doc
+
+run:
+ cd sample && make run
+
@@ -0,0 +1 @@
+try cnn.
@@ -0,0 +1,23 @@
+Monodoc.Widgets is a library of Gtk# widgets to display and edit
+monodoc documentation catalogs.
+
+Building:
+--------
+
+The standard autotools process:
+
+ ./configure
+ make
+ make install
+
+Subversion users substitute autogen.sh for configure and must have
+automake and autoconf installed.
+
+Hacking:
+--------
+
+Anyone wishing to help with the effort should state their intentions on
+mono-docs-list prior to starting. Development is very brisk ATM, and
+code duplication makes the maintainer cranky, especially when there is
+so much work to be done.
+
@@ -0,0 +1,4 @@
+aclocal
+automake -a
+autoconf
+./configure --enable-maintainer-mode $*
@@ -0,0 +1,56 @@
+AC_INIT([monodoc-widgets], [0.1])
+AC_CONFIG_SRCDIR([README])
+AM_INIT_AUTOMAKE([tar-ustar])
+AM_MAINTAINER_MODE
+
+AC_PROG_INSTALL
+
+ASSEMBLY_VERSION="0.0.0.0"
+AC_SUBST(ASSEMBLY_VERSION)
+
+AC_PATH_PROG(GMCS, gmcs, no)
+CS="C#"
+if test "x$GMCS" = "xno" ; then
+ dnl AC_MSG_ERROR([You need to install a C# compiler])
+ AC_MSG_ERROR([No $CS compiler found])
+fi
+AC_SUBST(GMCS)
+
+AC_PATH_PROG(RUNTIME, mono, no)
+if test "x$RUNTIME" = "xno" ; then
+ AC_MSG_ERROR([No runtime found])
+fi
+AC_SUBST(RUNTIME)
+
+AC_PATH_PROG(RESGEN, resgen, no)
+if test "x$RESGEN" = "xno" ; then
+ AC_MSG_ERROR([resgen not found in $PATH])
+fi
+AC_SUBST(RESGEN)
+
+PKG_CHECK_MODULES(MONODOC, monodoc)
+AC_SUBST(MONODOC_LIBS)
+
+AC_PATH_PROG(MONODOCER, monodocer, no)
+AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
+AC_SUBST(MONODOCER)
+AC_SUBST(MDASSEMBLER)
+
+GTK_SHARP_REQUIRED_VERSION="2.12.0"
+PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= $GTK_SHARP_REQUIRED_VERSION)
+AC_SUBST(GTK_SHARP_LIBS)
+
+AC_OUTPUT([
+Makefile
+doc/Makefile
+src/Makefile
+src/AssemblyInfo.cs
+sample/Makefile
+])
+
+echo "---"
+echo "Configuration summary"
+echo ""
+echo " * Installation prefix = $prefix"
+echo " * C# compiler = $GMCS"
+echo ""
@@ -0,0 +1,25 @@
+ASSEMBLY = $(top_builddir)/src/Monodoc.Widgets.dll
+
+monodocdir = $(prefix)/lib/monodoc/sources
+noinst_DATA = monodoc-widgets-docs.zip monodoc-widgets-docs.tree monodoc-widgets-docs.source
+
+update:
+ $(MONODOCER) -path:en -pretty --delete -assembly:$(ASSEMBLY)
+
+monodoc-widgets-docs.zip monodoc-widgets-docs.tree: $(srcdir)/en/*/*.xml $(srcdir)/en/*.xml
+ $(MDASSEMBLER) --ecma $(srcdir)/en -o monodoc-widgets-docs
+
+CLEANFILES = monodoc-widgets-docs.zip monodoc-widgets-docs.tree
+
+EXTRA_DIST = monodoc-widgets-docs.source
+
+NAMESPACES = Monodoc.Widgets
+
+dist-hook:
+ mkdir -p $(distdir)/en
+ cp $(srcdir)/en/*.xml $(distdir)/en/
+ for i in $(NAMESPACES); do \
+ mkdir -p $(distdir)/en/$$i; \
+ cp $(srcdir)/en/$$i/*.xml $(distdir)/en/$$i; \
+ done
+
@@ -0,0 +1,32 @@
+<Type Name="DocTree" FullName="Monodoc.Widgets.DocTree">
+ <TypeSignature Language="C#" Value="public class DocTree : Gtk.TreeView" />
+ <AssemblyInfo>
+ <AssemblyName>Monodoc.Widgets</AssemblyName>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>Gtk.TreeView</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public DocTree (string catalog_dir);" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters>
+ <Parameter Name="catalog_dir" Type="System.String" />
+ </Parameters>
+ <Docs>
+ <param name="catalog_dir">To be added.</param>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>
@@ -0,0 +1,32 @@
+<Type Name="DocView" FullName="Monodoc.Widgets.DocView">
+ <TypeSignature Language="C#" Value="public class DocView : Gtk.DrawingArea" />
+ <AssemblyInfo>
+ <AssemblyName>Monodoc.Widgets</AssemblyName>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>Gtk.DrawingArea</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public DocView (Monodoc.Widgets.DocTree tree);" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters>
+ <Parameter Name="tree" Type="Monodoc.Widgets.DocTree" />
+ </Parameters>
+ <Docs>
+ <param name="tree">To be added.</param>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>
@@ -0,0 +1,32 @@
+<Overview>
+ <Assemblies>
+ <Assembly Name="Monodoc.Widgets" Version="0.0.0.0">
+ <Attributes>
+ <Attribute>
+ <AttributeName>System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)</AttributeName>
+ </Attribute>
+ <Attribute>
+ <AttributeName>System.Reflection.AssemblyCompany("Novell, Inc.")</AttributeName>
+ </Attribute>
+ <Attribute>
+ <AttributeName>System.Reflection.AssemblyCopyright("Copyright (c) 2008 Novell, Inc.")</AttributeName>
+ </Attribute>
+ <Attribute>
+ <AttributeName>System.Reflection.AssemblyDescription("A widget library for editing and viewing documentation.")</AttributeName>
+ </Attribute>
+ <Attribute>
+ <AttributeName>System.Reflection.AssemblyTitle("Monodoc Widgets")</AttributeName>
+ </Attribute>
+ </Attributes>
+ </Assembly>
+ </Assemblies>
+ <Remarks>To be added.</Remarks>
+ <Copyright>To be added.</Copyright>
+ <Types>
+ <Namespace Name="Monodoc.Widgets">
+ <Type Name="DocTree" Kind="Class" />
+ <Type Name="DocView" Kind="Class" />
+ </Namespace>
+ </Types>
+ <Title>Monodoc.Widgets</Title>
+</Overview>
@@ -0,0 +1,6 @@
+<Namespace Name="Monodoc.Widgets">
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+</Namespace>
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<monodoc>
+ <source provider="ecma" basefile="monodoc-widgets-docs" path="classlib-mono"/>
+</monodoc>
@@ -0,0 +1,74 @@
+// Browser.cs - Monodoc editor application
+//
+// Author: Mike Kestner <mkestner@novell.com>
+//
+// Copyright (c) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without restriction,
+// including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software,
+// and to permit persons to whom the Software is furnished to do so,
+// subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+
+namespace Monodoc.Widgets.Samples {
+
+ using System;
+ using Gdk;
+ using Gtk;
+ using Monodoc.Widgets;
+
+ public class Browser : Gtk.Window {
+
+ public static int Main (string[] args)
+ {
+ if (args.Length != 1) {
+ Console.WriteLine ("Usage: browser <docdir>");
+ return 1;
+ }
+
+ Application.Init ();
+ Gtk.Window win = new Browser (args [0]);
+ win.Show ();
+ Application.Run ();
+ return 0;
+ }
+
+ public Browser (string catalog_dir) : base ("Documentation Browser Sample")
+ {
+ DefaultSize = new Size (600, 400);
+ Gtk.Paned paned = new Gtk.HPaned ();
+ Gtk.ScrolledWindow sw = new ScrolledWindow ();
+ DocTree tree = new DocTree (catalog_dir);
+ sw.Add (tree);
+ paned.Add1 (sw);
+ sw = new ScrolledWindow ();
+ DocView view = new DocView (tree);
+ sw.AddWithViewport (view);
+ paned.Add2 (sw);
+ paned.Position = 250;
+ paned.ShowAll ();
+ Add (paned);
+ }
+
+ protected override bool OnDeleteEvent (Event ev)
+ {
+ Application.Quit ();
+ return true;
+ }
+ }
+}
@@ -0,0 +1,19 @@
+TARGETS = browser.exe
+
+references=$(GTK_SHARP_LIBS) $(MONODOC_LIBS) /r:Monodoc.Widgets.dll
+
+noinst_SCRIPTS = $(TARGETS)
+CLEANFILES = $(TARGETS) Monodoc.Widgets.dll
+
+Monodoc.Widgets.dll: $(top_builddir)/src/Monodoc.Widgets.dll
+ cp $(top_builddir)/src/Monodoc.Widgets.dll .
+
+browser.exe: $(srcdir)/Browser.cs Monodoc.Widgets.dll
+ $(GMCS) /out:browser.exe $(references) $(srcdir)/Browser.cs
+
+run: browser.exe
+ mono browser.exe $(top_srcdir)/doc/en
+
+EXTRA_DIST = \
+ Browser.cs
+
@@ -0,0 +1,9 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("0.0.0.0")]
+[assembly: AssemblyTitle ("Monodoc Widgets")]
+[assembly: AssemblyDescription ("A widget library for editing and viewing documentation.")]
+[assembly: AssemblyCopyright ("Copyright (c) 2008 Novell, Inc.")]
+[assembly: AssemblyCompany ("Novell, Inc.")]
+
@@ -0,0 +1,9 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")]
+[assembly: AssemblyTitle ("Monodoc Widgets")]
+[assembly: AssemblyDescription ("A widget library for editing and viewing documentation.")]
+[assembly: AssemblyCopyright ("Copyright (c) 2008 Novell, Inc.")]
+[assembly: AssemblyCompany ("Novell, Inc.")]
+
Oops, something went wrong.

0 comments on commit 732f066

Please sign in to comment.