Subversion Repositories Kolibri OS

Rev

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

Rev 6651 Rev 6653
Line 1... Line 1...
1
#ifndef AUTOBUILD
1
#ifndef AUTOBUILD
2
	?include "lang.h--"
2
	?include "lang.h--"
3
#endif
3
#endif
Line 4... Line 4...
4
 
4
 
5
#define MEMSIZE 0xDFE800
5
#define MEMSIZE 4096*20
6
#include "..\lib\mem.h"
6
#include "..\lib\mem.h"
7
#include "..\lib\strings.h"
7
#include "..\lib\strings.h"
8
#include "..\lib\list_box.h"
8
#include "..\lib\list_box.h"
9
#include "..\lib\clipboard.h"
9
#include "..\lib\clipboard.h"
Line 60... Line 60...
60
	  WaitEventTimeout(10);
60
	  WaitEventTimeout(10);
61
	  switch(EAX & 0xFF)
61
	  switch(EAX & 0xFF)
62
	  {
62
	  {
63
	  	case evMouse:
63
	  	case evMouse:
64
			if (!CheckActiveProcess(Form.ID)) break;
64
			if (!CheckActiveProcess(Form.ID)) break;
65
			mouse.get();
-
 
66
			scrollbar_v_mouse (#scroll1);
-
 
67
			if (select_list.first != scroll1.position)
-
 
68
			{
-
 
69
				select_list.first = scroll1.position;
-
 
70
				DrawSelectList(clipboard.GetSlotCount());
65
			SelectList_ProcessMouse();
71
				break;
-
 
72
			}
-
 
73
	  		if (mouse.vert) && (select_list.MouseScroll(mouse.vert)) DrawSelectList(clipboard.GetSlotCount());
-
 
74
	  		break;
66
	  		break;
Line 75... Line -...
75
 
-
 
76
 
67
 
77
		case evButton:
68
		case evButton:
78
			id=GetButtonID();
69
			id=GetButtonID();
79
			if (id==1) ExitProcess();
70
			if (id==1) ExitProcess();
80
			if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot();
71
			if (id==BT_DELETE_LAST_SLOT) EventDeleteLastSlot();
Line 84... Line 75...
84
			if (id>=300) EventOpenAsHex(id-300);
75
			if (id>=300) EventOpenAsHex(id-300);
85
			break;
76
			break;
Line 86... Line 77...
86
	  
77
	  
87
		case evKey:
78
		case evKey:
88
			GetKeys(); 
79
			GetKeys(); 
89
			if (select_list.ProcessKey(key_scancode)) DrawSelectList(clipboard.GetSlotCount());
80
			if (select_list.ProcessKey(key_scancode)) ClipViewSelectListDraw();
Line 90... Line 81...
90
			break;
81
			break;
91
		 
82
		 
92
		case evReDraw:
83
		case evReDraw:
93
			system.color.get();			
84
			system.color.get();			
94
			DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0);
85
			DefineAndDrawWindow(screen.width-700/2,80,700,454+skin_height,0x73,0xE4DFE1,WINDOW_HEADER,0);
95
			GetProcessInfo(#Form, SelfInfo);
86
			GetProcessInfo(#Form, SelfInfo);
96
			IF (Form.status_window>=2) break;
87
			IF (Form.status_window>=2) break;
97
			if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; }
88
			if (Form.height < 200) { MoveSize(OLD,OLD,OLD,200); break; }
98
			if (Form.width  < 570) { MoveSize(OLD,OLD,570,OLD); break; }
89
			if (Form.width  < 570) { MoveSize(OLD,OLD,570,OLD); break; }
99
			InitSelectList(
90
			SelectList_Init(
100
				LIST_PADDING, 
91
				LIST_PADDING, 
101
				LIST_PADDING+PANEL_TOP_H, 
92
				LIST_PADDING+PANEL_TOP_H, 
102
				Form.cwidth-LIST_PADDING-LIST_PADDING-scroll1.size_x, 
93
				Form.cwidth-LIST_PADDING-LIST_PADDING-scroll1.size_x, 
103
				Form.cheight-PANEL_BOTTOM_H-PANEL_TOP_H-LIST_PADDING-LIST_PADDING,
94
				Form.cheight-PANEL_BOTTOM_H-PANEL_TOP_H-LIST_PADDING-LIST_PADDING,
104
				true
95
				true
105
			);
96
				);
106
		 	DrawWindowContent();
97
		 	DrawWindowContent();
Line 107... Line 98...
107
		 	DrawSelectList(clipboard.GetSlotCount());
98
		 	ClipViewSelectListDraw();
108
		 	break;
99
		 	break;
109
 
100
 
110
		default:
101
		default:
111
			if (clipboard.GetSlotCount() > select_list.count) DrawSelectList(clipboard.GetSlotCount());
102
			if (clipboard.GetSlotCount() > select_list.count) ClipViewSelectListDraw();
112
			break;
103
			break;
Line 127... Line 118...
127
	DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, system.color.work_graph);
118
	DrawRectangle(select_list.x-1, select_list.y-1, select_list.w+1+scroll1.size_x, select_list.h+1, system.color.work_graph);
128
	WriteText(select_list.x+12, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMNS_TITLE);
119
	WriteText(select_list.x+12, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMNS_TITLE);
129
	WriteText(select_list.x+select_list.w-68, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMN_VIEW);
120
	WriteText(select_list.x+select_list.w-68, select_list.y - 23, select_list.font_type, system.color.work_text, T_COLUMN_VIEW);
130
}
121
}
Line 131... Line 122...
131
 
