Example #1
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnHasBeenHidden method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnHasBeenHidden in a derived class, be sure to
  * call the base class's \b OnHasBeenHidden method so that registered delegates
  * receive the event.  */
 protected virtual void OnHasBeenHidden(ToolboxEventArgs e)
 {
     if (HasBeenHidden != null)
     {
         HasBeenHidden(this, e);
     }
 }
Example #2
0
 public override void Dispatch(ToolboxEventArgs e)
 {
     if (e.Header.EventCode == Event && StateChange != null)
     {
         OnStateChange(new StateChangeEventArgs(this, e.RawEventData));
     }
 }
Example #3
0
 public override void Dispatch(ToolboxEventArgs e)
 {
     if (e.Header.EventCode == EventCode.ValueChanged)
     {
         OnValueChange(new ValueChangeEventArgs(e.RawEventData));
     }
 }
Example #4
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnClickSetUp method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnClickSetUp in a derived class, be sure to
  * call the base class's \b OnClickSetUp method so that registered delegates
  * receive the event.  */
 protected virtual void OnClickSetUp(ToolboxEventArgs e)
 {
     if (ClickSetUp != null)
     {
         ClickSetUp(this, e);
     }
 }
Example #5
0
 protected virtual void OnClickQuit(ToolboxEventArgs e)
 {
     if (ClickQuit != null)
     {
         ClickQuit(this, e);
     }
 }
Example #6
0
 protected virtual void OnSelection(ToolboxEventArgs e)
 {
     if (Selection != null)
     {
         Selection(this, e);
     }
 }
Example #7
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnClickDiscard method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnClickDiscard in a derived class, be sure to
  * call the base class's \b OnClickDiscard method so that registered delegates
  * receive the event.  */
 protected virtual void OnClickDiscard(ToolboxEventArgs e)
 {
     if (ClickDiscard != null)
     {
         ClickDiscard(this, e);
     }
 }
Example #8
0
            /*! \brief Check if the given event is relevant to the DCS Dialogue and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.DialogueCompleted:
                    OnDialogueCompleted(e);
                    break;

                case EventCode.Save:
                    OnClickSave(e);
                    break;

                case EventCode.Cancel:
                    OnClickCancel(e);
                    break;

                case EventCode.Discard:
                    OnClickDiscard(e);
                    break;
                }
            }
Example #9
0
            /*! \brief Check if the given event is relevant to the Print Dialogue and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.DialogueCompleted:
                    OnDialogueCompleted(e);
                    break;

                case EventCode.SetUpAboutToBeShown:
                    OnSetUpAboutToBeShown(new SetUpAboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.Save:
                    OnClickSave(new PrintSaveEventArgs(e.RawEventData));
                    break;

                case EventCode.Print:
                    OnClickPrint(new PrintSaveEventArgs(e.RawEventData));
                    break;

                case EventCode.SetUp:
                    OnClickSetUp(e);
                    break;
                }
            }
Example #10
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnClickSave method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnClickSave in a derived class, be sure to
  * call the base class's \b OnClickSave method so that registered delegates
  * receive the event.  */
 protected virtual void OnClickSave(ToolboxEventArgs e)
 {
     if (ClickSave != null)
     {
         ClickSave(this, e);
     }
 }
Example #11
0
 public override void Dispatch(ToolboxEventArgs e)
 {
     if (e.Header.EventCode == Event)
     {
         OnClick(new ClickEventArgs(e.RawEventData));
     }
 }
Example #12
0
 /*! \brief Check if the given event is relevant to the %PopupMenu gadget and call the
  * associated event handlers.  */
 public override void Dispatch(ToolboxEventArgs e)
 {
     if (e.Header.EventCode == EventCode.AboutToBeShown)
     {
         OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
     }
 }
Example #13
0
 protected virtual void OnClickCancel(ToolboxEventArgs e)
 {
     if (ClickCancel != null)
     {
         ClickCancel(this, e);
     }
 }
Example #14
0
 protected virtual void OnDialogueCompleted(ToolboxEventArgs e)
 {
     if (DialogueCompleted != null)
     {
         DialogueCompleted(this, e);
     }
 }
