本文整理汇总了C#中MonoDevelop.Components.Docking.DockFrame类的典型用法代码示例。如果您正苦于以下问题:C# DockFrame类的具体用法?C# DockFrame怎么用?C# DockFrame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DockFrame类属于MonoDevelop.Components.Docking命名空间,在下文中一共展示了DockFrame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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 (); };
}
示例3: DockContainer
public DockContainer(DockFrame frame)
{
Mono.TextEditor.GtkWorkarounds.FixContainerLeak (this);
this.Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask;
this.frame = frame;
}
示例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 (); };
}
示例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++;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}