Subversion Repositories Kolibri OS

Rev

Rev 7613 | Rev 7628 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7613 Rev 7614
Line 17... Line 17...
17
#include "..\lib\obj\libini.h"
17
#include "..\lib\obj\libini.h"
Line 18... Line 18...
18
 
18
 
19
#include "..\lib\patterns\select_list.h"
19
#include "..\lib\patterns\select_list.h"
Line -... Line 20...
-
 
20
#include "..\lib\patterns\simple_open_dialog.h"
-
 
21
 
20
#include "..\lib\patterns\simple_open_dialog.h"
22
#include "ui_elements_preview.h"
21
 
23
 
22
//===================================================//
24
//===================================================//
23
//                                                   //
25
//                                                   //
24
//                       DATA                        //
26
//                       DATA                        //
Line 67... Line 69...
67
int cur;
69
int cur;
Line 68... Line 70...
68
 
70
 
69
proc_info Form;
71
proc_info Form;
Line 70... Line 72...
70
block skp;
72
block skp;
Line 71... Line 73...
71
 
73
 
72
_tabs tabs = { LP, LP, NULL, NULL, SKINS };
-
 
73
 
-
 
74
checkbox update_docky = { T_UPDATE_DOCK, false };
-
 
75
checkbox checkbox1 = { "Checkbox", true };
-
 
76
more_less_box spinbox1 = { 23, 0, 999, "SpinBox" };
-
 
77
edit_box edit_cmm = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff,
-
 
78
	0x10000000,sizeof(param)-2,#param,0, 0b};
-
 
79
 
-
 
Line 80... Line 74...
80
char st_str[16];
74
_tabs tabs = { SKINS, LP, LP, NULL, NULL };
81
edit_box edit_st = {180,NULL,NULL,0xffffff,0x94AECE,0xFFFfff,0xffffff,
75
 
Line 82... Line 76...
82
	0x10000000,sizeof(st_str)-2,#st_str,0, 0b};
76
checkbox update_docky = { T_UPDATE_DOCK, false };
Line 189... Line 183...
189
   }
183
   }
190
}
184
}
Line 191... Line 185...
191
 
185
 
192
void draw_window()
186
void draw_window()
-
 
187
{
193
{
188
	system.color.get();	
194
	DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x74,NULL,WINDOW_HEADER,0);
189
	DefineAndDrawWindow(screen.width-600/2,80,630,504+skin_height,0x34,system.color.work,WINDOW_HEADER,0);
195
	GetProcessInfo(#Form, SelfInfo);
190
	GetProcessInfo(#Form, SelfInfo);
196
	IF (Form.status_window>=2) return;
191
	IF (Form.status_window>=2) return;
197
	DrawWindowContent();
192
	DrawWindowContent();
Line 198... Line 193...
198
}
193
}
199
 
194
 
200
void DrawWindowContent()
195
void DrawWindowContent()
201
{
-
 
202
	int id;
196
{
Line 203... Line 197...
203
	incn y;
197
	int id;
Line 204... Line 198...
204
	int list_w;
198
	int list_w;
Line 205... Line -...
205
 
-
 
206
	system.color.get();	
-
 
207
 
199
 
208
	if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
200
	system.color.get();	
209
 
201
 
210
	DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work);
-
 
211
 
202
	if (tabs.active_tab == SKINS) list_w=250; else list_w=350;
212
	tabs.w = Form.cwidth-LP-LP;
203
 
Line 213... Line 204...
213
	tabs.h = Form.cheight-LP-LP;
204
	tabs.w = Form.cwidth-LP-LP;
214
	tabs.draw_wrapper();
205
	tabs.h = Form.cheight-LP-LP;
Line 233... Line 224...
233
		230 //select_list.h - 50 - 50
224
		230 //select_list.h - 50 - 50
234
	);
225
	);
Line 235... Line 226...
235
 
226
 
236
	SelectList_Draw();
227
	SelectList_Draw();
-
 
228
	SelectList_DrawBorder();
Line 237... Line 229...
237
	SelectList_DrawBorder();
229
	//DrawWideRectangle(0, 0, Form.cwidth, Form.cheight, LP, system.color.work);
238
 
230
 
239
	if (tabs.active_tab == SKINS)
-
 