Example #15
0
            /*! \brief Check if the given event is relevant to the %Iconbar object and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                if (e.Header.EventCode == SelectClickEvent)
                {
                    OnSelectClick(e);
                }
                else if (e.Header.EventCode == AdjustClickEvent)
                {
                    OnAdjustClick(e);
                }
                else
                {
                    switch (e.Header.EventCode)
                    {
                    case EventCode.Clicked:
                        OnClick(new ClickEventArgs(e.RawEventData));
                        break;

                    case EventCode.SelectAboutToBeShown:
                        OnSelectClickAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                        break;

                    case EventCode.AdjustAboutToBeShown:
                        OnAdjustClickAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                        break;
                    }
                }
            }
Example #16
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnAdjustClick method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnAdjustClick in a derived class, be sure to
  * call the base class's \b OnAdjustClick method so that registered delegates
  * receive the event.  */
 protected virtual void OnAdjustClick(ToolboxEventArgs e)
 {
     if (AdjustClick != null)
     {
         AdjustClick(this, e);
     }
 }
Example #17
0
 /*! \brief Raising an event invokes the event handler through a delegate.
  *
  * The \b OnSelectClick method also allows derived classes to handle the
  * event without attaching a delegate. This is the preferred technique for
  * handling the event in a derived class.
  * \note  When overriding \b OnSelectClick in a derived class, be sure to
  * call the base class's \b OnSelectClick method so that registered delegates
  * receive the event.  */
 protected virtual void OnSelectClick(ToolboxEventArgs e)
 {
     if (SelectClick != null)
     {
         SelectClick(this, e);
     }
 }
Example #18
0
            public override void Dispatch(ToolboxEventArgs e)
            {
                uint selection_event_code = ClickEvent;

                if (selection_event_code == 0)
                {
                    selection_event_code = EventCode.Selection;
                }

                uint submenu_event_code = SubMenuEvent;

                if (submenu_event_code == 0)
                {
                    submenu_event_code = EventCode.SubMenu;
                }

                if (e.Header.EventCode == selection_event_code)
                {
                    OnSelection(e);
                }
                else if (e.Header.EventCode == submenu_event_code)
                {
                    OnSubMenu(new SubMenuEventArgs(e.RawEventData));
                }
            }
Example #19
0
 protected virtual void OnAboutToBeShown(ToolboxEventArgs e)
 {
     if (AboutToBeShown != null)
     {
         AboutToBeShown(this, e);
     }
 }
Example #20
0
            public virtual void Dispatch(ToolboxEventArgs e)
            {
                var id_block = ToolboxTask.GetIDBlock();
                var gadget   = GetGadget(id_block.SelfCmp);

                if (gadget == null)
                {
                    return;
                }

                gadget.Dispatch(e);
            }
Example #21
0
            /*! \brief Check if the given event is relevant to the %Draggable gadget and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.DragStarted:
                    OnDragStart(new DragStartEventArgs(e.RawEventData));
                    break;

                case EventCode.DragEnded:
                    OnDragEnd(new DragEndEventArgs(e.RawEventData));
                    break;
                }
            }
Example #22
0
            /*! \brief Check if the given event is relevant to the StringSet and call the associated
             * event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.ValueChanged:
                    OnValueChange(new ValueChangeEventArgs(e.RawEventData));
                    break;

                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(e);
                    break;
                }
            }
Example #23
0
 public override void Dispatch(ToolboxEventArgs e)
 {
     if (e.Header.EventCode == AboutToBeShownEventCode)
     {
         OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
     }
     else if (e.Header.EventCode == HasBeenHiddenEventCode)
     {
         OnHasBeenHidden(e);
     }
     else
     {
         base.Dispatch(e);
     }
 }
Example #24
0
            /*! \brief Check if the given event is relevant to the Colour Dialogue and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.DialogueCompleted:
                    OnDialogueCompleted(new DialogueCompletedEventArgs(e.RawEventData));
                    break;

                case EventCode.ColourSelected:
                    OnColourSelected(new ColourSelectedEventArgs(e.RawEventData));
                    break;
                }
            }
Example #25
0
            /*! \brief Check if the given event is relevant to the Font Dialogue and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(new AboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.DialogueCompleted:
                    OnDialogueCompleted(e);
                    break;

                case EventCode.ApplyFont:
                    OnApplyFont(new ApplyFontEventArgs(e.RawEventData));
                    break;
                }
            }
Example #26
0
            /*! \brief Check if the given event is relevant to the Colour Menu and call the
             * associated event handlers.  */
            public override void Dispatch(ToolboxEventArgs e)
            {
                switch (e.Header.EventCode)
                {
                case EventCode.AboutToBeShown:
                    OnAboutToBeShown(new MenuAboutToBeShownEventArgs(e.RawEventData));
                    break;

                case EventCode.HasBeenHidden:
                    OnHasBeenHidden(e);
                    break;

                case EventCode.Selection:
                    OnSelection(new SelectionEventArgs(e.RawEventData));
                    break;
                }
            }
Example #27
0
 public virtual void Dispatch(ToolboxEventArgs e)
 {
 }