Inheritance diagram for os::Splitter:
Public Member Functions | |
Splitter (const Rect &cFrame, const String &cTitle, View *pView1, View *pView2, orientation eOrientation=HORIZONTAL, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND) | |
Spliter constructor. | |
virtual | ~Splitter () |
virtual void | SplitChanged () |
Hook called when the split bar position has changed. | |
void | SetSplitRatio (float vRatio) |
Set split ratio. | |
float | GetSplitRatio () const |
Get split ratio. | |
void | SetSplitLimits (float fMinSize1=0, float fMinSize2=0) |
Set limits in the position of the split bar. | |
void | SetOrientation (os::orientation eOrientation) |
View * | SeparatorView () const |
Get the separator view. | |
float | GetSplitPosition () const |
Return the separator position. | |
float | GetSeparatorWidth () const |
Return the separator width. | |
void | SetSeparatorWidth (float fWidth) |
Set the separator width. | |
void | AdjustLayout () |
Refresh the layout of the splitter. | |
void | SplitBy (float fValue) |
Change the position of the split bar. | |
void | SplitTo (float fValue) |
Set the position of the split bar. | |
virtual void | MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData) |
Hook called by the system when the mouse is moved. | |
virtual void | MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData) |
Hook called by the system when a mouse button is release. | |
virtual void | KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers) |
Hook called by the system when a key is pressed while the view has focus. | |
virtual void | FrameSized (const Point &cDelta) |
Virtual hook called by the system when the view is resized. | |
virtual os::Point | GetPreferredSize (bool bLargest) const |
Friends | |
class | os_priv::SplitterSeparator |
Classes | |
class | Private |
The Splitter resizes its subviews so that each subview is the same width (or height) as the Splitter view, and the total of the subviews' heights (or widths), plus the separator's thicknesses, is equal to the height (or width) of the Splitter. The Splitter positions its subviews so that the first subview is at the top (or left) of the Splitter frame. The user can set the height (or width) of two subviews by moving a horizontal (or vertical) bar called the separator, which makes one subview smaller and the other larger.
Splitter::Splitter | ( | const Rect & | cFrame, | |
const String & | cTitle, | |||
View * | pView1, | |||
View * | pView2, | |||
orientation | eOrientation = HORIZONTAL , |
|||
uint32 | nResizeMask = CF_FOLLOW_LEFT|CF_FOLLOW_TOP , |
|||
uint32 | nFlags = WID_WILL_DRAW|WID_CLEAR_BACKGROUND | |||
) |
Splitter::~Splitter | ( | ) | [virtual] |
void Splitter::SplitChanged | ( | ) | [virtual] |
void Splitter::SetSplitRatio | ( | float | vRatio | ) |
vRatio | The ratio View1 / (View1 + View2) |
float Splitter::GetSplitRatio | ( | ) | const |
void Splitter::SetSplitLimits | ( | float | fMinSize1 = 0 , |
|
float | fMinSize2 = 0 | |||
) |
nMinSize1 | minimal size that can take the top(left) view | |
nMinSize2 | minimal size that can take the bottom(right) view |
void os::Splitter::SetOrientation | ( | os::orientation | eOrientation | ) |
View * Splitter::SeparatorView | ( | ) | const |
\return |
float Splitter::GetSplitPosition | ( | ) | const |
\return | the top(left) view height(width) |
float Splitter::GetSeparatorWidth | ( | ) | const |
\return |
void Splitter::SetSeparatorWidth | ( | float | fWidth | ) |
\return |
void Splitter::AdjustLayout | ( | ) |
\return |
void Splitter::SplitBy | ( | float | fValue | ) |
fValue | relative value of the deplacement |
void Splitter::SplitTo | ( | float | fValue | ) |
fValue | new height(width) of the top(left) view |
void Splitter::MouseMove | ( | const Point & | cNewPos, | |
int | nCode, | |||
uint32 | nButtons, | |||
Message * | pcData | |||
) | [virtual] |
cNewPos | New mouse position given in the views coordinate system. | |
nCode | Enter/exit code. This is MOUSE_ENTERED when the mouse first enter the view, MOUSE_EXITED when the mouse leaves the view, MOUSE_INSIDE whenever the mouse move withing the boundary of the view and MOUSE_OUTSIDE when the mouse move outside the view (will only happen if the view has focus). | |
nButtons | Bitmask telling which buttons that are currently pressed. Bit 0 is button 1 (left), bit 1 is button 2 (right), and bit 2 is button 3 (middle), and so on. | |
pcData | Pointer to a Message object containing the dragged data if the user is in the middle of a drag and drop operation. Otherwise this pointer is NULL. Look at BeginDrag() for a more detailed description of the drag and drop system. |
Reimplemented from os::View.
pcData
member will point to a Message containing the dragged data. Look at BeginDrag() for a more detailed description of the drag and drop system. cPosition | Mouse position in the views coordinate system at the time the mouse was pressed. | |
nButtons | Index of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up. | |
pcData | Pointer to a Message object containing the dragged data if this mouse-up was the end of a drag and drop operation. If no data was dragged it will be NULL. |
Reimplemented from os::View.
void Splitter::KeyDown | ( | const char * | pzString, | |
const char * | pzRawString, | |||
uint32 | nQualifiers | |||
) | [virtual] |
pzString | String containing a single UTF-8 encoded character. This is the character generated by the pressed key according to the current keymap accounting for any qualifiers that might be pressed. | |
pzRawString | Same as pzString except that the key is converted without accounting for qualifiers. Ie. if 'A' is pressed while pressing <SHIFT> pzString will contain 'A' and pzRawString will contain 'a'. | |
nQualifiers | Bitmask describing which qualifiers that was active when the key was pressed. |
Reimplemented from os::View.
void Splitter::FrameSized | ( | const Point & | cDelta | ) | [virtual] |
cDelta
calue from the current size. cDelta | The distance the bottom/right corner was moved relative to the upper/left corner. |
Reimplemented from os::View.
friend class os_priv::SplitterSeparator [friend] |