public static QPixmap IMono = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/mono.png");
public static QPixmap IName = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/red.gif");
public static QPixmap IClass = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/class.gif");
- public static QPixmap IStructure = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/structure.gif");
- public static QPixmap IInterface = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/interface.gif");
public static QPixmap IDelegate = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/delegate.gif");
public static QPixmap IEnum = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/enum.gif");
+ public static QPixmap IInterface = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/interface.gif");
+ public static QPixmap IStructure = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/structure.gif");
public static QPixmap IMethod = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/method.gif");
+ public static QPixmap IEvent = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/event.gif");
public static QPixmap IField = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/field.gif");
+ public static QPixmap IOperator = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/operator.gif");
public static QPixmap IProperty = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/property.gif");
- public static QPixmap IEvent = new QPixmap (QDir.HomeDirPath ()+"/.monodoc/images/event.gif");
public static string Summary = "<summary> Provide a brief (usually one sentence) description of a member or type.";
public static string Remarks = "<remarks> Provide verbose information for a type or member.";
public ListItem (QListViewItem parent, string text, DocMember member) : base (parent, text)
{
this.member = member;
- if (member.IsCtor || member.IsMethod || member.IsDtor)
+ if (member.IsConstructor || member.IsMethod)
SetPixmap (0, Global.IMethod);
+ else if (member.IsEvent)
+ SetPixmap (0, Global.IEvent);
else if (member.IsField)
SetPixmap (0, Global.IField);
+ else if (member.IsOperator)
+ SetPixmap (0, Global.IOperator);
else if (member.IsProperty)
SetPixmap (0, Global.IProperty);
- else if (member.IsEvent)
- SetPixmap (0, Global.IEvent);
}
this.type = type;
if (type.IsClass)
SetPixmap (0, Global.IClass);
- else if (type.IsStructure)
- SetPixmap (0, Global.IStructure);
- else if (type.IsInterface)
- SetPixmap (0, Global.IInterface);
else if (type.IsDelegate)
SetPixmap (0, Global.IDelegate);
else if (type.IsEnum)
SetPixmap (0, Global.IEnum);
+ else if (type.IsInterface)
+ SetPixmap (0, Global.IInterface);
+ else if (type.IsStructure)
+ SetPixmap (0, Global.IStructure);
}
public IEditForm BuildEditForm ()
return EditForm;
}
}
-}
\ No newline at end of file
+}
type.Language = "en";
progress.SetProgress (i++);
ListItem typeitem = new ListItem (GetNamespaceItem (type.Namespace), type.Name, type);
- ProcessMember (type.Dtors, typeitem);
- ProcessMember (type.Events, typeitem);
- ProcessMember (type.Fields, typeitem);
ProcessMember (type.Properties, typeitem);
+ ProcessMember (type.Operators, typeitem);
ProcessMember (type.Methods, typeitem);
- ProcessMember (type.Ctors, typeitem);
+ ProcessMember (type.Fields, typeitem);
+ ProcessMember (type.Events, typeitem);
+ ProcessMember (type.Constructors, typeitem);
}
SetUpdatesEnabled (true);
Repaint ();
return _namespace;
}
}
-}
\ No newline at end of file
+}
{
this.document = document;
new QLabel (Global.Remarks, this);
- edit = new QTextEdit (this);
+ edit = new Edit (this);
Connect (parent, SIGNAL ("Sync ()"), this, SLOT ("OnSync ()"));
Connect (parent, SIGNAL ("Flush ()"), this, SLOT ("OnFlush ()"));
}
{
document.Remarks = edit.Text ();
}
+
+ private class Edit : QTextEdit {
+
+ TagContext context;
+
+ public Edit (QWidget parent) : base (parent)
+ {
+ mousePressEvent += new MousePressEvent (pressEvent);
+ context = new TagContext (this);
+ }
+
+ public void pressEvent (QMouseEvent e)
+ {
+ if (e.Button () == ButtonState.RightButton)
+ context.Popup (e.GlobalPos ());
+ }
+ }
}
-}
\ No newline at end of file
+}
--- /dev/null
+// doceditbar.cs - Qt# Mono Documentation Tool
+//
+// Author: Adam Treat <manyoso@yahoo.com>
+// (c) 2002 Adam Treat
+// Licensed under the terms of the GNU GPL
+
+namespace Mono.Document.Editor {
+
+ using Qt;
+ using System;
+
+ public class TagContext : QPopupMenu {
+
+ QTextEdit edit;
+
+ public TagContext (QTextEdit edit) : base (edit)
+ {
+ this.edit = edit;
+ InsertItem ("<see>", this, SLOT ("OnSee ()"));
+ InsertItem ("<code>", this, SLOT ("OnCode ()"));
+ InsertItem ("<data>", this, SLOT ("OnData ()"));
+ InsertItem ("<list>", this, SLOT ("OnList ()"));
+ InsertItem ("<example>", this, SLOT ("OnExample ()"));
+ InsertItem ("<exception>", this, SLOT ("OnException ()"));
+ }
+
+ public void OnSee ()
+ {
+ edit.Insert ("<see></see>");
+ BackUp ("</see>");
+ }
+
+ public void OnCode ()
+ {
+ edit.Insert ("<code></code>");
+ BackUp ("</code>");
+ }
+
+ public void OnData ()
+ {
+ edit.Insert ("<data></data>");
+ BackUp ("</data>");
+ }
+
+ public void OnList ()
+ {
+ edit.Insert ("<list></list>");
+ BackUp ("</list>");
+ }
+
+ public void OnExample ()
+ {
+ edit.Insert ("<example></example>");
+ BackUp ("</example>");
+ }
+
+ public void OnException ()
+ {
+ edit.Insert ("<exception></exception>");
+ BackUp ("</exception>");
+ }
+
+ public void BackUp (string back)
+ {
+ foreach (char c in back)
+ edit.MoveCursor (QTextEdit.CursorAction.MoveBackward, false);
+ }
+ }
+}