Added Decorator tab and functionality
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@656 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,7 +7,7 @@ APRApplication::APRApplication()
|
||||
BRect rect;
|
||||
|
||||
// This is just the size and location of the window when Show() is called
|
||||
rect.Set(100,100,580,220);
|
||||
rect.Set(100,100,520,345);
|
||||
aprwin=new APRWindow(rect);
|
||||
aprwin->Show();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
APRView.cpp: The Appearance app's bulky boy
|
||||
APRView.cpp: The Appearance app's color handler
|
||||
|
||||
Handles all the grunt work. Color settings are stored in a BMessage to
|
||||
allow for easy transition to and from disk. The messy details are in the
|
||||
@@ -9,20 +9,11 @@
|
||||
#include <OS.h>
|
||||
#include "APRView.h"
|
||||
#include "PortLink.h"
|
||||
#include "defs.h"
|
||||
#include <Directory.h>
|
||||
#include <File.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define SETTINGS_DIR "/boot/home/config/settings/app_server/"
|
||||
|
||||
#define APPLY_SETTINGS 'aply'
|
||||
#define REVERT_SETTINGS 'rvrt'
|
||||
#define DEFAULT_SETTINGS 'dflt'
|
||||
#define TRY_SETTINGS 'trys'
|
||||
|
||||
#define ATTRIBUTE_CHOSEN 'atch'
|
||||
#define UPDATE_COLOR 'upcl'
|
||||
|
||||
void SetRGBColor(rgb_color *col,uint8 r, uint8 g, uint8 b, uint8 a=255);
|
||||
void PrintRGBColor(rgb_color col);
|
||||
|
||||
@@ -63,8 +54,8 @@ APRView::APRView(BRect frame, const char *name, int32 resize, int32 flags)
|
||||
AddChild(colorview);
|
||||
|
||||
cvrect.Set(0,0,50,25);
|
||||
cvrect.OffsetBy(picker->Frame().left,
|
||||
picker->Frame().bottom+20);
|
||||
cvrect.OffsetBy(scrollview->Frame().right+20,
|
||||
scrollview->Frame().bottom-cvrect.Height());
|
||||
|
||||
defaults=new BButton(cvrect,"DefaultsButton","Defaults",
|
||||
new BMessage(DEFAULT_SETTINGS),B_FOLLOW_LEFT |B_FOLLOW_TOP,
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
void SetDefaults(void);
|
||||
void NotifyServer(void);
|
||||
rgb_color GetColorFromMessage(BMessage *msg, const char *name, int32 index=0);
|
||||
|
||||
protected:
|
||||
BColorControl *picker;
|
||||
BButton *apply,*revert,*defaults,*try_settings;
|
||||
BListView *attrlist;
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
#include "APRWindow.h"
|
||||
#include "APRView.h"
|
||||
#include "DecView.h"
|
||||
|
||||
APRWindow::APRWindow(BRect frame)
|
||||
: BWindow(frame, "Appearance", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE )
|
||||
{
|
||||
APRView *v=new APRView(Bounds(),"AppearanceView",B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
AddChild(v);
|
||||
tabview=new BTabView(Bounds(),"TabView");
|
||||
|
||||
BTab *tab=NULL;
|
||||
|
||||
DecView *dv=new DecView(Bounds(),"Decorator",B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
tab=new BTab(dv);
|
||||
tabview->AddTab(dv,tab);
|
||||
|
||||
APRView *v=new APRView(Bounds(),"Colors",B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
tab=new BTab(v);
|
||||
tabview->AddTab(v,tab);
|
||||
|
||||
AddChild(tabview);
|
||||
}
|
||||
|
||||
bool APRWindow::QuitRequested()
|
||||
|
||||
@@ -4,12 +4,14 @@
|
||||
#include <Application.h>
|
||||
#include <Window.h>
|
||||
#include <Message.h>
|
||||
#include <TabView.h>
|
||||
|
||||
class APRWindow : public BWindow
|
||||
{
|
||||
public:
|
||||
APRWindow(BRect frame);
|
||||
virtual bool QuitRequested();
|
||||
BTabView *tabview;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SubDir OBOS_TOP src prefs appearance ;
|
||||
|
||||
Preference Appearance : APRMain.cpp APRView.cpp APRWindow.cpp PortLink.cpp ;
|
||||
Preference Appearance : APRMain.cpp APRView.cpp APRWindow.cpp Decorator.cpp DecView.cpp DisplayDriver.cpp PortLink.cpp PreviewDriver.cpp RGBColor.cpp SPoint.cpp SRect.cpp ;
|
||||
|
||||
LinkSharedOSLibs Appearance : be ;
|
||||
|
||||
Reference in New Issue
Block a user