本文整理汇总了C#中Gtk.Frame类的典型用法代码示例。如果您正苦于以下问题:C# Frame类的具体用法?C# Frame怎么用?C# Frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Frame类属于Gtk命名空间,在下文中一共展示了Frame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConfigurationDialog
public ConfigurationDialog (LCDService plugin)
{
this.plugin = plugin;
Title = AddinManager.CurrentLocalizer.GetString ("LCD configuration");
BorderWidth = 5;
HasSeparator = false;
Resizable = false;
VBox lcdproc_box = new VBox ();
HBox host_box = new HBox ();
host_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Hostname:")), false, false, 3);
host_entry = new Entry ();
host_box.PackStart (host_entry, true, true, 3);
host_entry.Text = this.plugin.Host;
host_entry.Changed += new EventHandler (Host_Changed);
HBox port_box = new HBox ();
port_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Port:")), false, false, 3);
port_spin = new SpinButton (1, 65535, 1);
port_box.PackStart (port_spin, true, true, 3);
port_spin.Value = this.plugin.Port;
port_spin.Changed += new EventHandler (Port_Changed);
Frame lcdproc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("LCDProc Daemon:"));
lcdproc_box.PackStart (host_box);
lcdproc_box.PackStart (port_box);
lcdproc_frame.Add (lcdproc_box);
lcdproc_frame.ShowAll ();
VBox.PackStart (lcdproc_frame, false, false, 3);
AddButton (Stock.Close, ResponseType.Close);
}
示例2: Build
protected virtual void Build()
{
Gui.Initialize (this);
// Widget BolPatcher.MenuGameWidget
BinContainer.Attach (this);
Name = "BolPatcher.MenuGameWidget";
// Container child BolPatcher.MenuGameWidget.Gtk.Container+ContainerChild
_frame1 = new Frame ();
_frame1.Name = "frame1";
_frame1.ShadowType = 0;
// Container child frame1.Gtk.Container+ContainerChild
_gtkAlignment = new Alignment (0F, 0F, 1F, 1F);
_gtkAlignment.Name = "GtkAlignment";
_gtkAlignment.LeftPadding = 12;
// Container child GtkAlignment.Gtk.Container+ContainerChild
_button2 = new Button ();
_button2.CanFocus = true;
_button2.Name = "button2";
_button2.UseUnderline = true;
_button2.Label = Catalog.GetString ("GtkButton");
_gtkAlignment.Add (_button2);
_frame1.Add (_gtkAlignment);
_gtkLabel1 = new Label ();
_gtkLabel1.Name = "GtkLabel1";
_gtkLabel1.LabelProp = Catalog.GetString ("<b>GtkFrame</b>");
_gtkLabel1.UseMarkup = true;
_frame1.LabelWidget = _gtkLabel1;
Add (_frame1);
if ((Child != null)) {
Child.ShowAll ();
}
Hide ();
}
示例3: DeclarationViewWindow
public DeclarationViewWindow()
: base(WindowType.Popup)
{
Gtk.Frame frame = new Gtk.Frame ();
frame.Add (label = new Label (""));
Add (frame);
}
示例4: DemoColorSelection
public DemoColorSelection () : base ("Color Selection")
{
BorderWidth = 8;
VBox vbox = new VBox (false,8);
vbox.BorderWidth = 8;
Add (vbox);
// Create the color swatch area
Frame frame = new Frame ();
frame.ShadowType = ShadowType.In;
vbox.PackStart (frame, true, true, 0);
drawingArea = new DrawingArea ();
drawingArea.ExposeEvent += new ExposeEventHandler (ExposeEventCallback);
// set a minimum size
drawingArea.SetSizeRequest (200,200);
// set the color
color = new Gdk.Color (0, 0, 0xff);
drawingArea.ModifyBg (StateType.Normal, color);
frame.Add (drawingArea);
Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
Button button = new Button ("_Change the above color");
button.Clicked += new EventHandler (ChangeColorCallback);
alignment.Add (button);
vbox.PackStart (alignment);
ShowAll ();
}
示例5: InsightWindow
public InsightWindow(SourceEditorView control, Project project, string fileName)
: base(WindowType.Popup)
{
this.control = control;
this.fileName = fileName;
this.project = project;
/*System.Drawing.Point caretPos = control.ActiveTextAreaControl.TextArea.Caret.Position;
System.Drawing.Point visualPos = new System.Drawing.Point(control.ActiveTextAreaControl.TextArea.TextView.GetDrawingXPos(caretPos.Y, caretPos.X) + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.X,
(int)((1 + caretPos.Y) * control.ActiveTextAreaControl.TextArea.TextView.FontHeight) - control.ActiveTextAreaControl.TextArea.VirtualTop.Y - 1 + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.Y);*/
//control.ActiveTextAreaControl.Caret.PositionChanged += new EventHandler(CaretOffsetChanged);
// control.TextAreaPainter.IHaveTheFocusChanged += focusEventHandler;
AddEvents ((int) (Gdk.EventMask.KeyPressMask));
this.SkipPagerHint = true;
this.SkipTaskbarHint = true;
this.Decorated = false;
this.BorderWidth = 2;
this.TypeHint = Gdk.WindowTypeHint.Dialog;
desc = new Gtk.Label ("");
current = new Gtk.Label ("");
max = new Gtk.Label ("");
HBox mainBox = new HBox (false, 2);
mainBox.PackStart (new Gtk.Image (Gtk.Stock.GotoTop, Gtk.IconSize.Menu), false, false, 2);
mainBox.PackStart (current, false, false, 2);
mainBox.PackStart (new Gtk.Label (" of "), false, false, 2);
mainBox.PackStart (max, false, false, 2);
mainBox.PackStart (new Gtk.Image (Gtk.Stock.GotoBottom, Gtk.IconSize.Menu), false, false, 2);
mainBox.PackStart (desc);
Gtk.Frame framer = new Gtk.Frame ();
framer.Add (mainBox);
this.Add (framer);
}
示例6: DemoColorSelection
public DemoColorSelection () : base ("Color Selection")
{
BorderWidth = 8;
VBox vbox = new VBox (false,8);
vbox.BorderWidth = 8;
Add (vbox);
// Create the color swatch area
Frame frame = new Frame ();
frame.ShadowType = ShadowType.In;
vbox.PackStart (frame, true, true, 0);
drawingArea = new DrawingArea ();
// set a minimum size
drawingArea.SetSizeRequest (200,200);
// set the color
color.Red = 0;
color.Green = 0;
color.Blue = 1;
color.Alpha = 1;
drawingArea.OverrideBackgroundColor (StateFlags.Normal, color);
frame.Add (drawingArea);
Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
Button button = new Button ("_Change the above color");
button.Clicked += new EventHandler (ChangeColorCallback);
alignment.Add (button);
vbox.PackStart (alignment, false, false, 0);
ShowAll ();
}
示例7: BuildInterface
private void BuildInterface ()
{
NoShowAll = true;
Alignment matchesAlignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
matchesAlignment.SetPadding (5, 5, 5, 5);
matchesAlignment.Add (terms_box);
matchesFrame = new Frame (null);
matchesFrame.Add (matchesAlignment);
matchesFrame.LabelWidget = BuildMatchHeader ();
matchesFrame.ShowAll ();
terms_entry_box = new HBox ();
terms_entry_box.Spacing = 8;
terms_entry_box.PackStart (new Label (Catalog.GetString ("Condition:")), false, false, 0);
terms_entry = new Entry ();
terms_entry_box.PackStart (terms_entry, true, true, 0);
limit_box.ShowAll ();
PackStart(matchesFrame, true, true, 0);
PackStart(terms_entry_box, false, false, 0);
PackStart(limit_box, false, false, 0);
//ShowAll ();
}
示例8: AudioView
public AudioView()
{
// this.WidthRequest = 500; //250;
// this.HeightRequest = 375; //187;
Frame frame = new Frame();
frame.BorderWidth = 5;
frame.Show();
VBox vbox = new VBox(false, 0);
frame.Add(vbox);
vbox.Show();
Label label = new Label(Catalog.GetString("Audio Chat in progress..."));
label.Show();
vbox.PackStart(label, false, true, 5);
Button button = new Button(Catalog.GetString("End Call"));
button.Clicked += OnCloseAudioClicked;
button.Show();
vbox.PackStart(button, false, true, 5);
this.Add(frame);
}
示例9: build
protected void build()
{
this.SetDefaultSize (1000, 600);
this.Title = "Battle";
this.DeleteEvent += HandleDeleteEvent;
this.vbox = new VBox ();
this.tbar = new Toolbar ();
this.tbar.ToolbarStyle = ToolbarStyle.BothHoriz;
this.about = new ToolButton (Stock.About);
this.about.IsImportant = false;
this.about.Label = "About";
this.about.TooltipText = "About this application";
this.tbar.Add (this.about);
this.hpaned = new HPaned ();
this.frame = new Frame ("Battle Map");
this.map = new MapControl ();
this.frame.Add (this.map);
Label a = new Label ("Welcome");
this.hpaned.Pack1 (a, false, false);
this.hpaned.Pack2 (this.frame, true, true);
this.sbar = new Statusbar ();
this.vbox.PackStart (this.tbar, false, true, 0);
this.vbox.PackStart (this.hpaned, true, true, 0);
this.vbox.PackEnd (this.sbar, false, true, 0);
this.Add (this.vbox);
}
示例10: ChessGameWidget
public ChessGameWidget(Widget board)
{
whiteLabel = new Label ();
blackLabel = new Label ();
blackClock = new ChessClock ();
blackHBox = new HBox ();
blackHBox.PackStart (blackLabel, true, true, 2);
blackHBox.PackStart (blackClock, false, false, 2);
whiteClock = new ChessClock ();
whiteHBox = new HBox ();
whiteHBox.PackStart (whiteLabel, true, true, 2);
whiteHBox.PackStart (whiteClock, false, false, 2);
topBin = new Frame ();
bottomBin = new Frame ();
whiteAtBottom = true;
topBin.Add (blackHBox);
bottomBin.Add (whiteHBox);
PackStart (topBin, false, false, 2);
PackStart (board, true, true, 2);
PackStart (bottomBin, false, false, 2);
topBin.ShowAll ();
bottomBin.ShowAll ();
}
示例11: DataGridView
public DataGridView()
: base()
{
frame = new Gtk.Frame ();
grid = new DataGrid ();
frame.Add (grid);
frame.ShowAll ();
}
示例12: DemoStockBrowser
public DemoStockBrowser () : base ("Stock Icons and Items")
{
SetDefaultSize (-1, 500);
BorderWidth = 8;
HBox hbox = new HBox (false, 8);
Add (hbox);
ScrolledWindow sw = new ScrolledWindow ();
sw.SetPolicy (PolicyType.Never, PolicyType.Automatic);
hbox.PackStart (sw, false, false, 0);
ListStore model = CreateModel ();
TreeView treeview = new TreeView (model);
sw.Add (treeview);
TreeViewColumn column = new TreeViewColumn ();
column.Title = "Name";
CellRenderer renderer = new CellRendererPixbuf ();
column.PackStart (renderer, false);
column.SetAttributes (renderer, "stock_id", Column.Id);
renderer = new CellRendererText ();
column.PackStart (renderer, true);
column.SetAttributes (renderer, "text", Column.Name);
treeview.AppendColumn (column);
treeview.AppendColumn ("Label", new CellRendererText (), "text", Column.Label);
treeview.AppendColumn ("Accel", new CellRendererText (), "text", Column.Accel);
treeview.AppendColumn ("ID", new CellRendererText (), "text", Column.Id);
Alignment align = new Alignment (0.5f, 0.0f, 0.0f, 0.0f);
hbox.PackEnd (align, false, false, 0);
Frame frame = new Frame ("Selected Item");
align.Add (frame);
VBox vbox = new VBox (false, 8);
vbox.BorderWidth = 8;
frame.Add (vbox);
typeLabel = new Label ();
vbox.PackStart (typeLabel, false, false, 0);
iconImage = new Gtk.Image ();
vbox.PackStart (iconImage, false, false, 0);
accelLabel = new Label ();
vbox.PackStart (accelLabel, false, false, 0);
nameLabel = new Label ();
vbox.PackStart (nameLabel, false, false, 0);
idLabel = new Label ();
vbox.PackStart (idLabel, false, false, 0);
treeview.Selection.Mode = Gtk.SelectionMode.Single;
treeview.Selection.Changed += new EventHandler (SelectionChanged);
ShowAll ();
}
示例13: Initialise
public void Initialise (MonoDevelopProxy proxy, Frame designerFrame)
{
System.Diagnostics.Trace.WriteLine ("Creating AspNetEdit EditorHost");
host = new EditorHost (proxy);
host.Initialise ();
System.Diagnostics.Trace.WriteLine ("Created AspNetEdit EditorHost");
//StartGuiThread ();
Gtk.Application.Invoke ( delegate { LoadGui (designerFrame); });
}
示例14: DemoDrawingArea
public DemoDrawingArea () : base ("Drawing Area")
{
BorderWidth = 8;
VBox vbox = new VBox (false, 8);
vbox.BorderWidth = 8;
Add (vbox);
// Create the checkerboard area
Label label = new Label ("<u>Checkerboard pattern</u>");
label.UseMarkup = true;
vbox.PackStart (label, false, false, 0);
Frame frame = new Frame ();
frame.ShadowType = ShadowType.In;
vbox.PackStart (frame, true, true, 0);
DrawingArea da = new DrawingArea ();
// set a minimum size
da.SetSizeRequest (100,100);
frame.Add (da);
da.ExposeEvent += new ExposeEventHandler (CheckerboardExpose);
// Create the scribble area
label = new Label ("<u>Scribble area</u>");
label.UseMarkup = true;
vbox.PackStart (label, false, false, 0);
frame = new Frame ();
frame.ShadowType = ShadowType.In;
vbox.PackStart (frame, true, true, 0);
da = new DrawingArea ();
// set a minimum size
da.SetSizeRequest (100, 100);
frame.Add (da);
// Signals used to handle backing pixmap
da.ExposeEvent += new ExposeEventHandler (ScribbleExpose);
da.ConfigureEvent += new ConfigureEventHandler (ScribbleConfigure);
// Event signals
da.MotionNotifyEvent += new MotionNotifyEventHandler (ScribbleMotionNotify);
da.ButtonPressEvent += new ButtonPressEventHandler (ScribbleButtonPress);
// Ask to receive events the drawing area doesn't normally
// subscribe to
da.Events |= EventMask.LeaveNotifyMask | EventMask.ButtonPressMask |
EventMask.PointerMotionMask | EventMask.PointerMotionHintMask;
ShowAll ();
}
示例15: Initialize
public void Initialize (PropertyDescriptor prop)
{
if (!prop.PropertyType.IsEnum)
throw new ApplicationException ("Flags editor does not support editing values of type " + prop.PropertyType);
property = prop.Label;
Spacing = 3;
// For small enums, the editor is a list of checkboxes inside a frame
// For large enums (>5), use a selector dialog.
enm = Registry.LookupEnum (prop.PropertyType.FullName);
if (enm.Values.Length < 6)
{
Gtk.VBox vbox = new Gtk.VBox (true, 3);
flags = new Hashtable ();
foreach (Enum value in enm.Values) {
EnumValue eval = enm[value];
if (eval.Label == "")
continue;
Gtk.CheckButton check = new Gtk.CheckButton (eval.Label);
check.TooltipText = eval.Description;
uint uintVal = (uint) Convert.ToInt32 (eval.Value);
flags[check] = uintVal;
flags[uintVal] = check;
check.Toggled += FlagToggled;
vbox.PackStart (check, false, false, 0);
}
Gtk.Frame frame = new Gtk.Frame ();
frame.Add (vbox);
frame.ShowAll ();
PackStart (frame, true, true, 0);
}
else
{
flagsLabel = new Gtk.Entry ();
flagsLabel.IsEditable = false;
flagsLabel.HasFrame = false;
flagsLabel.ShowAll ();
PackStart (flagsLabel, true, true, 0);
Gtk.Button but = new Gtk.Button ("...");
but.Clicked += OnSelectFlags;
but.ShowAll ();
PackStart (but, false, false, 0);
}
}