NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This class represents a splitter window, which can controlled using a floating point proportion instead of absolute values. More...
#include <wxProportionalSplitterWindow.h>
Public Member Functions | |
ProportionalSplitterWindow () | |
Default constructor. More... | |
ProportionalSplitterWindow (wxWindow *parent, wxWindowID id=wxID_ANY, float proportion=0.5f, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSP_3D) | |
Construct a proportional splitter window using a set of parameters. More... | |
virtual bool | SplitHorizontally (wxWindow *window1, wxWindow *window2, float proportion=0) |
Split this window horizontally using the selected porportion. More... | |
virtual bool | SplitVertically (wxWindow *window1, wxWindow *window2, float proportion=0) |
Split this window vertically using the selected porportion. More... | |
void | SetSashPositionFloat (float proportion) |
Set the sash position using a floating point proportion. More... | |
void | OnSize (wxSizeEvent &event) |
Handle the window size event. Will automatically adapt the sash position to achieve a multiple of a character height in window space. More... | |
void | OnSashPosChanged (wxSplitterEvent &event) |
Handle the size event, when the sash position has been changed. Will automatically adapt the sash position to achieve a multiple of a character height in window space. More... | |
float | GetSplitPercentage () |
Return the current splitting proportion. More... | |
void | SetCharHeigth (int _charheight) |
Change the character height in pixels. More... | |
Private Types | |
enum | { MIN_PANE_SIZE = 1 } |
Private Member Functions | |
bool | isHorizontal () const |
Return true, if the splitter is horizontal. More... | |
float | parentSize () const |
Return the free space of the parent as a floating point number. Considers the orientation of the splitter. More... | |
int | initSplitSize (float proportion, bool isHorizontal) |
Calculates the initial sash position after splitting the window. More... | |
Private Attributes | |
float | splitPercent_ |
int | m_charHeight |
bool | m_defaultHeight |
This class represents a splitter window, which can controlled using a floating point proportion instead of absolute values.
Definition at line 24 of file wxProportionalSplitterWindow.h.
|
private |
Enumerator | |
---|---|
MIN_PANE_SIZE |
Definition at line 26 of file wxProportionalSplitterWindow.h.
|
inline |
Default constructor.
Definition at line 32 of file wxProportionalSplitterWindow.h.
|
inline |
Construct a proportional splitter window using a set of parameters.
parent | wxWindow* |
id | wxWindowID |
proportion | float |
pos | const wxPoint& |
size | const wxSize& |
style | long |
Definition at line 47 of file wxProportionalSplitterWindow.h.
References m_charHeight, m_defaultHeight, MIN_PANE_SIZE, OnSashPosChanged(), OnSize(), and splitPercent_.
|
inline |
Return the current splitting proportion.
Definition at line 182 of file wxProportionalSplitterWindow.h.
References splitPercent_.
Referenced by NumeReWindow::OnClose(), NumeReWindow::OnOptions(), NumeReWindow::toggleConsole(), and NumeReWindow::toggleHistory().
|
inlineprivate |
Calculates the initial sash position after splitting the window.
proportion | float |
isHorizontal | bool |
Definition at line 237 of file wxProportionalSplitterWindow.h.
References isHorizontal(), m_charHeight, m_defaultHeight, parentSize(), mu::rint(), and splitPercent_.
Referenced by SetSashPositionFloat(), SplitHorizontally(), and SplitVertically().
|
inlineprivate |
Return true, if the splitter is horizontal.
Definition at line 208 of file wxProportionalSplitterWindow.h.
Referenced by initSplitSize(), parentSize(), and SetSashPositionFloat().
|
inline |
Handle the size event, when the sash position has been changed. Will automatically adapt the sash position to achieve a multiple of a character height in window space.
event | wxSplitterEvent& |
Definition at line 161 of file wxProportionalSplitterWindow.h.
References m_charHeight, m_defaultHeight, parentSize(), mu::rint(), and splitPercent_.
Referenced by ProportionalSplitterWindow().
|
inline |
Handle the window size event. Will automatically adapt the sash position to achieve a multiple of a character height in window space.
event | wxSizeEvent& |
Definition at line 130 of file wxProportionalSplitterWindow.h.
References m_charHeight, m_defaultHeight, parentSize(), mu::rint(), and splitPercent_.
Referenced by ProportionalSplitterWindow().
|
inlineprivate |
Return the free space of the parent as a floating point number. Considers the orientation of the splitter.
Definition at line 221 of file wxProportionalSplitterWindow.h.
References isHorizontal().
Referenced by initSplitSize(), OnSashPosChanged(), and OnSize().
|
inline |
Change the character height in pixels.
_charheight | int |
Definition at line 194 of file wxProportionalSplitterWindow.h.
References m_charHeight.
Referenced by NumeReWindow::NumeReWindow(), and NumeReWindow::OnOptions().
|
inline |
Set the sash position using a floating point proportion.
proportion | float |
Definition at line 114 of file wxProportionalSplitterWindow.h.
References initSplitSize(), and isHorizontal().
Referenced by NumeReWindow::NumeReWindow(), and NumeReWindow::OnOptions().
|
inlinevirtual |
Split this window horizontally using the selected porportion.
window1 | wxWindow* |
window2 | wxWindow* |
proportion | float |
Definition at line 84 of file wxProportionalSplitterWindow.h.
References initSplitSize().
Referenced by NumeReWindow::toggleConsole(), and NumeReWindow::UpdateTerminalNotebook().
|
inlinevirtual |
Split this window vertically using the selected porportion.
window1 | wxWindow* |
window2 | wxWindow* |
proportion | float |
Definition at line 100 of file wxProportionalSplitterWindow.h.
References initSplitSize().
Referenced by NumeReWindow::toggleHistory(), and NumeReWindow::UpdateTerminalNotebook().
|
private |
Definition at line 281 of file wxProportionalSplitterWindow.h.
Referenced by initSplitSize(), OnSashPosChanged(), OnSize(), ProportionalSplitterWindow(), and SetCharHeigth().
|
private |
Definition at line 282 of file wxProportionalSplitterWindow.h.
Referenced by initSplitSize(), OnSashPosChanged(), OnSize(), and ProportionalSplitterWindow().
|
private |
Definition at line 280 of file wxProportionalSplitterWindow.h.
Referenced by GetSplitPercentage(), initSplitSize(), OnSashPosChanged(), OnSize(), and ProportionalSplitterWindow().