本文整理汇总了C#中Gtk.ScrolledWindow类的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ScrolledWindow类的具体用法?C# Gtk.ScrolledWindow怎么用?C# Gtk.ScrolledWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gtk.ScrolledWindow类属于命名空间,在下文中一共展示了Gtk.ScrolledWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget ControlWrappers.BoundTextView
Stetic.BinContainer.Attach(this);
this.Name = "ControlWrappers.BoundTextView";
// Container child ControlWrappers.BoundTextView.Gtk.Container+ContainerChild
this.scrolledwindow1 = new Gtk.ScrolledWindow();
this.scrolledwindow1.CanFocus = true;
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
this.tvBound = new Gtk.TextView();
this.tvBound.CanFocus = true;
this.tvBound.Name = "tvBound";
this.scrolledwindow1.Add(this.tvBound);
this.Add(this.scrolledwindow1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.Hide();
this.tvBound.PasteClipboard += new System.EventHandler(this.PasteClipboardOccurred);
this.tvBound.InsertAtCursor += new Gtk.InsertAtCursorHandler(this.InsertAtCursorOccurred);
this.tvBound.CutClipboard += new System.EventHandler(this.CutClipboardOccurred);
this.tvBound.DeleteFromCursor += new Gtk.DeleteFromCursorHandler(this.DeleteFromCursorOccurred);
this.tvBound.Backspace += new System.EventHandler(this.BackspaceOccurred);
this.tvBound.KeyReleaseEvent += new Gtk.KeyReleaseEventHandler(this.KeyReleaseEventOccurred);
}
示例2: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget HollyLibrary.ComboListWindow
this.Name = "HollyLibrary.ComboListWindow";
this.Title = "ComboListWindow";
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.Decorated = false;
// Container child HollyLibrary.ComboListWindow.Gtk.Container+ContainerChild
this.GtkScrolledWindow = new Gtk.ScrolledWindow();
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.TvList = new HollyLibrary.HSimpleList();
this.TvList.CanFocus = true;
this.TvList.Name = "TvList";
this.TvList.HeadersClickable = true;
this.TvList.SelectedIndex = 0;
this.TvList.ItemHeight = 20;
this.TvList.OwnerDraw = false;
this.TvList.IsEditable = false;
this.TvList.IsDragAndDropEnable = false;
this.TvList.IsCheckBoxList = false;
this.GtkScrolledWindow.Add(this.TvList);
this.Add(this.GtkScrolledWindow);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 264;
this.DefaultHeight = 242;
this.Show();
this.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnButtonPressEvent);
this.TvList.RowActivated += new Gtk.RowActivatedHandler(this.OnTvListRowActivated);
}
示例3: Build
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget OpenVP.GtkGui.BrowsableEditor
Stetic.BinContainer.Attach(this);
this.Name = "OpenVP.GtkGui.BrowsableEditor";
// Container child OpenVP.GtkGui.BrowsableEditor.Gtk.Container+ContainerChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.SheetPane = new Gtk.ScrolledWindow();
this.SheetPane.CanFocus = true;
this.SheetPane.Name = "SheetPane";
this.vbox2.Add(this.SheetPane);
Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.SheetPane]));
w1.Position = 0;
// Container child vbox2.Gtk.Box+BoxChild
this.hbuttonbox2 = new Gtk.HButtonBox();
this.hbuttonbox2.Name = "hbuttonbox2";
this.hbuttonbox2.Homogeneous = true;
this.hbuttonbox2.Spacing = 6;
this.hbuttonbox2.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
// Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
this.RevertButton = new Gtk.Button();
this.RevertButton.Sensitive = false;
this.RevertButton.CanFocus = true;
this.RevertButton.Name = "RevertButton";
this.RevertButton.UseStock = true;
this.RevertButton.UseUnderline = true;
this.RevertButton.Label = "gtk-revert-to-saved";
this.hbuttonbox2.Add(this.RevertButton);
Gtk.ButtonBox.ButtonBoxChild w2 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.RevertButton]));
w2.Expand = false;
w2.Fill = false;
// Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
this.ApplyButton = new Gtk.Button();
this.ApplyButton.Sensitive = false;
this.ApplyButton.CanFocus = true;
this.ApplyButton.Name = "ApplyButton";
this.ApplyButton.UseStock = true;
this.ApplyButton.UseUnderline = true;
this.ApplyButton.Label = "gtk-apply";
this.hbuttonbox2.Add(this.ApplyButton);
Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.ApplyButton]));
w3.Position = 1;
w3.Expand = false;
w3.Fill = false;
this.vbox2.Add(this.hbuttonbox2);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbuttonbox2]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
this.Add(this.vbox2);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.Show();
this.RevertButton.Clicked += new System.EventHandler(this.OnRevertButtonClicked);
this.ApplyButton.Clicked += new System.EventHandler(this.OnApplyButtonClicked);
}
示例4: FileScout
public FileScout()
{
string path = IdeApp.ProjectOperations.ProjectsDefaultPath;
if (Directory.Exists(path))
{
fb.CurrentDir = path;
}
fb.DirectoryChangedEvent += new DirectoryChangedEventHandler (OnDirChanged);
filelister.RowActivated += new Gtk.RowActivatedHandler (FileSelected);
IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpened;
IdeApp.Workspace.LastWorkspaceItemClosed += OnCombineClosed;
Gtk.ScrolledWindow listsw = new Gtk.ScrolledWindow ();
listsw.Add (filelister);
fontChanger = new PadFontChanger (listsw, delegate (Pango.FontDescription desc) {
filelister.SetCustomFont (desc);
fb.SetCustomFont (desc);
}, delegate () {
filelister.ColumnsAutosize ();
fb.ColumnsAutosize ();
});
this.Pack1 (fb, true, true);
this.Pack2 (listsw, true, true);
fb.SelectFirst ();
OnDirChanged (fb.CurrentDir);
this.ShowAll ();
}
示例5: DisassemblyView
public DisassemblyView ()
{
ContentName = GettextCatalog.GetString ("Disassembly");
sw = new Gtk.ScrolledWindow ();
editor = new TextEditor ();
editor.Document.ReadOnly = true;
editor.Options = new CommonTextEditorOptions {
ShowLineNumberMargin = false,
};
sw.Add (editor);
sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.ShowAll ();
sw.Vadjustment.ValueChanged += OnScrollEditor;
sw.VScrollbar.ButtonPressEvent += OnPress;
sw.VScrollbar.ButtonReleaseEvent += OnRelease;
sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask;
sw.ShadowType = Gtk.ShadowType.In;
sw.Sensitive = false;
currentDebugLineMarker = new CurrentDebugLineTextMarker (editor);
DebuggingService.StoppedEvent += OnStop;
}
示例6: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget ocmgtk.HTMLEditorWidget
Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
this.UIManager = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.UIManager.InsertActionGroup(w2, 0);
this.Name = "ocmgtk.HTMLEditorWidget";
// Container child ocmgtk.HTMLEditorWidget.Gtk.Container+ContainerChild
this.vbox3 = new Gtk.VBox();
this.vbox3.Name = "vbox3";
this.vbox3.Spacing = 6;
// Container child vbox3.Gtk.Box+BoxChild
this.editorWindow = new Gtk.ScrolledWindow();
this.editorWindow.CanFocus = true;
this.editorWindow.Name = "editorWindow";
this.editorWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child editorWindow.Gtk.Container+ContainerChild
this.editor = new Gtk.TextView();
this.editor.CanFocus = true;
this.editor.Name = "editor";
this.editor.WrapMode = ((Gtk.WrapMode)(2));
this.editorWindow.Add(this.editor);
this.vbox3.Add(this.editorWindow);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.editorWindow]));
w4.Position = 0;
this.Add(this.vbox3);
if ((this.Child != null)) {
this.Child.ShowAll();
}
w1.SetUiManager(UIManager);
this.Hide();
}
示例7: Build
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget Mono.Upnp.GtkClient.RawXmlInfo
Stetic.BinContainer.Attach(this);
this.Name = "Mono.Upnp.GtkClient.RawXmlInfo";
// Container child Mono.Upnp.GtkClient.RawXmlInfo.Gtk.Container+ContainerChild
this.scrolledwindow1 = new Gtk.ScrolledWindow();
this.scrolledwindow1.CanFocus = true;
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
Gtk.Viewport w1 = new Gtk.Viewport();
w1.ShadowType = ((Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
this.raw = new Gtk.TextView();
this.raw.CanFocus = true;
this.raw.Name = "raw";
this.raw.Editable = false;
this.vbox1.Add(this.raw);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.raw]));
w2.Position = 0;
w1.Add(this.vbox1);
this.scrolledwindow1.Add(w1);
this.Add(this.scrolledwindow1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.Hide();
}
示例8: Build
private void Build()
{
var swScroll = new Gtk.ScrolledWindow();
// Drawing area
this.drawingArea = new Gtk.DrawingArea();
this.drawingArea.ExposeEvent += (o, args) => this.OnExposeDrawingArea();
// Layout
swScroll.AddWithViewport( this.drawingArea );
this.VBox.PackStart( swScroll, true, true, 5 );
this.AddButton( Gtk.Stock.Close, Gtk.ResponseType.Close );
// Polish
this.WindowPosition = Gtk.WindowPosition.CenterOnParent;
this.Resize( 320, 200 );
this.SetGeometryHints(
this,
new Gdk.Geometry() {
MinWidth = 320,
MinHeight = 200
},
Gdk.WindowHints.MinSize
);
}
示例9: WindowView
public WindowView(Main _view, Controller.Window _ctl)
{
View = _view;
Window = _ctl;
Homogeneous = false;
Spacing = 0;
BorderWidth = 0;
var topLevelBox = new Gtk.VBox();
topLevelBox.Homogeneous = false;
topLevelBox.Spacing = 0;
topLevelBox.BorderWidth = 0;
textView = new WindowTextView(Window);
scroll = new Gtk.ScrolledWindow {
HscrollbarPolicy = Gtk.PolicyType.Automatic,
VscrollbarPolicy = Gtk.PolicyType.Automatic
};
scroll.Add(textView);
Window.CursorMovedByCommand.Add(i =>
{
textView.ScrollToIter(i.GtkIter, 0, false, 0, 0);
});
topLevelBox.PackStart(scroll, true, true, 0);
status = new Gtk.Statusbar();
status.HasResizeGrip = false;
status.Push(StatusbarMode, Window.CurrentMode.GetName());
Window.CurrentMode.Event.Changed += m =>
{
status.Pop(StatusbarMode);
status.Push(StatusbarMode, Window.CurrentMode.GetName());
};
Window.Model.Changed += m =>
{
textView.Buffer = m;
};
topLevelBox.PackStart(status, false, false, 0);
// Wrap the topLevelBox with borders on the left and right
var hlBox = new Gtk.DrawingArea();
NormalColor = hlBox.Style.Background(Gtk.StateType.Normal);
hlBox.WidthRequest = 10;
var borderBox = new Gtk.HBox();
borderBox.Homogeneous = false;
borderBox.Spacing = 0;
borderBox.BorderWidth = 0;
borderBox.PackStart(hlBox, false, false, 0);
borderBox.PackStart(topLevelBox, true, true, 0);
textView.FocusInEvent += (object o, Gtk.FocusInEventArgs args) =>
{
Window.Controller.FocusedWindow.Value = Window;
hlBox.ModifyBg(Gtk.StateType.Normal, HighlightColor);
};
textView.FocusOutEvent += (object o, Gtk.FocusOutEventArgs args) =>
{
hlBox.ModifyBg(Gtk.StateType.Normal, NormalColor);
};
Add(borderBox);
}
示例10: CompareWindow
/// <summary>
/// Initializes a new instance of the <see cref="Trilogic.CompareWindow"/> class.
/// </summary>
/// <param name="parent">The parent window.</param>
/// <param name="compareName">Compare name.</param>
/// <param name="fileSide">File side.</param>
/// <param name="databaseSide">Database side.</param>
public CompareWindow(MainWindow parent, string compareName, SchemaData fileSide, SchemaData databaseSide)
: base(Gtk.WindowType.Toplevel)
{
this.Build();
this.parent = parent;
this.docLocal = new TextDocument();
this.docDB = new TextDocument();
this.editorLocal = new TextEditor(this.docLocal);
this.editorDB = new TextEditor(this.docDB);
Gtk.ScrolledWindow scrollLocal = new Gtk.ScrolledWindow();
Gtk.ScrolledWindow scrollDB = new Gtk.ScrolledWindow();
scrollLocal.Add(this.editorLocal);
scrollDB.Add(this.editorDB);
this.hbox1.Add(scrollDB);
this.hbox1.Add(scrollLocal);
Gtk.Box.BoxChild childLocal = (Gtk.Box.BoxChild)this.hbox1[scrollLocal];
childLocal.Position = 2;
Gtk.Box.BoxChild childDB = (Gtk.Box.BoxChild)this.hbox1[scrollDB];
childDB.Position = 0;
this.ShowAll();
this.Title += " - " + compareName;
this.fileSide = fileSide;
this.databaseSide = databaseSide;
this.ShowSchema();
}
示例11: GetVisualizerWidget
public override Gtk.Widget GetVisualizerWidget (ObjectValue val)
{
var ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone ();
string file = Path.GetTempFileName ();
Gdk.Pixbuf pixbuf;
ops.AllowTargetInvoke = true;
try {
var pix = (RawValue) val.GetRawValue (ops);
pix.CallMethod ("Save", file, "png");
pixbuf = new Gdk.Pixbuf (file);
} finally {
File.Delete (file);
}
var sc = new Gtk.ScrolledWindow ();
sc.ShadowType = Gtk.ShadowType.In;
sc.HscrollbarPolicy = Gtk.PolicyType.Automatic;
sc.VscrollbarPolicy = Gtk.PolicyType.Automatic;
var image = new Gtk.Image (pixbuf);
sc.AddWithViewport (image);
sc.ShowAll ();
return sc;
}
示例12: DisassemblyView
public DisassemblyView ()
{
UntitledName = GettextCatalog.GetString ("Disassembly");
sw = new Gtk.ScrolledWindow ();
editor = new Mono.TextEditor.TextEditor ();
editor.Document.ReadOnly = true;
TextEditorOptions options = new TextEditorOptions ();
options.CopyFrom (TextEditorOptions.DefaultOptions);
options.ShowEolMarkers = false;
options.ShowInvalidLines = false;
options.ShowLineNumberMargin = false;
editor.Options = options;
sw.Add (editor);
sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.ShowAll ();
sw.Vadjustment.ValueChanged += OnScrollEditor;
sw.VScrollbar.ButtonPressEvent += OnPress;
sw.VScrollbar.ButtonReleaseEvent += OnRelease;
sw.VScrollbar.Events |= Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask;
sw.ShadowType = Gtk.ShadowType.In;
sw.Sensitive = false;
currentDebugLineMarker = new CurrentDebugLineTextMarker (editor);
DebuggingService.StoppedEvent += OnStop;
}
示例13: Build
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget Mono.Upnp.GtkClient.MainWindow
this.UIManager = new Gtk.UIManager();
Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default");
this.UIManager.InsertActionGroup(w1, 0);
this.AddAccelGroup(this.UIManager.AccelGroup);
this.WidthRequest = 0;
this.HeightRequest = 0;
this.Name = "Mono.Upnp.GtkClient.MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Mono.Upnp");
this.WindowPosition = ((Gtk.WindowPosition)(1));
// Container child Mono.Upnp.GtkClient.MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
this.hpaned = new Gtk.HPaned();
this.hpaned.CanFocus = true;
this.hpaned.Name = "hpaned";
this.hpaned.Position = 354;
this.hpaned.BorderWidth = ((uint)(5));
// Container child hpaned.Gtk.Paned+PanedChild
this.GtkScrolledWindow = new Gtk.ScrolledWindow();
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.list = new Gtk.TreeView();
this.list.CanFocus = true;
this.list.Name = "list";
this.GtkScrolledWindow.Add(this.list);
this.hpaned.Add(this.GtkScrolledWindow);
Gtk.Paned.PanedChild w3 = ((Gtk.Paned.PanedChild)(this.hpaned[this.GtkScrolledWindow]));
w3.Resize = false;
// Container child hpaned.Gtk.Paned+PanedChild
this.infoBox = new Gtk.VBox();
this.infoBox.Name = "infoBox";
this.infoBox.Spacing = 6;
// Container child infoBox.Gtk.Box+BoxChild
this.infoFiller = new Gtk.Label();
this.infoFiller.Name = "infoFiller";
this.infoFiller.LabelProp = Mono.Unix.Catalog.GetString("Select a device or service");
this.infoBox.Add(this.infoFiller);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.infoBox[this.infoFiller]));
w4.Position = 0;
w4.Fill = false;
this.hpaned.Add(this.infoBox);
this.vbox1.Add(this.hpaned);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned]));
w6.Position = 0;
this.Add(this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 1077;
this.DefaultHeight = 527;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
}
示例14: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget DirectoryHistory.UI.HistoryDialog
this.Name = "DirectoryHistory.UI.HistoryDialog";
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.DefaultWidth = 640;
this.DefaultHeight = 480;
// Internal child DirectoryHistory.UI.HistoryDialog.VBox
Gtk.VBox w1 = this.VBox;
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.entriesVbox = new Gtk.VBox();
this.entriesVbox.Name = "entriesVbox";
this.entriesVbox.Spacing = 6;
// Container child entriesVbox.Gtk.Box+BoxChild
this.label = new Gtk.Label();
this.label.Name = "label";
this.label.LabelProp = Mono.Unix.Catalog.GetString("label1");
this.entriesVbox.Add(this.label);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.entriesVbox[this.label]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child entriesVbox.Gtk.Box+BoxChild
this.scrolledwindow1 = new Gtk.ScrolledWindow();
this.scrolledwindow1.CanFocus = true;
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
this.entriesVbox.Add(this.scrolledwindow1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.entriesVbox[this.scrolledwindow1]));
w3.Position = 1;
w1.Add(this.entriesVbox);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w1[this.entriesVbox]));
w4.Position = 0;
// Internal child DirectoryHistory.UI.HistoryDialog.ActionArea
Gtk.HButtonBox w5 = this.ActionArea;
w5.Name = "dialog1_ActionArea";
w5.Spacing = 10;
w5.BorderWidth = ((uint)(5));
w5.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonOk = new Gtk.Button();
this.buttonOk.CanDefault = true;
this.buttonOk.CanFocus = true;
this.buttonOk.Name = "buttonOk";
this.buttonOk.UseStock = true;
this.buttonOk.UseUnderline = true;
this.buttonOk.Label = "gtk-ok";
this.AddActionWidget(this.buttonOk, -5);
Gtk.ButtonBox.ButtonBoxChild w6 = ((Gtk.ButtonBox.ButtonBoxChild)(w5[this.buttonOk]));
w6.Expand = false;
w6.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.Show();
}
示例15: ChatView
public ChatView(ChatModel chat)
{
Trace.Call(chat);
_ChatModel = chat;
MessageTextView tv = new MessageTextView();
_EndMark = tv.Buffer.CreateMark("end", tv.Buffer.EndIter, false);
tv.ShowTimestamps = true;
tv.ShowMarkerline = true;
tv.Editable = false;
tv.CursorVisible = true;
tv.WrapMode = Gtk.WrapMode.Char;
tv.MessageAdded += OnMessageTextViewMessageAdded;
tv.MessageHighlighted += OnMessageTextViewMessageHighlighted;
tv.PopulatePopup += OnMessageTextViewPopulatePopup;
_OutputMessageTextView = tv;
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
//sw.HscrollbarPolicy = Gtk.PolicyType.Never;
sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.VscrollbarPolicy = Gtk.PolicyType.Always;
sw.ShadowType = Gtk.ShadowType.In;
sw.Add(_OutputMessageTextView);
_OutputScrolledWindow = sw;
// popup menu
_TabMenu = new Gtk.Menu();
Gtk.ImageMenuItem close_item = new Gtk.ImageMenuItem(Gtk.Stock.Close, null);
close_item.Activated += new EventHandler(OnTabMenuCloseActivated);
_TabMenu.Append(close_item);
_TabMenu.ShowAll();
//FocusChild = _OutputTextView;
//CanFocus = false;
_TabLabel = new Gtk.Label();
TabImage = DefaultTabImage;
_TabHBox = new Gtk.HBox();
_TabHBox.PackEnd(new Gtk.Fixed(), true, true, 0);
_TabHBox.PackEnd(_TabLabel, false, false, 0);
_TabHBox.PackStart(TabImage, false, false, 2);
_TabHBox.ShowAll();
_TabEventBox = new Gtk.EventBox();
_TabEventBox.VisibleWindow = false;
_TabEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler(OnTabButtonPress);
_TabEventBox.Add(_TabHBox);
_TabEventBox.ShowAll();
_ThemeSettings = new ThemeSettings();
// OPT-TODO: this should use a TaskStack instead of TaskQueue
_LastSeenHighlightQueue = new TaskQueue("LastSeenHighlightQueue("+ID+")");
_LastSeenHighlightQueue.AbortedEvent += OnLastSeenHighlightQueueAbortedEvent;
_LastSeenHighlightQueue.ExceptionEvent += OnLastSeenHighlightQueueExceptionEvent;
}