本文整理汇总了C#中MonoDevelop.Components.Docking.DockFrame类的典型用法代码示例。如果您正苦于以下问题:C# DockFrame类的具体用法?C# DockFrame怎么用?C# DockFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DockFrame类属于MonoDevelop.Components.Docking命名空间,在下文中一共展示了DockFrame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DockItemContainer
public DockItemContainer (DockFrame frame, DockItem item)
{
this.item = item;
mainBox = new VBox ();
Add (mainBox);
mainBox.ResizeMode = Gtk.ResizeMode.Queue;
mainBox.Spacing = 0;
ShowAll ();
mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
HBox hbox = new HBox ();
hbox.Show ();
hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
contentBox = new HBox ();
contentBox.Show ();
hbox.PackStart (contentBox, true, true, 0);
hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
mainBox.PackStart (hbox, true, true, 0);
mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:28,代码来源:DockItemContainer.cs
示例2: AutoHideBox
public AutoHideBox (DockFrame frame, DockItem item, Gtk.PositionType pos, int size)
{
this.position = pos;
this.frame = frame;
this.targetSize = size;
horiz = pos == PositionType.Left || pos == PositionType.Right;
startPos = pos == PositionType.Top || pos == PositionType.Left;
Events = Events | Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask;
Box fr;
CustomFrame cframe = new CustomFrame ();
switch (pos) {
case PositionType.Left: cframe.SetMargins (1, 1, 0, 1); break;
case PositionType.Right: cframe.SetMargins (1, 1, 1, 0); break;
case PositionType.Top: cframe.SetMargins (0, 1, 1, 1); break;
case PositionType.Bottom: cframe.SetMargins (1, 0, 1, 1); break;
}
EventBox sepBox = new EventBox ();
cframe.Add (sepBox);
if (horiz) {
fr = new HBox ();
sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorW; };
sepBox.WidthRequest = gripSize;
} else {
fr = new VBox ();
sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorH; };
sepBox.HeightRequest = gripSize;
}
sepBox.Events = EventMask.AllEventsMask;
if (pos == PositionType.Left || pos == PositionType.Top)
fr.PackEnd (cframe, false, false, 0);
else
fr.PackStart (cframe, false, false, 0);
Add (fr);
ShowAll ();
Hide ();
scrollable = new ScrollableContainer ();
scrollable.ScrollMode = false;
scrollable.Show ();
if (item.Widget.Parent != null) {
((Gtk.Container)item.Widget.Parent).Remove (item.Widget);
}
item.Widget.Show ();
scrollable.Add (item.Widget);
fr.PackStart (scrollable, true, true, 0);
sepBox.ButtonPressEvent += OnSizeButtonPress;
sepBox.ButtonReleaseEvent += OnSizeButtonRelease;
sepBox.MotionNotifyEvent += OnSizeMotion;
sepBox.ExposeEvent += OnGripExpose;
sepBox.EnterNotifyEvent += delegate { insideGrip = true; sepBox.QueueDraw (); };
sepBox.LeaveNotifyEvent += delegate { insideGrip = false; sepBox.QueueDraw (); };
}
开发者ID:JamesChan,项目名称:monodevelop,代码行数:60,代码来源:AutoHideBox.cs
示例3: DockContainer
public DockContainer(DockFrame frame)
{
Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this);
this.Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask;
this.frame = frame;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:DockContainer.cs
示例4: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
var layers = new LayersListWidget ();
DockItem layers_item = workspace.AddItem ("Layers");
DockItemToolbar layers_tb = layers_item.GetToolbar (PositionType.Bottom);
layers_item.Label = Catalog.GetString ("Layers");
layers_item.Content = layers;
layers_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.MergeLayerDown.png");
layers_item.Behavior |= DockItemBehavior.CantClose;
layers_tb.Add (PintaCore.Actions.Layers.AddNewLayer.CreateDockToolBarItem ());
layers_tb.Add (PintaCore.Actions.Layers.DeleteLayer.CreateDockToolBarItem ());
layers_tb.Add (PintaCore.Actions.Layers.DuplicateLayer.CreateDockToolBarItem ());
layers_tb.Add (PintaCore.Actions.Layers.MergeLayerDown.CreateDockToolBarItem ());
layers_tb.Add (PintaCore.Actions.Layers.MoveLayerUp.CreateDockToolBarItem ());
layers_tb.Add (PintaCore.Actions.Layers.MoveLayerDown.CreateDockToolBarItem ());
Gtk.ToggleAction show_layers = padMenu.AppendToggleAction ("Layers", Catalog.GetString ("Layers"), null, "Menu.Layers.MergeLayerDown.png");
show_layers.Activated += delegate { layers_item.Visible = show_layers.Active; };
layers_item.VisibleChanged += delegate { show_layers.Active = layers_item.Visible; };
show_layers.Active = layers_item.Visible;
PintaCore.Workspace.ActiveDocumentChanged += delegate { layers.Reset (); };
}
开发者ID:JoeyScarr,项目名称:Pinta,代码行数:26,代码来源:LayersPad.cs
示例5: MainWindow
/// <summary>
/// Initializes a new instance of the <see cref="TraceLab.UI.GTK.MainWindow"/> class.
/// </summary>
public MainWindow(ApplicationContext dataContext)
{
m_applicationContext = dataContext;
// Init dock frame
m_dockFrame = new DockFrame();
m_dockFrame.CompactGuiLevel = 5;
// Init component info panel
m_infoPanelFactory = new InfoPanelFactory(m_applicationContext, m_dockFrame);
//build the window
CreateWindow();
//set window application view model to all UI panels in current chrome
//note, that application vm should not be set before m_windowShell.ShowAll is called
SetApplicationViewModel(m_applicationContext.Application);
// initiate action handlers for all actions in application
new ActionHandlers(dataContext);
//attach handler to closing event of a main window
this.WindowShell.DeleteEvent += MainWindow_DeleteEvent;
m_mainWindowCounter++;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:29,代码来源:MainWindow.cs
示例6: Initialize
public void Initialize(DockFrame dockframe){
m_dockFrame = dockframe;
m_experimentPad = m_dockFrame.AddItem ("ExperimentPad");
m_experimentPad.Label = Catalog.GetString ("ExperimentPad");
m_experimentPad.Behavior = DockItemBehavior.Locked;
m_experimentPad.Expand = true;
m_experimentPad.DrawFrame = false;
m_initialized = true;
}
开发者ID:CoEST,项目名称:TraceLab,代码行数:10,代码来源:ExperimentCanvasPad.cs
示例7: Initialize
/// <summary>
/// Initialize the window pad in the given dock frame.
/// </summary>
/// <param name='dockFrame'>
/// Dock frame.
/// </param>
public void Initialize(DockFrame dockFrame)
{
m_dockFrame = dockFrame;
DockItem workspaceDockingWindow = m_dockFrame.AddItem("Workspace");
workspaceDockingWindow.Label = Catalog.GetString("Workspace");
workspaceDockingWindow.DefaultLocation = "ComponentsLibrary/Center";
workspaceDockingWindow.Behavior |= DockItemBehavior.CantClose;
workspaceDockingWindow.Content = CreateWorkspaceView();
m_initialized = true;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:18,代码来源:WorkspaceWindowPad.cs
示例8: TabStrip
public TabStrip (DockFrame frame)
{
VBox vbox = new VBox ();
box = new TabStripBox () { TabStrip = this };
vbox.PackStart (box, false, false, 0);
// vbox.PackStart (bottomFiller, false, false, 0);
Add (vbox);
ShowAll ();
bottomFiller.Hide ();
BottomPadding = 3;
WidthRequest = 0;
box.Removed += HandleRemoved;
}
开发者ID:vvarshne,项目名称:monodevelop,代码行数:13,代码来源:TabStrip.cs
示例9: PlaceholderWindow
public PlaceholderWindow (DockFrame frame): base (Gtk.WindowType.Popup)
{
SkipTaskbarHint = true;
Decorated = false;
TransientFor = (Gtk.Window) frame.Toplevel;
TypeHint = WindowTypeHint.Utility;
// Create the mask for the arrow
Realize ();
redgc = new Gdk.GC (GdkWindow);
redgc.RgbFgColor = frame.Style.Background (StateType.Selected);
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:PlaceholderWindow.cs
示例10: Initialize
/// <summary>
/// Initialize the window pad in the given dock frame.
/// </summary>
/// <param name='dockFrame'>
/// Dock frame.
/// </param>
public void Initialize(DockFrame dockFrame)
{
if (this.dockFrame != null)
throw new ApplicationException ("This DockPad has already been initialized");
if (dockFrame == null)
throw new ArgumentNullException ("Provided DockFrame is null");
this.dockFrame = dockFrame;
DockItem componentLibraryDock = dockFrame.AddItem("ComponentsLibrary");
componentLibraryDock.Label = Catalog.GetString("Components Library");
componentLibraryDock.Behavior |= DockItemBehavior.CantClose;
componentLibraryDock.DefaultWidth = 200;
componentLibraryDock.Content = widget;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:20,代码来源:ComponentsLibraryPad.cs
示例11: TabStrip
public TabStrip (DockFrame frame)
{
this.frame = frame;
frame.ShadedContainer.Add (this);
VBox vbox = new VBox ();
box = new HBox ();
vbox.PackStart (box, false, false, 0);
vbox.PackStart (bottomFiller, false, false, 0);
AppendPage (vbox, null);
ShowBorder = false;
ShowTabs = false;
ShowAll ();
bottomFiller.Hide ();
BottomPadding = 3;
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:15,代码来源:TabStrip.cs
示例12: DockItemTitleTab
public DockItemTitleTab (DockItem item, DockFrame frame)
{
this.item = item;
this.frame = frame;
this.VisibleWindow = false;
UpdateVisualStyle ();
NoShowAll = true;
Events |= Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask;
KeyPressEvent += HeaderKeyPress;
KeyReleaseEvent += HeaderKeyRelease;
this.SubscribeLeaveEvent (OnLeave);
}
开发者ID:segaman,项目名称:monodevelop,代码行数:15,代码来源:DockItemTitleTab.cs
示例13: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
DockItem toolbox_item = workspace.AddItem ("Toolbox");
ToolBoxWidget toolbox = new ToolBoxWidget () { Name = "toolbox" };
toolbox_item.Label = Catalog.GetString ("Tools");
toolbox_item.Content = toolbox;
toolbox_item.Icon = PintaCore.Resources.GetIcon ("Tools.Pencil.png");
toolbox_item.Behavior |= DockItemBehavior.CantClose;
toolbox_item.DefaultWidth = 65;
Gtk.ToggleAction show_toolbox = padMenu.AppendToggleAction ("Tools", Catalog.GetString ("Tools"), null, "Tools.Pencil.png");
show_toolbox.Activated += delegate { toolbox_item.Visible = show_toolbox.Active; };
toolbox_item.VisibleChanged += delegate { show_toolbox.Active = toolbox_item.Visible; };
show_toolbox.Active = toolbox_item.Visible;
}
开发者ID:jobernolte,项目名称:Pinta,代码行数:17,代码来源:ToolBoxPad.cs
示例14: Initialize
/// <summary>
/// Initialize the window pad in the given dock frame.
/// </summary>
/// <param name='dockFrame'>
/// Dock frame.
/// </param>
public void Initialize(DockFrame dockFrame)
{
m_dockFrame = dockFrame;
DockItem componentLibraryDockingWindow = m_dockFrame.AddItem("ComponentsLibrary");
componentLibraryDockingWindow.Label = Catalog.GetString("Components Library");
componentLibraryDockingWindow.Behavior |= DockItemBehavior.CantClose;
componentLibraryDockingWindow.DefaultWidth = 200;
componentLibraryDockingWindow.Content = CreateComponentsTreeView();
//DockItemToolbar libraryToolbar = componentLibraryDockingWindow.GetToolbar(PositionType.Top);
//libraryToolbar.Add(ApplicationUICore.Actions.ComponentLibrary.Rescan.CreateDockToolBarItem());
EnableDrag();
m_initialized = true;
}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:23,代码来源:ComponentsLibraryPad.cs
示例15: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
var history = new HistoryTreeView ();
DockItem history_item = workspace.AddItem ("History");
DockItemToolbar history_tb = history_item.GetToolbar (PositionType.Bottom);
history_item.Label = Catalog.GetString ("History");
history_item.DefaultLocation = "Images/Bottom";
history_item.Content = history;
history_item.Icon = PintaCore.Resources.GetIcon ("Menu.Layers.DuplicateLayer.png");
history_tb.Add (PintaCore.Actions.Edit.Undo.CreateDockToolBarItem ());
history_tb.Add (PintaCore.Actions.Edit.Redo.CreateDockToolBarItem ());
Gtk.ToggleAction show_history = padMenu.AppendToggleAction ("History", Catalog.GetString ("History"), null, "Menu.Layers.DuplicateLayer.png");
show_history.Activated += delegate { history_item.Visible = show_history.Active; };
history_item.VisibleChanged += delegate { show_history.Active = history_item.Visible; };
show_history.Active = history_item.Visible;
}
开发者ID:jobernolte,项目名称:Pinta,代码行数:19,代码来源:HistoryPad.cs
示例16: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
DockItem palette_item = workspace.AddItem ("Palette");
ColorPaletteWidget palette = new ColorPaletteWidget (true) { Name = "palette" };
palette_item.Label = Catalog.GetString ("Palette");
palette_item.Content = palette;
palette_item.Icon = PintaCore.Resources.GetIcon ("Pinta.png");
//palette_item.DefaultLocation = "Toolbox/Bottom";
palette_item.Behavior |= DockItemBehavior.CantClose;
palette_item.DefaultWidth = 65;
Gtk.ToggleAction show_palette = padMenu.AppendToggleAction ("Palette", Catalog.GetString ("Palette"), null, "Pinta.png");
show_palette.Activated += delegate { palette_item.Visible = show_palette.Active; };
palette_item.VisibleChanged += delegate { show_palette.Active = palette_item.Visible; };
palette.Initialize ();
show_palette.Active = palette_item.Visible;
}
开发者ID:JoeyScarr,项目名称:Pinta,代码行数:19,代码来源:ColorPalettePad.cs
示例17: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
const string pad_name = "Open Images";
DockItem open_images_item = workspace.AddItem (pad_name);
open_images_item.Label = Catalog.GetString (pad_name);
open_images_item.Content = new OpenImagesListWidget ();
ToggleAction show_open_images = padMenu.AppendToggleAction (pad_name, Catalog.GetString (pad_name), null, null);
show_open_images.Activated += delegate {
open_images_item.Visible = show_open_images.Active;
};
open_images_item.VisibleChanged += delegate {
show_open_images.Active = open_images_item.Visible;
};
show_open_images.Active = open_images_item.Visible;
}
开发者ID:rolandixor,项目名称:Pinta,代码行数:20,代码来源:OpenImagesPad.cs
示例18: Initialize
public void Initialize(DockFrame workspace, Menu padMenu)
{
DockItem open_images_item = workspace.AddItem ("Images");
open_images_item.DefaultLocation = "Layers/Bottom";
open_images_item.Label = Catalog.GetString ("Images");
open_images_item.Content = new OpenImagesListWidget ();
open_images_item.Icon = PintaCore.Resources.GetIcon ("Menu.Effects.Default.png");
ToggleAction show_open_images = padMenu.AppendToggleAction ("Images", Catalog.GetString ("Images"), null, null);
show_open_images.Activated += delegate {
open_images_item.Visible = show_open_images.Active;
};
open_images_item.VisibleChanged += delegate {
show_open_images.Active = open_images_item.Visible;
};
show_open_images.Active = open_images_item.Visible;
}
开发者ID:rini18,项目名称:Pinta,代码行数:20,代码来源:OpenImagesPad.cs
示例19: DockBar
internal DockBar (DockFrame frame, Gtk.PositionType position)
{
frame.ShadedContainer.Add (this);
VisibleWindow = false;
this.frame = frame;
this.position = position;
Gtk.Alignment al = new Alignment (0,0,0,0);
if (Orientation == Gtk.Orientation.Horizontal)
box = new HBox ();
else
box = new VBox ();
uint sizePadding = 1;
uint startPadding = 6;
switch (Frame.CompactGuiLevel) {
case 1: sizePadding = 2; break;
case 4: startPadding = 3; break;
case 5: startPadding = 0; sizePadding = 0; break;
}
switch (position) {
case PositionType.Top: al.BottomPadding = sizePadding; al.LeftPadding = al.RightPadding = startPadding; break;
case PositionType.Bottom: al.TopPadding = sizePadding; al.LeftPadding = al.RightPadding = startPadding; break;
case PositionType.Left: al.RightPadding = sizePadding; al.TopPadding = al.BottomPadding = startPadding; break;
case PositionType.Right: al.LeftPadding = sizePadding; al.TopPadding = al.BottomPadding = startPadding; break;
}
box.Spacing = 3;
al.Add (box);
Add (al);
filler = new Label ();
filler.WidthRequest = 4;
filler.HeightRequest = 4;
box.PackEnd (filler);
ShowAll ();
UpdateVisibility ();
}
开发者ID:RudoCris,项目名称:Pinta,代码行数:39,代码来源:DockBar.cs
示例20: DockBar
internal DockBar (DockFrame frame, Gtk.PositionType position)
{
VisibleWindow = false;
this.frame = frame;
this.position = position;
Gtk.Alignment al = new Alignment (0,0,0,0);
if (Orientation == Gtk.Orientation.Horizontal)
box = new HBox ();
else
box = new VBox ();
al.Add (box);
Add (al);
filler = new Label ();
filler.WidthRequest = 4;
filler.HeightRequest = 4;
box.PackEnd (filler);
ShowAll ();
UpdateVisibility ();
}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:22,代码来源:DockBar.cs
注:本文中的MonoDevelop.Components.Docking.DockFrame类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论