Exemple #1
0
 void UpdateButton(ButtonBarButton b, CommandInfo ci)
 {
     if (ci.Icon != b.Image) {
         b.Image = ci.Icon;
         QueueDraw ();
     }
     if (ci.Visible != b.Visible) {
         b.Visible = ci.Visible;
         visibleButtons = null;
         QueueResize ();
     }
     if (ci.Enabled != b.Enabled) {
         b.Enabled = ci.Enabled;
         QueueDraw ();
     }
     if (ci.Description != b.Tooltip)
         b.Tooltip = ci.Description;
 }
Exemple #2
0
 public void AddSeparator()
 {
     buttons.Add (new ButtonBarButton (null));
     visibleButtons = null;
     QueueResize ();
 }
Exemple #3
0
 public void Clear()
 {
     buttons.Clear ();
     visibleButtons = null;
     pushedButton = null;
     QueueResize ();
 }
Exemple #4
0
 public void Add(string commandId)
 {
     ButtonBarButton b = new ButtonBarButton (commandId);
     var ci = IdeApp.CommandService.GetCommandInfo (commandId, new CommandTargetRoute (lastCommandTarget));
     if (ci != null)
         UpdateButton (b, ci);
     buttons.Add (b);
     visibleButtons = null;
     QueueResize ();
 }