Derived from: BView
Declared in: SplitPane.h
Library: NONE
Allocation: Constructor only
Summary
A SplitPane if exactly what you think it is. It s View that has been split,
you can add two Views to it. This is nice for things like Mail/News readers
or something like ImageShow.
(Which this class was originaly writen for) So it has lots of usefull stuff.
Now how do you use it. Well, ok. Its prity simple. You creat two view that you want
to be the left/right or top/bottom. Then you creat the SplitPane with them
as parameters. By defualt the split pane is B_VERTICAL (meaning the bar gets moved
left/right). If you want to change that you can SetAlignment().
BView *ViewOne;
BView *ViewTwo;
...
BRect b = Bounds();
SplitPane *SP = new SplitPane(b,ViewOne,ViewTwo,B_FOLLOW_ALL_SIDES);
SP->SetAlignment(B_HORIZONTAL);
AddChild(SP);
Thats prity much it. All the B_FOLLOW_this that or the other is handeld by the
splitpane. Also if as you can see you can change between Horizontal and Vertical
layout pritty easy (SetAlignment). There is also lots of nice little methods that
let you change things like the size of the Bar or programaticly change its location.
And if all of this is not enought. YOU HAVE THE SOURCE. hehe. So if you don't like
how somethig is done or you want to change something - you can. Now a quick note
on useing my/changed source in your programs. I dont realy care if you use this
or not. But if you do use it please give credit on some readme some place. I realy
Have worked hard on all this and the docs too.
Changeing the source - If you feel that there is a bug (which there are) or you feel
that some BIG mistake has been made or mabey you just want to fix up something and
make it much better than I did. Wonderfull. One thing. Send me your updates so that
I can put them all together so the main source stays up-to-date. We should all benifit
from features people add. Thanks again for you time.
YNOP
SplitPane(BRect frame,
BView *one,
BView *two,
uint32 Mode
) |
AddChildOne(BView *one) AddChildTwo(BView *two) |
void SetAlignment(uint a
) uint GetAlignment( ) |
void SetBarPosition(int i
) int GetBarPosition( ) |
void SetBarThickness(int i
) int GetBarThickness( ) |
void SetJump(int i
) int GetJump( ) |
bool HasViewOne(
) bool HasViewTwo( ) |
void SetViewOneDetachable(bool b
) void SetViewTwoDetachable(bool b ) bool SetViewOneDetachable( ) bool SetViewTwoDetachable( ) |
void SetEditable(bool b
) bool SetEditable( ) |
void SetViewInsetBy(int i
) int GetViewInsetBy( ) |
void SetMinSizeOne(int i
) void SetMinSizeTwo(int i ) int GetMinSizeOne( ) int GetMinSizeTwo( ) |
void SetBarLocked(bool b
) bool IsBarLocked( ) |
void SetBarAlignmentLocked(bool b
) bool IsBarAlignmentLocked( ) |
void SetState(BMessage *state
) BMessage* GetState( ) |