本文整理汇总了C#中MonoDevelop.Ide.Codons.PadCodon类的典型用法代码示例。如果您正苦于以下问题:C# PadCodon类的具体用法?C# PadCodon怎么用?C# PadCodon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PadCodon类属于MonoDevelop.Ide.Codons命名空间,在下文中一共展示了PadCodon类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Pad
internal Pad (DefaultWorkbench workbench, PadCodon content)
{
this.window = workbench.GetPadWindow (content);
this.window.PadHidden += delegate {
IsOpenedAutomatically = false;
};
this.content = content;
this.workbench = workbench;
}
示例2: IsVisible
public bool IsVisible(PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
if (item != null)
return item.Visible;
return false;
}
示例3: IsSticky
public bool IsSticky(PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
return item != null && (item.Behavior & DockItemBehavior.Sticky) != 0;
}
示例4: HidePad
public void HidePad(PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
if (item != null)
item.Visible = false;
}
示例5: GetPadWindow
public IPadWindow GetPadWindow(PadCodon content)
{
IPadWindow w;
padWindows.TryGetValue (content, out w);
return w;
}
示例6: AddPad
void AddPad(PadCodon content, bool show)
{
DockItem item = GetDockItem (content);
if (padContentCollection.Contains (content)) {
if (show && item != null)
item.Visible = true;
return;
}
if (item != null) {
if (show)
item.Visible = true;
} else {
AddPad (content, content.DefaultPlacement, content.DefaultStatus);
}
}
示例7: ActivatePad
public void ActivatePad(PadCodon padContent, bool giveFocus)
{
WelcomePage.WelcomePageService.HideWelcomePage ();
DockItem item = GetDockItem (padContent);
if (item != null)
item.Present (giveFocus);
}
示例8: ShowPad
public void ShowPad(PadCodon content)
{
AddPad (content, true);
}
示例9: RegisterPad
void RegisterPad(PadCodon content)
{
if (content.HasId) {
string lab = content.Label.Length > 0 ? GettextCatalog.GetString (content.Label) : "";
ActionCommand cmd = new ActionCommand ("Pad|" + content.PadId, lab, null);
cmd.DefaultHandler = new PadActivationHandler (this, content);
cmd.Category = GettextCatalog.GetString ("View");
cmd.Description = GettextCatalog.GetString ("Show {0}", cmd.Text);
IdeApp.CommandService.RegisterCommand (cmd);
}
padContentCollection.Add (content);
}
示例10: PadActivationHandler
public PadActivationHandler(DefaultWorkbench wb, PadCodon pad)
{
this.pad = pad;
this.wb = wb;
}
示例11: CreatePadContent
void CreatePadContent(bool force, PadCodon padCodon, PadWindow window, DockItem item)
{
if (force || item.Content == null) {
IPadContent newContent = padCodon.InitializePadContent (window);
Gtk.Widget pcontent;
if (newContent is Widget) {
pcontent = newContent.Control;
} else {
PadCommandRouterContainer crc = new PadCommandRouterContainer (window, newContent.Control, newContent, true);
crc.Show ();
pcontent = crc;
}
PadCommandRouterContainer router = new PadCommandRouterContainer (window, pcontent, toolbarFrame, false);
router.Show ();
item.Content = router;
}
}
示例12: ActivatePad
public void ActivatePad (PadCodon padContent, bool giveFocus)
{
DockItem item = GetDockItem (padContent);
if (item != null)
item.Present (giveFocus);
}
示例13: CreatePadContent
void CreatePadContent (bool force, PadCodon padCodon, PadWindow window, DockItem item)
{
if (force || item.Content == null) {
PadContent newContent = padCodon.InitializePadContent (window);
Gtk.Widget crc = new PadCommandRouterContainer (window, newContent.Control, newContent, true);
crc.Show ();
Gtk.Widget router = new PadCommandRouterContainer (window, crc, toolbarFrame, false);
router.Show ();
item.Content = router;
}
}
示例14: RemovePad
public void RemovePad(PadCodon codon)
{
if (codon.HasId) {
Command cmd = IdeApp.CommandService.GetCommand (codon.Id);
if (cmd != null)
IdeApp.CommandService.UnregisterCommand (cmd);
}
DockItem item = GetDockItem (codon);
padContentCollection.Remove (codon);
PadWindow win = (PadWindow) GetPadWindow (codon);
if (win != null) {
win.NotifyDestroyed ();
Counters.PadsLoaded--;
padCodons.Remove (win);
}
if (item != null)
dock.RemoveItem (item);
padWindows.Remove (codon);
}
示例15: SetSticky
public void SetSticky(PadCodon padContent, bool sticky)
{
DockItem item = GetDockItem (padContent);
if (item != null) {
if (sticky)
item.Behavior |= DockItemBehavior.Sticky;
else
item.Behavior &= ~DockItemBehavior.Sticky;
}
}