本文整理汇总了C#中Gtk.ScrolledWindow类的典型用法代码示例。如果您正苦于以下问题:C# Gtk.ScrolledWindow类的具体用法?C# Gtk.ScrolledWindow怎么用?C# Gtk.ScrolledWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gtk.ScrolledWindow类属于命名空间,在下文中一共展示了Gtk.ScrolledWindow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:Ripper555,项目名称:DynamicPropertyManagement,代码行数:28,代码来源:ControlWrappers.BoundTextView.cs
示例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);
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:34,代码来源:HollyLibrary.ComboListWindow.cs
示例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);
}
开发者ID:Bamistro,项目名称:openvisualizationplatform,代码行数:60,代码来源:OpenVP.GtkGui.BrowsableEditor.cs
示例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 ();
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:33,代码来源:FileScout.cs
示例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;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:26,代码来源:DisassemblyView.cs
示例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();
}
开发者ID:cbuehler,项目名称:opencachemanager,代码行数:34,代码来源:ocmgtk.HTMLEditorWidget.cs
示例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();
}
开发者ID:rsweeney21,项目名称:Mono.Upnp,代码行数:33,代码来源:Mono.Upnp.GtkClient.RawXmlInfo.cs
示例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
);
}
开发者ID:Baltasarq,项目名称:GTKSharpDemo,代码行数:25,代码来源:DrawingDemoView.cs
示例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);
}
开发者ID:cpdean,项目名称:di,代码行数:60,代码来源:WindowView.cs
示例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();
}
开发者ID:Etersoul,项目名称:trilogic-data,代码行数:42,代码来源:CompareWindow.cs
示例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;
}
开发者ID:neXyon,项目名称:monodevelop,代码行数:25,代码来源:PixbufVisualizer.cs
示例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;
}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:29,代码来源:DisassemblyView.cs
示例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);
}
开发者ID:rsweeney21,项目名称:Mono.Upnp,代码行数:59,代码来源:Mono.Upnp.GtkClient.MainWindow.cs
示例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();
}
开发者ID:scheibenkaes,项目名称:DirectoryHistory,代码行数:59,代码来源:DirectoryHistory.UI.HistoryDialog.cs
示例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;
}
开发者ID:carlosmn,项目名称:smuxi,代码行数:59,代码来源:ChatView.cs
示例16: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget MainWindow
this.Name = "MainWindow";
this.Title = Mono.Unix.Catalog.GetString("MainWindow");
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.Resizable = false;
// Container child MainWindow.Gtk.Container+ContainerChild
this.fixed4 = new Gtk.Fixed();
this.fixed4.Name = "fixed4";
this.fixed4.HasWindow = false;
// Container child fixed4.Gtk.Fixed+FixedChild
this.comboboxentry1 = Gtk.ComboBoxEntry.NewText();
this.comboboxentry1.WidthRequest = 450;
this.comboboxentry1.Name = "comboboxentry1";
this.fixed4.Add(this.comboboxentry1);
// Container child fixed4.Gtk.Fixed+FixedChild
this.togglebutton2 = new Gtk.ToggleButton();
this.togglebutton2.WidthRequest = 50;
this.togglebutton2.CanFocus = true;
this.togglebutton2.Name = "togglebutton2";
this.togglebutton2.UseUnderline = true;
this.togglebutton2.Label = Mono.Unix.Catalog.GetString("On");
this.fixed4.Add(this.togglebutton2);
Gtk.Fixed.FixedChild w2 = ((Gtk.Fixed.FixedChild)(this.fixed4[this.togglebutton2]));
w2.X = 450;
// Container child fixed4.Gtk.Fixed+FixedChild
this.label1 = new Gtk.Label();
this.label1.WidthRequest = 100;
this.label1.HeightRequest = 28;
this.label1.Name = "label1";
this.label1.LabelProp = Mono.Unix.Catalog.GetString("00:11:22");
this.fixed4.Add(this.label1);
Gtk.Fixed.FixedChild w3 = ((Gtk.Fixed.FixedChild)(this.fixed4[this.label1]));
w3.X = 500;
// Container child fixed4.Gtk.Fixed+FixedChild
this.GtkScrolledWindow = new Gtk.ScrolledWindow();
this.GtkScrolledWindow.WidthRequest = 600;
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.textview2 = new Gtk.TextView();
this.textview2.CanFocus = true;
this.textview2.Name = "textview2";
this.GtkScrolledWindow.Add(this.textview2);
this.fixed4.Add(this.GtkScrolledWindow);
Gtk.Fixed.FixedChild w5 = ((Gtk.Fixed.FixedChild)(this.fixed4[this.GtkScrolledWindow]));
w5.Y = 32;
this.Add(this.fixed4);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 602;
this.DefaultHeight = 178;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.togglebutton2.Toggled += new System.EventHandler(this.togglebutton2_onClick);
}
开发者ID:terrex,项目名称:spent_time,代码行数:59,代码来源:MainWindow.cs
示例17: Initialize
public override void Initialize(IPadWindow window)
{
base.Initialize(window);
// Call ctors
inputEditor = new TextEditor() { Name = "input", Events = Gdk.EventMask.AllEventsMask, HeightRequest = 80 };
editor = new TextEditor() { Name = "output", Events = Gdk.EventMask.AllEventsMask };
vpaned = new Gtk.VPaned();
var scr1 = new Gtk.ScrolledWindow();
var scr2 = new Gtk.ScrolledWindow();
// Init layout
scr1.ShadowType = Gtk.ShadowType.In;
scr1.Child = inputEditor;
vpaned.Add1(scr1);
scr1.ShowAll();
inputEditor.ShowAll();
scr2.ShadowType = Gtk.ShadowType.In;
scr2.Child = editor;
vpaned.Add2(scr2);
scr2.ShowAll();
editor.ShowAll();
vpaned.ShowAll();
// Init editors
var o = editor.Options;
inputEditor.Options = o;
o.ShowLineNumberMargin = false;
o.ShowFoldMargin = false;
o.ShowIconMargin = false;
editor.Document.ReadOnly = true;
inputEditor.Text = PropertyService.Get(lastInputStringPropId, string.Empty);
editor.Text = string.Empty;
editor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
inputEditor.Document.SyntaxMode = new Highlighting.DSyntaxMode();
editor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
inputEditor.Document.MimeType = Formatting.DCodeFormatter.MimeType;
// Init toolbar
var tb = window.GetToolbar(Gtk.PositionType.Top);
executeButton = new Gtk.Button();
executeButton.Image = new Gtk.Image(Gtk.Stock.Execute, Gtk.IconSize.Menu);
executeButton.TooltipText = "Evaluates the expression typed in the upper input editor.";
executeButton.Clicked += Execute;
tb.Add(executeButton);
abortButton = new Gtk.Button();
abortButton.Sensitive = false;
abortButton.Image = new Gtk.Image(Gtk.Stock.Stop, Gtk.IconSize.Menu);
abortButton.TooltipText = "Stops the evaluation.";
abortButton.Clicked += (object sender, EventArgs e) => AbortExecution();
tb.Add(abortButton);
tb.ShowAll();
}
开发者ID:simendsjo,项目名称:Mono-D,代码行数:59,代码来源:ExpressionEvaluationWidget.cs
示例18: 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 MultiStatusbar();
status.Add(StatusbarItem.Create(100, () => Window.CurrentMode.GetName(), Window.CurrentMode.Changed));
status.Add(StatusbarItem.Create(50, Window.Model.Value.HasUnsavedChanges, b => b ? "" : "Saved"));
status.AddLast(StatusbarItem.Create(400, Window.Model.Value.File.ProjectRelativeFullName()));
topLevelBox.PackStart(status, false, false, 0);
Window.Model.Changed += m =>
{
textView.Buffer = m;
};
// 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.Windows.Current = Window;
hlBox.ModifyBg(Gtk.StateType.Normal, HighlightColor);
};
textView.FocusOutEvent += (object o, Gtk.FocusOutEventArgs args) =>
{
hlBox.ModifyBg(Gtk.StateType.Normal, NormalColor);
};
Add(borderBox);
}
开发者ID:ktvoelker,项目名称:di,代码行数:58,代码来源:WindowView.cs
示例19: CrashDialog
public CrashDialog(Gtk.Window parent, Exception e)
: base(null, parent, Gtk.DialogFlags.Modal)
{
SetDefaultSize(640, 480);
Title = "Smuxi - " + _("Oops, I did it again...");
Gtk.HBox hbox = new Gtk.HBox();
Gtk.Image image = new Gtk.Image(Gtk.Stock.DialogError, Gtk.IconSize.Dialog);
hbox.PackStart(image, false, false, 2);
Gtk.VBox label_vbox = new Gtk.VBox();
Gtk.Label label1 = new Gtk.Label();
Gtk.Label label2 = new Gtk.Label();
label1.Markup = String.Format(
"<b>{0}</b>",
GLib.Markup.EscapeText(
_("Smuxi crashed because an unhandled exception was thrown!")
)
);
label2.Markup = GLib.Markup.EscapeText(
_("Here is the stacktrace, please report this bug!")
);
label_vbox.PackStart(label1, false, false, 0);
label_vbox.PackStart(new Gtk.Fixed(), true, true, 0);
label_vbox.PackStart(label2, false, false, 0);
hbox.PackStart(label_vbox, true, true, 0);
Gtk.VBox vbox = new Gtk.VBox();
vbox.PackStart(hbox, false, false, 2);
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
sw.ShadowType = Gtk.ShadowType.In;
Gtk.TextView tv = new Gtk.TextView();
tv.Editable = false;
tv.CursorVisible = false;
sw.Add(tv);
vbox.PackStart(sw, true, true, 2);
// add to the dialog
VBox.PackStart(vbox, true, true, 2);
AddButton(_("_Report Bug"), -1);
AddButton(Gtk.Stock.Quit, 0);
string message = String.Empty;
if (e.InnerException != null) {
message = "Inner-Exception Type:\n"+e.InnerException.GetType()+"\n\n"+
"Inner-Exception Message:\n"+e.InnerException.Message+"\n\n"+
"Inner-Exception StackTrace:\n"+e.InnerException.StackTrace+"\n";
}
message += "Exception Type:\n"+e.GetType()+"\n\n"+
"Exception Message:\n"+e.Message+"\n\n"+
"Exception StackTrace:\n"+e.StackTrace;
tv.Buffer.Text = message;
ShowAll();
}
开发者ID:tuukka,项目名称:smuxi,代码行数:57,代码来源:CrashDialog.cs
示例20: TableViewBackend
public TableViewBackend()
{
var sw = new Gtk.ScrolledWindow ();
sw.ShadowType = Gtk.ShadowType.In;
sw.Child = new CustomTreeView (this);
sw.Child.Show ();
sw.Show ();
base.Widget = sw;
}
开发者ID:RevolutionSmythe,项目名称:xwt,代码行数:9,代码来源:TableViewBackend.cs
注:本文中的Gtk.ScrolledWindow类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论