a2dWidgetButtonCommand Class Reference

specialized a2dWidgetButton which processes a given a2dCommand More...

#include <canwidget.h>

Inheritance diagram for a2dWidgetButtonCommand:

Inheritance graph
[legend]
Collaboration diagram for a2dWidgetButtonCommand:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dWidgetButtonCommand (a2dCanvasObject *parent, int buttonId, double x, double y, double w, double h, WidgetMode mode=Boundingbox)
 Standard constructor.
 ~a2dWidgetButtonCommand ()
 destructor
void SetCanvasCommand (class a2dCommand *command)
 If set this command will be executed when the object is selected.
void SetEvent (wxEvent *event)
 If set this event will be triggered when the object is selected.
void SetClientData (wxClientData *clientData)
 Set a client data object owned by the command buton.

Protected Member Functions

void OnAnyChoice (wxCommandEvent &event)

Protected Attributes

class a2dCommandm_docviewCommand
wxEvent * m_event
wxClientData * m_clientData
 Client data (usually used for the event).


Detailed Description

specialized a2dWidgetButton which processes a given a2dCommand

/! rodo what is m_event doing?

Definition at line 213 of file canwidget.h.


Member Function Documentation

void a2dWidgetButtonCommand::SetCanvasCommand ( class a2dCommand command  ) 

If set this command will be executed when the object is selected.

If the document has a command processor, the command is sent to this command processor. Otherwise it is sent to the global a2dDocumentCommandProcessor

Definition at line 416 of file canwidget.cpp.

void a2dWidgetButtonCommand::SetEvent ( wxEvent *  event  ) 

If set this event will be triggered when the object is selected.

The event is owned and deleted by the widget. If the top level window of the app is a MDI frame, the command is sent to the active child windows of the MDI frane. Otherwise the command is sent to the top level window itself.

Definition at line 423 of file canwidget.cpp.

void a2dWidgetButtonCommand::SetClientData ( wxClientData *  clientData  )  [inline]

Set a client data object owned by the command buton.

This is used for events that need a wxClientData object. The event won't own or delete such an object but as the event is owned by the command button, the command button must take care of this also. The command button does not use this in any way, it simply deletes it, when it deletes the event.

Definition at line 241 of file canwidget.h.

void a2dWidgetButtonCommand::OnAnyChoice ( wxCommandEvent &  event  )  [protected]

todo, is undo info here needed, e.g. what is the inverse of command/event sent around.?

Definition at line 431 of file canwidget.cpp.


Member Data Documentation

See also:
SetCanvasCommand

Definition at line 256 of file canwidget.h.

wxEvent* a2dWidgetButtonCommand::m_event [protected]

See also:
SetEvent

Definition at line 258 of file canwidget.h.


The documentation for this class was generated from the following files:
a2dWidgetButtonCommand Class Reference -- Tue Aug 31 18:38:15 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation