2013-12-27 00:52:42 +01:00
|
|
|
|
//Leency - 2012-2013
|
|
|
|
|
|
|
|
|
|
char *ITEMS_LIST[]={
|
2014-03-30 13:57:13 +02:00
|
|
|
|
"WIN Ctrl+E",05,
|
|
|
|
|
"DOS Ctrl+D",04,
|
|
|
|
|
"KOI Ctrl+K",11,
|
|
|
|
|
"UTF Ctrl+U",21,
|
2013-12-27 00:52:42 +01:00
|
|
|
|
#ifdef LANG_RUS
|
2015-03-16 15:20:32 +01:00
|
|
|
|
"Zoom 2x Z",122,
|
2014-03-30 13:57:13 +02:00
|
|
|
|
"<EFBFBD><EFBFBD>ᬮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD> F3",52,
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD> F4",53,
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⨭<EFBFBD><E2A8AD>" ,02,
|
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ,03,
|
2015-03-01 22:36:17 +01:00
|
|
|
|
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㧮<EFBFBD>" ,06,
|
2013-12-27 00:52:42 +01:00
|
|
|
|
#else
|
2015-03-16 15:20:32 +01:00
|
|
|
|
"Zoom 2x Z",122,
|
2014-03-30 13:57:13 +02:00
|
|
|
|
"View source F3",52,
|
|
|
|
|
"Edit source F4",53,
|
|
|
|
|
"Free image cache" ,09,
|
|
|
|
|
"History" ,03,
|
2015-03-01 22:36:17 +01:00
|
|
|
|
"Download Manager" ,06,
|
2013-12-27 00:52:42 +01:00
|
|
|
|
#endif
|
|
|
|
|
0};
|
|
|
|
|
|
|
|
|
|
llist menu;
|
|
|
|
|
|
|
|
|
|
void menu_rmb()
|
|
|
|
|
{
|
|
|
|
|
proc_info MenuForm;
|
|
|
|
|
int key;
|
|
|
|
|
|
|
|
|
|
menu.first = menu.current = 0;
|
|
|
|
|
while (ITEMS_LIST[menu.count*2]) menu.count++;
|
2014-03-30 13:57:13 +02:00
|
|
|
|
menu.SetSizes(2,2,177,menu.count*19,0,19);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
SetEventMask(100111b);
|
|
|
|
|
|
2015-07-30 17:49:09 +02:00
|
|
|
|
_BEGIN_APPLICATION_MENU:
|
|
|
|
|
switch(WaitEvent())
|
2013-12-27 00:52:42 +01:00
|
|
|
|
{
|
|
|
|
|
case evMouse:
|
|
|
|
|
GetProcessInfo(#MenuForm, SelfInfo);
|
|
|
|
|
if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
|
|
|
|
|
|
2015-08-02 00:08:58 +02:00
|
|
|
|
mouse.get();
|
|
|
|
|
if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
|
|
|
|
|
if (mouse.lkm)&&(mouse.up) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); }
|
2013-12-27 00:52:42 +01:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
|
key = GetKey();
|
|
|
|
|
if (key==27) ExitProcess();
|
|
|
|
|
if (menu.ProcessKey(key)) DrawMenuList();
|
|
|
|
|
if (key==13)
|
|
|
|
|
{
|
|
|
|
|
action_buf = ITEMS_LIST[menu.current*2+1];
|
|
|
|
|
ExitProcess();
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case evReDraw:
|
2015-08-02 00:08:58 +02:00
|
|
|
|
DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF);
|
2014-03-22 11:29:29 +01:00
|
|
|
|
DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
DrawMenuList();
|
|
|
|
|
}
|
2015-07-30 17:49:09 +02:00
|
|
|
|
goto _BEGIN_APPLICATION_MENU;
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawMenuList()
|
|
|
|
|
{
|
|
|
|
|
int N;
|
|
|
|
|
|
|
|
|
|
for (N=0; N<menu.count; N++;)
|
|
|
|
|
{
|
|
|
|
|
if (N==menu.current)
|
|
|
|
|
DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, 0x94AECE);
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-03-22 11:29:29 +01:00
|
|
|
|
DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, col_bg);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
WriteText(19,N*menu.line_h+9,0x80,0xf2f2f2,ITEMS_LIST[N*2]);
|
|
|
|
|
}
|
|
|
|
|
WriteText(18,N*menu.line_h+8,0x80,0x000000,ITEMS_LIST[N*2]);
|
|
|
|
|
}
|
2015-08-10 09:09:10 +02:00
|
|
|
|
if (cur_encoding!=CH_NULL)
|
2015-03-16 15:20:32 +01:00
|
|
|
|
WriteText(5, cur_encoding*menu.line_h+7, 0x80, 0x777777, "\x10"); //show current encoding
|
|
|
|
|
else
|
2015-08-10 09:09:10 +02:00
|
|
|
|
WriteText(5, CH_CP866*menu.line_h+7, 0x80, 0x777777, "\x10"); //show current encoding
|
2015-03-16 15:20:32 +01:00
|
|
|
|
|
2015-08-05 00:21:08 +02:00
|
|
|
|
if (WB1.DrawBuf.zoom == 2) DrawBar(6, 4*menu.line_h+8, 6, 6, 0x777777);
|
2013-12-27 00:52:42 +01:00
|
|
|
|
}
|