122
 
132
void DrawSelectList_Line(dword i)
123
void SelectList_DrawLine(dword i)
133
{
124
{
134
	int yyy, length, slot_data_type_number;
125
	int yyy, length, slot_data_type_number;
135
	dword line_text[2048];
126
	dword line_text[2048];
136
	dword size_kb;
127
	dword size_kb;
Line 176... Line 167...
176
		notify("'Can not create /tmp0/1/clipview.tmp\nPreview function is not available.' -E");
167
		notify("'Can not create /tmp0/1/clipview.tmp\nPreview function is not available.' -E");
177
	 	return false;
168
	 	return false;
178
	}
169
	}
179
}
170
}
Line -... Line 171...
-
 
171
 
-
 
172
void ClipViewSelectListDraw() {
-
 
173
	select_list.count = clipboard.GetSlotCount();
-
 
174
	SelectList_Draw();
-
 
175
}
-
 
176
 
-
 
177
void SelectList_LineChanged() {
-
 
178
	return;
-
 
179
}
180
 
180
 
181
//===================================================//
181
//===================================================//
182
//                                                   //
182
//                                                   //
183
//                     EVENTS                        //
183
//                     EVENTS                        //
184
//                                                   //
184
//                                                   //
Line 185... Line 185...
185
//===================================================//
185
//===================================================//
186
 
186
 
-
 
187
void EventDeleteLastSlot()
-
 
188
{
-
 
189
	int i;
187
void EventDeleteLastSlot()
190
	for (i=0; i
188
{
191
	for (i=0; i
189
	clipboard.DelLastSlot();
192
	clipboard.DelLastSlot();
Line 190... Line 193...
190
	DrawSelectList(clipboard.GetSlotCount());
193
	ClipViewSelectListDraw();
191
}
194
}
192
 
195
 
193
void EventDeleteAllSlots()
196
void EventDeleteAllSlots()
194
{
197
{
Line 195... Line 198...
195
	while (clipboard.GetSlotCount()) clipboard.DelLastSlot();
198
	while (clipboard.GetSlotCount()) clipboard.DelLastSlot();
196
	DrawSelectList(clipboard.GetSlotCount());
199
	ClipViewSelectListDraw();
197
}
200
}
198
 
201
 
Line 199... Line 202...
199
void EventResetBufferLock() {
202
void EventResetBufferLock() {
200
	clipboard.ResetBlockingBuffer();
203
	clipboard.ResetBlockingBuffer();
201
	DrawSelectList(clipboard.GetSlotCount());
204
	ClipViewSelectListDraw();