240
	{
-
 
241
		DrawBar(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work);
231
	if (tabs.active_tab == SKINS)
242
		DrawRectangle(skp.x-20, select_list.y, skp.w+40, select_list.h, system.color.work_graph);
-
 
243
		update_docky.draw(skp.x, select_list.y+15);
232
	{
244
		y.n = skp.y;
-
 
245
		DrawFrame(skp.x, skp.y, skp.w, skp.h, " Components Preview ");
-
 
246
		spinbox1.draw(skp.x+20, y.inc(30));
-
 
247
		WriteText(skp.x+20, y.inc(30), 0x90, system.color.work_text, "C-- Edit");
-
 
248
		DrawEditBoxPos(skp.x+20, y.inc(20), #edit_cmm);
233
		update_docky.draw(skp.x, select_list.y+15);
249
		WriteText(skp.x+20, y.inc(35), 0x90, system.color.work_text, "Strandard Edit");
-
 
250
		DrawStEditBoxPos(skp.x+20, y.inc(20), #edit_st);
-
 
251
		DrawStandartCaptButton(skp.x+20, skp.y+skp.h-40, GetFreeButtonId(), "Button1");
234
		DrawFrame(skp.x, skp.y, skp.w, skp.h, " Components Preview ");
252
		DrawStandartCaptButton(skp.x+120, skp.y+skp.h-40, GetFreeButtonId(), "Button2");
235
		DrawUiElementsPreview(skp.x+20, skp.y, skp.h);
253
	}
236
	}
254
	if (tabs.active_tab == WALLPAPERS)
237
	if (tabs.active_tab == WALLPAPERS)
255
	{
238
	{
256
		skp.x -= TAB_PADDING + 3;
-
 
257
		DrawStandartCaptButton(skp.x, select_list.y, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER);
239
		skp.x -= TAB_PADDING + 3;
258
		DrawBar(skp.x, select_list.y+50, 180, 80, system.color.work);
240
		DrawStandartCaptButton(skp.x, select_list.y, BTN_SELECT_WALLP_FOLDER, T_SELECT_FOLDER);
259
		DrawFrame(skp.x, select_list.y+50, 180, 80, T_PICTURE_MODE);
241
		DrawFrame(skp.x, select_list.y+50, 180, 80, T_PICTURE_MODE);
260
		optionbox_stretch.draw(skp.x+14, select_list.y+70);
242
		optionbox_stretch.draw(skp.x+14, select_list.y+70);
261
		optionbox_tiled.draw(skp.x+14, select_list.y+97);
243
		optionbox_tiled.draw(skp.x+14, select_list.y+97);
Line 262... Line -...
262
	}
-
 
263
}
-
 
264
 
-
 
265
:void DrawStEditBoxPos(dword x,y, edit_box_pointer)
-
 
266
{
-
 
267
	dword c_inactive = MixColors(system.color.work_graph, system.color.work, 128);
-
 
268
	dword c_active = MixColors(system.color.work_graph, 0, 128);
-
 
269
	ESI = edit_box_pointer;
-
 
270
	ESI.edit_box.left = x;
-
 
271
	ESI.edit_box.top = y;
-
 
272
	ESI.edit_box.blur_border_color = c_inactive;
-
 
273
	ESI.edit_box.focus_border_color = c_active;
-
 
274
	edit_box_draw  stdcall (edit_box_pointer);
-
 
Line 275... Line 244...
275
}
244
	}
276
 
245
}
277
 
246
 
278
 
247
 
Line 354... Line 323...
354
		Open_Dir();
323
		Open_Dir();
355
		if (!select_list.count) notify("'No wallpapers were found' -E");
324
		if (!select_list.count) notify("'No wallpapers were found' -E");
356
		select_list.cur_y = active_wallpaper;
325
		select_list.cur_y = active_wallpaper;
357
	}
326
	}
358
	if (select_list.cur_y>select_list.visible) select_list.first=select_list.cur_y; select_list.CheckDoesValuesOkey();
327
	if (select_list.cur_y>select_list.visible) select_list.first=select_list.cur_y; select_list.CheckDoesValuesOkey();
359
	if (select_list.w) DrawWindowContent();
328
	if (select_list.w) draw_window();
360
}
329
}
Line 361... Line 330...
361
 
330
 
362
void EventDeleteFile()
331
void EventDeleteFile()
363
{
332
{