- changing MaxInstructions to 100 for cthulhain (crazy nut) =:)
[bbkeys.git] / src / resource.hh
blob1cd02f8b121e5ac6fed0cb2b74e6c3d08022ea43
1 // resource.hh for bbkeys - a pager tool for Blackbox
2 //
3 // Copyright (c) 1998-1999 John Kennis, jkennis@chello.nl
4 //
5 // this program is free software; you can redistribute it and/or modify
6 // it under the terms of the gnu general public license as published by
7 // the free software foundation; either version 2 of the license, or
8 // (at your option) any later version.
9 //
10 // this program is distributed in the hope that it will be useful,
11 // but without any warranty; without even the implied warranty of
12 // merchantability or fitness for a particular purpose. see the
13 // gnu general public license for more details.
15 // you should have received a copy of the gnu general public license
16 // along with this program; if not, write to the free software
17 // foundation, inc., 675 mass ave, cambridge, ma 02139, usa.
19 // (see the included file copying / gpl-2.0)
21 // $Id$
24 #ifndef __RESOURCE_HH
25 #define __RESOURCE_HH
27 #include "bbkeys.hh"
28 #include "Baseresource.hh"
30 class BaseResource;
32 enum {none=0, border=1, texture=2};
33 enum WHICH_BUTTON { LEFT_BUTTON = 1, MIDDLE_BUTTON, RIGHT_BUTTON,
34 FOURTH_BUTTON, FIFTH_BUTTON};
36 struct FRAME {
37 int width;
38 int height;
39 BTexture texture;
40 int bevelWidth;
41 XFontStruct *font;
44 struct POSITION {
45 int x;
46 int y;
47 int mask;
48 bool vertical;
49 bool horizontal;
52 struct LABEL {
53 int width;
54 int width0, width1, width2, width3;
55 int height;
56 bool transparent;
57 BTexture texture;
58 XFontStruct *font;
59 BColor textColor;
62 struct SHOW {
63 bool newmail_counter;
64 bool totalmail_counter;
65 bool label;
66 bool envelope;
67 bool onlyAtNewMail;
70 struct SIZE {
71 unsigned int width;
72 unsigned int height;
75 struct BBPAGERWIN {
76 BTexture texture;
77 BTexture focusedTexture;
78 BColor activeColor;
79 BColor inactiveColor;
82 struct BUTTON {
83 BTexture texture;
84 BTexture texture_pressed;
87 struct MENU {
88 Bool stackedCycling;
89 Bool showCycleMenu;
90 BTexture texture;
91 BTexture hiTexture;
92 BColor textColor;
93 BColor hiTextColor;
94 BColor highlightColor;
95 int justify;
96 XFontStruct *font;
97 int bullet_style;
98 int bullet_pos;
101 class Resource : public BaseResource {
103 public:
104 Resource(ToolWindow *);
105 ~Resource(void);
107 struct FRAME frame;
108 struct LABEL label;
109 struct SHOW show;
110 struct BUTTON button;
111 struct POSITION position;
112 struct SIZE desktopSize;
113 struct MENU menu;
114 struct BBPAGERWIN pagerwin;
115 struct BBPAGERWIN desktopwin;
116 int columns;
117 int rows;
118 Bool getMenuStackedCycling(void) { return menu.stackedCycling; }
119 Bool getMenuShowCycleMenu(void) { return menu.showCycleMenu; }
120 int getFocusStyle(void) { return focus_style; }
121 int getDesktopFocusStyle(void) { return desktop_focus_style; }
122 WHICH_BUTTON getWindowMoveButton(void) { return window_move_button; }
123 WHICH_BUTTON getDesktopChangeButton(void) { return desktop_change_button; }
124 WHICH_BUTTON getWindowRaiseButton(void) { return window_raise_button; }
125 WHICH_BUTTON getWindowFocusButton(void) { return window_focus_button; }
127 /* menu */
128 const int getJustification(void) const {return menu.justify; }
129 int getMenuJustification(void) { return menu.justify; }
130 XFontStruct *getTitleFont(void) { return menu.font; }
131 XFontStruct *getMenuFont(void) { return menu.font; }
132 unsigned int getBevelWidth(void) { return frame.bevelWidth; }
133 BColor *getBorderColor(void) { return frame.texture.getColor(); }
134 unsigned int getBorderWidth(void) { return 0; }
135 int getBulletStyle(void) { return menu.bullet_style; }
136 int getBulletPosition(void) { return menu.bullet_pos; }
138 enum { AlignDontCare = 1, AlignTop, AlignBottom };
139 enum { Right = 1, Left };
140 enum { Empty = 0, Round, Square, Triangle, Diamond };
141 enum { LeftJustify = 1, RightJustify, CenterJustify };
143 protected:
144 virtual void LoadBBToolResource(void);
146 private:
147 void Frame(void);
148 void SizeAndPosition(void);
149 void PagerWin(void);
150 int focus_style;
151 int desktop_focus_style;
152 void Label(void);
153 void Show(void);
154 void Button(void);
155 void Menu(void);
156 WHICH_BUTTON window_move_button;
157 WHICH_BUTTON desktop_change_button;
158 WHICH_BUTTON window_raise_button;
159 WHICH_BUTTON window_focus_button;
160 void Clean(void);
162 #endif /* __RESOURCE_HH */