MatOCAD Logo

Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

wxIFMComponentButtonManager Class Reference

Class for managing small buttons that appear for a component. More...

#include <definterface.h>

Collaboration diagram for wxIFMComponentButtonManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 wxIFMComponentButtonManager (wxIFMInterfacePluginBase *ip, wxIFMComponent *component)
 ~wxIFMComponentButtonManager ()
wxIFMInterfacePluginBase * GetIP ()
wxIFMComponent * GetComponent ()
wxIFMComponentButton * AddButton (int id)
 Adds a button to this button manager.
void RemoveButton (int id)
 Removes (and deletes) button from this manager.
wxIFMComponentButton * GetButton (int id)
const wxRect GetRect () const
const wxPoint & GetPosition () const
void SetPosition (const wxPoint &pos)
void SetHeight (int height)
void Show (bool show=true)
void Hide ()
void Show (bool show, int id)
void SetParent (wxWindow *parent)
void Layout ()

Public Attributes

wxIFMComponentButtonArray m_buttons

Private Attributes

wxPoint m_pos
int m_height
wxIFMInterfacePluginBase * m_ip
wxIFMComponent * m_component
bool m_hidden

Detailed Description

Class for managing small buttons that appear for a component.

Warning:
The api for this class will change in an incompatible way before the next release
Todo:
Make this class be able to position buttons horizontally or vertically

Definition at line 321 of file definterface.h.


Constructor & Destructor Documentation

wxIFMComponentButtonManager::wxIFMComponentButtonManager (  wxIFMInterfacePluginBase *  ip,
wxIFMComponent *  component
) 
 

Definition at line 2619 of file definterface.cpp.

wxIFMComponentButtonManager::~wxIFMComponentButtonManager (   ) 
 

Definition at line 2626 of file definterface.cpp.


Member Function Documentation

wxIFMComponentButton * wxIFMComponentButtonManager::AddButton (  int  id  ) 
 

Adds a button to this button manager.

Parameters:
id ID of the button to add
Returns:
Pointer to the button created

Definition at line 2651 of file definterface.cpp.

References wxIFMComponent::GetParentWindow(), IFM_COMPONENT_BUTTON_X, IFM_COMPONENT_BUTTON_Y, m_buttons, and m_component.

Referenced by wxIFMDefaultPanelPlugin::OnCreateComponent().

wxIFMComponentButton * wxIFMComponentButtonManager::GetButton (  int  id  ) 
 

Returns the button with the requested id

Definition at line 2684 of file definterface.cpp.

References m_buttons.

Referenced by Show().

wxIFMComponent * wxIFMComponentButtonManager::GetComponent (   ) 
 

Definition at line 2636 of file definterface.cpp.

References m_component.

Referenced by wxIFMComponentButton::OnLeftUp().

wxIFMInterfacePluginBase * wxIFMComponentButtonManager::GetIP (   ) 
 

Definition at line 2631 of file definterface.cpp.

References m_ip.

Referenced by wxIFMComponentButton::GetIP().

const wxPoint & wxIFMComponentButtonManager::GetPosition (   )  const
 

Returns:
Position of this button manager

Definition at line 2641 of file definterface.cpp.

References m_pos.

const wxRect wxIFMComponentButtonManager::GetRect (   )  const
 

Returns:
The rect that this button manager occupies

Definition at line 2698 of file definterface.cpp.

References IFM_COMPONENT_BUTTON_PAD, m_buttons, m_height, and m_pos.

Referenced by wxIFMDefaultPanelPlugin::OnUpdate().

void wxIFMComponentButtonManager::Hide (   ) 
 

Definition at line 2646 of file definterface.cpp.

References Show().

Referenced by wxIFMDefaultPanelPlugin::OnDestroyComponent().

void wxIFMComponentButtonManager::Layout (   ) 
 

Used to position the component buttons

Definition at line 2738 of file definterface.cpp.

References IFM_COMPONENT_BUTTON_PAD, IFM_COMPONENT_BUTTON_X, m_buttons, m_hidden, and m_pos.

Referenced by wxIFMDefaultPanelPlugin::OnUpdate().

void wxIFMComponentButtonManager::RemoveButton (  int  id  ) 
 

Removes (and deletes) button from this manager.

Parameters:
id ID of the button to remove

Definition at line 2664 of file definterface.cpp.

References m_buttons.

void wxIFMComponentButtonManager::SetHeight (  int  height  ) 
 

Sets the height (and indirectly the size of all buttons) of this button manager

Note:
The default height if IFM_CAPTION_HEIGHT

Definition at line 2721 of file definterface.cpp.

References IFM_COMPONENT_BUTTON_X, IFM_COMPONENT_BUTTON_Y, m_buttons, and m_height.

void wxIFMComponentButtonManager::SetParent (  wxWindow *  parent  ) 
 

Used to change the parent window of the buttons. Called during FLOATNOTIFY processing

Definition at line 2730 of file definterface.cpp.

References m_buttons.

void wxIFMComponentButtonManager::SetPosition (  const wxPoint &  pos  ) 
 

Sets the position of this button manager

Definition at line 2716 of file definterface.cpp.

References m_pos.

Referenced by wxIFMDefaultPanelPlugin::OnCreateComponent(), and wxIFMDefaultPanelPlugin::OnUpdate().

void wxIFMComponentButtonManager::Show (  bool  show,
int  id
) 
 

Shows or hides only the component with the given i

Parameters:
id Button to show or hide

Definition at line 2765 of file definterface.cpp.

References GetButton().

void wxIFMComponentButtonManager::Show (  bool  show = true  ) 
 

Used to show or hide the component buttons

Definition at line 2755 of file definterface.cpp.

References m_buttons, and m_hidden.

Referenced by Hide(), and wxIFMDefaultPanelPlugin::OnVisibilityChanged().


Member Data Documentation

wxIFMComponentButtonArray wxIFMComponentButtonManager::m_buttons
 

Definition at line 332 of file definterface.h.

Referenced by AddButton(), GetButton(), GetRect(), Layout(), RemoveButton(), SetHeight(), SetParent(), and Show().

wxIFMComponent* wxIFMComponentButtonManager::m_component [private]
 

Definition at line 327 of file definterface.h.

Referenced by AddButton(), and GetComponent().

int wxIFMComponentButtonManager::m_height [private]
 

Definition at line 325 of file definterface.h.

Referenced by GetRect(), and SetHeight().

bool wxIFMComponentButtonManager::m_hidden [private]
 

Definition at line 328 of file definterface.h.

Referenced by Layout(), and Show().

wxIFMInterfacePluginBase* wxIFMComponentButtonManager::m_ip [private]
 

Definition at line 326 of file definterface.h.

Referenced by GetIP().

wxPoint wxIFMComponentButtonManager::m_pos [private]
 

Definition at line 324 of file definterface.h.

Referenced by GetPosition(), GetRect(), Layout(), and SetPosition().


The documentation for this class was generated from the following files:

 

SourceForge Logo