diff --git a/src/add-ons/decorators/BeDecorator/ColorWell.cpp b/src/add-ons/decorators/BeDecorator/ColorWell.cpp deleted file mode 100644 index 6cb94a5e2a..0000000000 --- a/src/add-ons/decorators/BeDecorator/ColorWell.cpp +++ /dev/null @@ -1,105 +0,0 @@ -#include "ColorWell.h" - -ColorWell::ColorWell(BRect frame, BMessage *msg, bool is_rectangle=false) - : BView(frame,"ColorWell", B_FOLLOW_ALL_SIDES, B_WILL_DRAW) -{ - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - SetLowColor(0,0,0); - invoker=new BInvoker(msg,this); - disabledcol.red=128; - disabledcol.green=128; - disabledcol.blue=128; - disabledcol.alpha=255; - is_enabled=true; - is_rect=is_rectangle; -} - -ColorWell::~ColorWell(void) -{ - delete invoker; -} - -void ColorWell::SetTarget(BHandler *tgt) -{ - invoker->SetTarget(tgt); -} - -void ColorWell::SetColor(rgb_color col) -{ - SetHighColor(col); - currentcol=col; - Draw(Bounds()); -// Invalidate(); - invoker->Invoke(); -} - -void ColorWell::SetColor(uint8 r,uint8 g, uint8 b) -{ - SetHighColor(r,g,b); - currentcol.red=r; - currentcol.green=g; - currentcol.blue=b; - Draw(Bounds()); - //Invalidate(); - invoker->Invoke(); -} - -void ColorWell::MessageReceived(BMessage *msg) -{ - // If we received a dropped message, try to see if it has color data - // in it - if(msg->WasDropped()) - { - rgb_color *col; - uint8 *ptr; - ssize_t size; - if(msg->FindData("RGBColor",(type_code)'RGBC',(const void**)&ptr,&size)==B_OK) - { - col=(rgb_color*)ptr; - SetHighColor(*col); - } - } - - // The default - BView::MessageReceived(msg); -} - -void ColorWell::SetEnabled(bool value) -{ - if(is_enabled!=value) - { - is_enabled=value; - Invalidate(); - } -} - -void ColorWell::Draw(BRect update) -{ - if(is_enabled) - SetHighColor(currentcol); - else - SetHighColor(disabledcol); - - if(is_rect) - { - FillRect(Bounds()); - if(is_enabled) - StrokeRect(Bounds(),B_SOLID_LOW); - } - else - { - FillEllipse(Bounds()); - if(is_enabled) - StrokeEllipse(Bounds(),B_SOLID_LOW); - } -} - -rgb_color ColorWell::Color(void) const -{ - return currentcol; -} - -void ColorWell::SetMode(bool is_rectangle) -{ - is_rect=is_rectangle; -} \ No newline at end of file diff --git a/src/add-ons/decorators/BeDecorator/ColorWell.h b/src/add-ons/decorators/BeDecorator/ColorWell.h deleted file mode 100644 index ffbb8c1103..0000000000 --- a/src/add-ons/decorators/BeDecorator/ColorWell.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef COLORWELL_H_ -#define COLORWELL_H_ - -#include -#include -#include - -class ColorWell : public BView -{ -public: - ColorWell(BRect frame, BMessage *msg, bool is_rectangle=false); - ~ColorWell(void); - void SetColor(rgb_color col); - rgb_color Color(void) const; - void SetColor(uint8 r,uint8 g, uint8 b); - virtual void MessageReceived(BMessage *msg); - virtual void Draw(BRect update); - virtual void SetTarget(BHandler *tgt); - virtual void SetEnabled(bool value); - void SetMode(bool is_rectangle); -protected: - BInvoker *invoker; - bool is_enabled, is_rect; - rgb_color disabledcol, currentcol; -}; - -#endif \ No newline at end of file diff --git a/src/add-ons/decorators/BeDecorator/defs.h b/src/add-ons/decorators/BeDecorator/defs.h deleted file mode 100644 index 9b491d0719..0000000000 --- a/src/add-ons/decorators/BeDecorator/defs.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef DEFS_H_ -#define DEFS_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' -#define DECORATOR_CHOSEN 'dcch' -#define UPDATE_DECORATOR 'updc' - -#define SET_DECORATOR 'sdec' -#define GET_DECORATOR 'gdec' - -#define SET_UI_COLORS 'suic' -#endif \ No newline at end of file diff --git a/src/add-ons/decorators/WinDecorator/defs.h b/src/add-ons/decorators/WinDecorator/defs.h deleted file mode 100644 index 9b491d0719..0000000000 --- a/src/add-ons/decorators/WinDecorator/defs.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef DEFS_H_ -#define DEFS_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' -#define DECORATOR_CHOSEN 'dcch' -#define UPDATE_DECORATOR 'updc' - -#define SET_DECORATOR 'sdec' -#define GET_DECORATOR 'gdec' - -#define SET_UI_COLORS 'suic' -#endif \ No newline at end of file