Rev 5499 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5499 | Rev 5504 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | #ifndef AUTOBUILD |
|
- | 2 | #include "lang.h--" |
|
- | 3 | #endif |
|
Line 1... | Line 4... | ||
1 | #define MEMSIZE 0x23E80 |
4 | |
2 | #include "..\lib\kolibri.h" |
5 | #define MEMSIZE 0x23E80 |
3 | #include "..\lib\strings.h" |
6 | #include "..\lib\kolibri.h" |
4 | #include "..\lib\mem.h" |
7 | #include "..\lib\strings.h" |
Line 13... | Line 16... | ||
13 | #include "..\lib\patterns\libimg_load_skin.h" |
16 | |
Line 14... | Line 17... | ||
14 | 17 | #include "..\lib\patterns\libimg_load_skin.h" |
|
Line -... | Line 18... | ||
- | 18 | ||
- | 19 | #define WINDOW_TITLE "Taskbar and Docky configuration" |
|
- | 20 | ||
- | 21 | #ifdef LANG_RUS |
|
- | 22 | ?define MIN_LEFT_BUTTON "®¯ª áªàëâ¨ï á«¥¢ " |
|
- | 23 | ?define MIN_RIGHT_BUTTON "®¯ª áªàëâ¨ï á¯à ¢ " |
|
- | 24 | ?define SOFTEN_UP "£« ¦¨¢ ¨¥ ᢥàåã" |
|
- | 25 | ?define SOFTEN_DOWN "£« ¦¨¢ ¨¥ ᨧã" |
|
- | 26 | ?define CLOCK " áë" |
|
- | 27 | ?define CPU_USAGE " £à㧪 " |
|
- | 28 | ?define CHANGE_LANG "§ëª ¢¢®¤ " |
|
- | 29 | ?define MENU_BUTTON "®¯ª ¬¥î" |
|
- | 30 | ?define PANEL_HEIGHT "ëá®â ¯ ¥«¨" |
|
- | 31 | ?define SOFTEN_HEIGHT "ëá®â ᣫ ¦¨¢ ¨ï" |
|
- | 32 | ?define BUTTON_OFFSET "®«¥ ¢®ªà㣠ª®¯®ª" |
|
- | 33 | ?define FSIZE "¥¦¨¬ ¯ ¥«¨" |
|
- | 34 | ?define ASHOW "¥ áªàë¢ âì" |
|
- | 35 | ?define CHANGE_POS " ¦¬¨â¥ ¨§®¡à ¦¥¨¥ ¤«ï á¬¥ë ¯®§¨æ¨¨" |
|
- | 36 | ?define ERROR_1 "訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj" |
|
- | 37 | ?define ERROR_2 "訡ª ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/libini.obj" |
|
- | 38 | #else |
|
- | 39 | ?define MIN_LEFT_BUTTON "Min Left Button" |
|
- | 40 | ?define MIN_RIGHT_BUTTON "Min Right Button" |
|
- | 41 | ?define SOFTEN_UP "Soften Up" |
|
- | 42 | ?define SOFTEN_DOWN "Soften Down" |
|
- | 43 | ?define CLOCK "Clock" |
|
- | 44 | ?define CPU_USAGE "Cpu Usage" |
|
- | 45 | ?define CHANGELANG "Change Language" |
|
- | 46 | ?define MENU_BUTTON "Menu Button" |
|
- | 47 | ?define PANEL_HEIGHT "Panel Height" |
|
- | 48 | ?define SOFTEN_HEIGHT "Soften Height" |
|
- | 49 | ?define BUTTON_OFFSET "Button Offset" |
|
- | 50 | ?define FSIZE "Full width" |
|
- | 51 | ?define ASHOW "Always show" |
|
- | 52 | ?define CHANGE_POS "Click on image to change position" |
|
- | 53 | ?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj" |
|
- | 54 | ?define ERROR_2 "Error while loading library /rd/1/lib/libini.obj" |
|
15 | #define WINDOW_TITLE "Taskbar and Docky configuration" |
55 | #endif |
16 | 56 | ||
Line 17... | Line 57... | ||
17 | frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, " Taskbar ", 0, 0, 6, 0x000111, 0xCCCccc }; |
57 | |
18 | frame docky_frame = { 0, 000, 10, 73, 217, 0x000111, 0xFFFfff, 1, " Docky ", 0, 0, 6, 0x000111, 0xCCCccc }; |
58 | frame taskbar_frame = { 0, 000, 10, 188, 14, 0x000111, 0xFFFfff, 1, " Taskbar ", 0, 0, 6, 0x000111, 0xCCCccc }; |
Line 50... | Line 90... | ||
50 | { |
90 | void main() |
51 | dword id, key; |
91 | { |
52 | 92 | dword id, key; |
|
Line 53... | Line 93... | ||
53 | mem_Init(); |
93 | |
54 | if (load_dll2(libini, #lib_init,1)!=0) notify("Error: library doesn't exists - libini"); |
94 | mem_Init(); |
55 | if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("Eror: library doesn't exists - boxlib"); |
95 | if (load_dll2(libini, #lib_init,1)!=0) notify(ERROR_2); |
Line 56... | Line 96... | ||
56 | 96 | if (load_dll2(boxlib, #box_lib_init,0)!=0) notify(ERROR_1); |
|
Line 57... | Line 97... | ||
57 | LoadCfg(); |
97 | |
58 | 98 | LoadCfg(); |
|
Line 108... | Line 148... | ||
108 | break; |
148 | if (key==27) ExitProcess(); |
109 | 149 | break; |
|
Line 110... | Line 150... | ||
110 | case evReDraw: |
150 | |
111 | sc.get(); |
151 | case evReDraw: |
112 | DefineAndDrawWindow(130, 150, 390, 300+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE); |
152 | sc.get(); |
113 | GetProcessInfo(#Form, SelfInfo); |
153 | DefineAndDrawWindow(130, 150, 400, 300+GetSkinHeight(),0x34,sc.work,WINDOW_TITLE); |
114 | if (Form.status_window>2) break; |
154 | GetProcessInfo(#Form, SelfInfo); |
115 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
155 | if (Form.status_window>2) break; |
116 | taskbar_frame.font_color = docky_frame.font_color = sc.work_text; |
156 | taskbar_frame.size_x = docky_frame.size_x = - taskbar_frame.start_x * 2 + Form.cwidth; |
117 | taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work; |
157 | taskbar_frame.font_color = docky_frame.font_color = sc.work_text; |
Line 127... | Line 167... | ||
127 | 167 | word win_center_x; |
|
Line 128... | Line 168... | ||
128 | frame_draw stdcall (#taskbar_frame); |
168 | |
129 | DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); |
169 | frame_draw stdcall (#taskbar_frame); |
130 | _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); |
170 | DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); |
131 | WriteText(68, taskbar_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
171 | _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); |
132 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, "Soften Up", taskbar_cfg.SoftenUp); |
172 | WriteText(68, taskbar_frame.start_y + 20, 0x80, 0x333222, CHANGE_POS); |
133 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, "Soften Down", taskbar_cfg.SoftenDown); |
173 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp); |
134 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, "Min Left Button", taskbar_cfg.MinLeftButton); |
174 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown); |
135 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, "Min Right Button", taskbar_cfg.MinRightButton); |
175 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton); |
136 | win_center_x = Form.cwidth / 2; |
176 | PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton); |
137 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, "Clock", taskbar_cfg.Clock); |
177 | win_center_x = Form.cwidth / 2; |
138 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, "Cpu Usage", taskbar_cfg.CpuUsage); |
178 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock); |
139 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, "Change Language", taskbar_cfg.ChangeLang); |
179 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage); |
140 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, "Menu Button", taskbar_cfg.MenuButton); |
180 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang); |
141 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, "Panel Height"); |
181 | PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton); |
142 | PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, "Soften Height"); |
182 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT); |
143 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, "Button Offset"); |
183 | PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT); |
Line 144... | Line 184... | ||
144 | 184 | PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET); |
|
145 | frame_draw stdcall (#docky_frame); |
185 | |
146 | DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); |
186 | frame_draw stdcall (#docky_frame); |
147 | _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); |
187 | DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); |
Line 148... | Line 188... | ||
148 | WriteText(68, docky_frame.start_y + 20, 0x80, 0x333222, "Click on image to change position"); |
188 | _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); |
149 | 189 | WriteText(68, docky_frame.start_y + 20, 0x80, 0x333222, CHANGE_POS); |
|
150 | PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, "Full width", docky_cfg.fsize); |
190 | |
Line 151... | Line 191... | ||
151 | PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, "Always show", docky_cfg.ashow); |
191 | PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize); |
152 | } |
192 | PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow); |
153 | 193 | } |