More style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30349 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-04-23 18:29:58 +00:00
parent 3e3d7acb90
commit 5d2a1fb46e
+35 -30
View File
@@ -43,66 +43,71 @@ namespace BPrivate {
class ViewList : public BObjectList<BView> { class ViewList : public BObjectList<BView> {
public: public:
ViewList() ViewList()
: BObjectList<BView>(5, true) : BObjectList<BView>(5, true)
{} {}
void RemoveAll(BView *fromParent); void RemoveAll(BView* fromParent);
void AddAll(BView *toParent); void AddAll(BView* toParent);
}; };
class DialogPane : public BView { class DialogPane : public BView {
// dialog with collapsible panes // dialog with collapsible panes
public: public:
DialogPane(BRect mode1Frame, BRect mode2Frame, int32 initialMode, DialogPane(BRect mode1Frame, BRect mode2Frame,
const char *name, uint32 followFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP, int32 initialMode, const char* name,
uint32 flags = B_WILL_DRAW); uint32 followFlags
DialogPane(BRect mode1Frame, BRect mode2Frame, BRect mode3Frame, = B_FOLLOW_LEFT | B_FOLLOW_TOP,
int32 initialMode, const char *name, uint32 flags = B_WILL_DRAW);
uint32 followFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP, DialogPane(BRect mode1Frame, BRect mode2Frame,
uint32 flags = B_WILL_DRAW); BRect mode3Frame, int32 initialMode,
const char* name, uint32 followFlags
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW);
virtual ~DialogPane(); virtual ~DialogPane();
BRect FrameForMode(int32); BRect FrameForMode(int32);
BRect BoundsForMode(int32); BRect BoundsForMode(int32);
int32 Mode() const; int32 Mode() const;
virtual void SetMode(int32, bool initialSetup = false); virtual void SetMode(int32, bool initialSetup = false);
void AddItem(BView *, int32 toMode); void AddItem(BView*, int32 toMode);
void SetSwitch(BControl *); void SetSwitch(BControl*);
virtual void AttachedToWindow(); virtual void AttachedToWindow();
protected: protected:
void ResizeParentWindow(int32 from, int32 to); void ResizeParentWindow(int32 from, int32 to);
static BRect FrameForMode(int32, BRect, BRect, BRect); static BRect FrameForMode(int32, BRect, BRect, BRect);
// called only by the constructor // called only by the constructor
virtual void MessageReceived(BMessage *); virtual void MessageReceived(BMessage* message);
private: private:
int32 fMode; int32 fMode;
BRect fMode1Frame; BRect fMode1Frame;
BRect fMode2Frame; BRect fMode2Frame;
BRect fMode3Frame; BRect fMode3Frame;
ViewList fMode2Items; ViewList fMode2Items;
ViewList fMode3Items; ViewList fMode3Items;
BControl *fLatch; BControl* fLatch;
typedef BView _inherited; typedef BView _inherited;
}; };
inline int32 inline int32
DialogPane::Mode() const DialogPane::Mode() const
{ {
return fMode; return fMode;
} }
class PaneSwitch : public BControl { class PaneSwitch : public BControl {
public: public:
PaneSwitch(BRect frame, const char* name, PaneSwitch(BRect frame, const char* name,