MatOCAD Logo

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

wxIFMCalcRectsEvent Class Reference

Used to calculate the sizes and positions of children of a given component. More...

#include <events.h>

List of all members.

Public Member Functions

 wxIFMCalcRectsEvent (wxIFMComponent *component, const wxRect &rect=IFM_DEFAULT_RECT)
void SetComponentRect (int index, const wxRect &rect)
const wxRectArrayGetComponentRects ()
const wxSizeArrayGetMinSizes ()
const wxSizeArrayGetMaxSizes ()
void AddComponent (wxIFMComponent *component)
const wxIFMComponentArray & GetComponents ()
const wxRect & GetRect ()

Private Attributes

wxRectArray m_rects
wxSizeArray m_min
wxSizeArray m_max
wxIFMComponentArray m_components
wxRect m_rect


Detailed Description

Used to calculate the sizes and positions of children of a given component.

Because this event contains the components the parent should size, components that are not actually children of this component can have sizes calculated as if they were. This is used by the dragndrop plugin to preview the result of a dock operation.

The constructors rect argument optionally specifies a rectangle to use for the calculations. The default argument implies that the components current client rect will be used.

When this event is sent, m_rects will be initialized with the desired sizes of the components contained in m_components. There will be as many elements in m_rects as there are in m_components. Only read access is given for m_components, however, partial write access is given to m_rect along side write access. While processing this event, you set the size you calculated for a component by call SetComponentSize() and passing the index of the component you are setting the size for.

You add components that you would like to size by this event by calling AddComponent().

Definition at line 734 of file events.h.


Constructor & Destructor Documentation

wxIFMCalcRectsEvent::wxIFMCalcRectsEvent wxIFMComponent component,
const wxRect &  rect = IFM_DEFAULT_RECT
 

wxIFMCalcRectsEvent implementation

Definition at line 162 of file events.cpp.

References wxIFMComponent::GetClientRect(), IFM_DEFAULT_RECT, and m_rect.


Member Function Documentation

void wxIFMCalcRectsEvent::AddComponent wxIFMComponent component  ) 
 

Adds a component to be sized by this event. The order in which components are added defines the order they will be positioned

Definition at line 175 of file events.cpp.

References wxIFMComponent::GetDesiredSize(), wxIFMComponent::GetMaxSize(), wxIFMComponent::GetMinSize(), m_components, m_max, m_min, and m_rects.

Referenced by wxIFMDefaultContainerPlugin::OnUpdate(), and wxIFMDefaultResizePlugin::ResizeComponent().

const wxRectArray & wxIFMCalcRectsEvent::GetComponentRects  ) 
 

Returns:
The component rect array containing calculated sizes and positions

Definition at line 183 of file events.cpp.

References m_rects.

Referenced by wxIFMDefaultPlugin::OnCalcRects(), wxIFMDefaultContainerPlugin::OnUpdate(), and wxIFMDefaultResizePlugin::ResizeComponent().

const wxIFMComponentArray & wxIFMCalcRectsEvent::GetComponents  ) 
 

Returns:
Components being sized

Definition at line 198 of file events.cpp.

References m_components.

Referenced by wxIFMDefaultPlugin::OnCalcRects().

const wxSizeArray & wxIFMCalcRectsEvent::GetMaxSizes  ) 
 

Returns:
Array containing the maximum sizes of the components being sized

Definition at line 193 of file events.cpp.

References m_max.

Referenced by wxIFMDefaultPlugin::OnCalcRects().

const wxSizeArray & wxIFMCalcRectsEvent::GetMinSizes  ) 
 

Returns:
Array containing the minimum sizes of the components being sized

Definition at line 188 of file events.cpp.

References m_min.

Referenced by wxIFMDefaultPlugin::OnCalcRects().

const wxRect & wxIFMCalcRectsEvent::GetRect  ) 
 

Returns:
Rect avaiable to size components in

Definition at line 203 of file events.cpp.

References m_rect.

Referenced by wxIFMDefaultPlugin::OnCalcRects().

void wxIFMCalcRectsEvent::SetComponentRect int  index,
const wxRect &  rect
 

Sets the component rect for the component at the given index

Definition at line 170 of file events.cpp.

References m_rects.

Referenced by wxIFMDefaultPlugin::OnCalcRects().


Member Data Documentation

wxIFMComponentArray wxIFMCalcRectsEvent::m_components [private]
 

Definition at line 739 of file events.h.

Referenced by AddComponent(), and GetComponents().

wxSizeArray wxIFMCalcRectsEvent::m_max [private]
 

Definition at line 738 of file events.h.

Referenced by AddComponent(), and GetMaxSizes().

wxSizeArray wxIFMCalcRectsEvent::m_min [private]
 

Definition at line 738 of file events.h.

Referenced by AddComponent(), and GetMinSizes().

wxRect wxIFMCalcRectsEvent::m_rect [private]
 

Definition at line 740 of file events.h.

Referenced by GetRect(), and wxIFMCalcRectsEvent().

wxRectArray wxIFMCalcRectsEvent::m_rects [private]
 

Definition at line 737 of file events.h.

Referenced by AddComponent(), GetComponentRects(), and SetComponentRect().


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

 

SourceForge Logo