1 #ifndef __BF_GUI_SETUPDIALOG_H__
2 #define __BF_GUI_SETUPDIALOG_H__
3
4 #include "BL_Tools.h"
5 #include "BF_GUI_DlgViews.h"
6 #include "BF_GUI_Setup.h"
7
8
9 class BF_GUI_FontView:public BF_GUI_DialogView{
10 public:
11 BF_GUI_FontView(BRect &o_Rect,
12 int i_FollowMode);
13 virtual void Draw(BRect o_Rect);
14 void UpdateFont();
15
16 BF_GUI_Setup_Font oFont;
17 };
18
19 class BF_GUI_SetupDialog_FontFamilyItem: public BF_GUI_ViewMenu_Item{
20 public:
21 BF_GUI_SetupDialog_FontFamilyItem(const char *pc_Title,
22 BL_List *plo_StyleItem);
23 ~BF_GUI_SetupDialog_FontFamilyItem();
24 virtual void MakeFocus(BF_GUI_DlgView_Menu *po_Parent);
25 BL_List *ploStyleItem;
26 };
27
28 class BF_GUI_SetupDialog_FontItem: public BF_GUI_ViewMenu_Item{
29 public:
30 BF_GUI_SetupDialog_FontItem(
31 const char *pc_Title,
32 const char *pc_Code,
33 BF_GUI_Setup_Font *po_Font,
34 BBitmap *po_SIcon=NULL);
35 virtual bool Invoke(BF_GUI_DlgView_Menu *po_Parent);
36 BF_GUI_Setup_Font *poFont;
37 };
38
39 class BF_GUI_SetupDialog_FontDialog:public BF_GUI_Dialog{
40 public:
41 BF_GUI_SetupDialog_FontDialog(
42 BF_GUI_SetupDialog_FontItem *po_FontItem,
43 const BRect & o_Rect,
44 const char *pc_Title,
45 const char *pc_Name,
46 const BMessage &o_Message,
47 uint32 i_WinResizeType,
48 bool b_DoubleBorder=true);
49 BF_GUI_SetupDialog_FontItem *poFontItem;
50
51 virtual void Save(BMessage& o_Message);
52 virtual void AttachedToWindow(void);
53 };
54
55
56
57 class BF_GUI_ColorsView:public BF_GUI_DialogView{
58 public:
59 BF_GUI_ColorsView(BRect &o_Rect,
60 int i_FollowMode,
61 rgb_color *pu_Color);
62 rgb_color *puColor;
63 virtual void Draw(BRect o_Rect);
64 };
65
66 class BF_GUI_ColorView:public BF_GUI_DialogView{
67 public:
68 BF_GUI_ColorView(BRect & o_Rect,
69 int32 i_FollowMode,
70 uint8 *pi_Color,
71 int8 i_ColorIndex,
72 BF_GUI_ColorsView *po_Unit);
73
74 virtual void Draw(BRect o_Rect);
75 void DrawCursor(bool b_Show);
76 virtual void MouseDown(BPoint point);
77
78 uint8 *piColor;
79 int8 iColorIndex;
80 BF_GUI_ColorsView *poUnit;
81 };
82
83 class BF_GUI_SetupDialog_ColorItem: public BF_GUI_ViewMenu_Item{
84 public:
85 BF_GUI_SetupDialog_ColorItem(
86 const char *pc_Title,
87 const char *pc_Code,
88 rgb_color *pu_Color);
89 virtual void Draw(BF_GUI_DlgView_Menu *po_Parent,BView *po_Render,float f_PosY);
90 virtual bool Invoke(BF_GUI_DlgView_Menu *po_Parent);
91 rgb_color *puColor;
92 };
93
94
95 #define BF_GUI_SETUPDIALOG_FLAGS_MAIN 0
96 #define BF_GUI_SETUPDIALOG_FLAGS_FILETASKS 1
97 #define BF_GUI_SETUPDIALOG_FLAGS_DEBUG 2
98
99 class BF_GUI_SetupDialog:public BF_GUI_Dialog{
100 public:
101 BF_GUI_SetupDialog(BRect & o_Rect,BView *po_View);
102 ~BF_GUI_SetupDialog();
103
104 virtual void MessageReceived(BMessage* po_Message);
105 private:
106 BF_GUI_DlgView_VMenu *poMenu;
107 BBitmap *poFontSIcon;
108 BF_GUI_Setup oSetup;
109 uint32 iSetupMainStyle;
110
111 void InvokeMenu(int32 i_OldCursor,int32 i_NewCursor);
112 void Invoke_FlagsSetup(int i_Type);
113 void Invoke_ColorsSetup();
114
115 void Insert_MainStyle_Check(const char *pc_Title,int i_Style,BRect & o_Rect,BView *po_Dialog,bool b_FirstView);
116 };
117
118 void
119 BF_GUI_SetupDialog_Run(BView *po_View);
120
121 #endif