Patch level : 10.0
Files correlati : ba0.exe bamenu.men Ricompilazione Demo : [ ] Commento : Gestione flag per programmi a pieno schermo con menu in stile Outlook git-svn-id: svn://10.65.10.50/trunk@16767 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
57ef4c1f4c
commit
1accce5a34
@ -413,7 +413,7 @@ void TColor_mask::load_themes()
|
||||
int k = codes.items();
|
||||
if (k <= 2)
|
||||
{
|
||||
TConfig themes("themes.ini");
|
||||
TConfig themes("res/themes.ini");
|
||||
TString_array pl; themes.list_paragraphs(pl);
|
||||
if (!pl.empty())
|
||||
{
|
||||
@ -439,7 +439,7 @@ bool TColor_mask::apply_theme()
|
||||
TToken_string codes = fl.get_codes();
|
||||
TToken_string values = fl.get_values();
|
||||
const int pos = codes.get_pos(theme);
|
||||
TConfig themes("themes.ini", values.get(pos));
|
||||
TConfig themes("res/themes.ini", values.get(pos));
|
||||
TAssoc_array& colors = themes.list_variables();
|
||||
if (!colors.empty())
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
|
||||
TMenuitem::TMenuitem(TSubmenu* sm)
|
||||
: _submenu(sm), _icon(0), _exist(-1),
|
||||
_firm(false), _password(false), _reloadmenu(false)
|
||||
_firm(false), _password(false), _reloadmenu(false), _fullscreen(false)
|
||||
{ }
|
||||
|
||||
TMenuitem::TMenuitem(const TMenuitem& mi)
|
||||
@ -126,6 +126,7 @@ TMenuitem::TMenuitem(const TMenuitem& mi)
|
||||
_firm = mi._firm;
|
||||
_password = mi._password;
|
||||
_reloadmenu = mi._reloadmenu;
|
||||
_fullscreen = mi._fullscreen;
|
||||
_icon = mi._icon;
|
||||
_enabled = mi._enabled;
|
||||
_caption = mi._caption;
|
||||
@ -156,10 +157,11 @@ bool TMenuitem::create(const char* t)
|
||||
switch(toupper(flags[i]))
|
||||
{
|
||||
case 'D': _exist = false; break;
|
||||
case 'E': visible = dongle().active(EEAUT); // Nascondi i moduli dipendenti da EE
|
||||
case 'F': _firm = true; break;
|
||||
case 'P': _password = true; break;
|
||||
case 'R': _reloadmenu = true; break;
|
||||
case 'E': visible = dongle().active(EEAUT); // Nascondi i moduli dipendenti da EE
|
||||
case 'S': _fullscreen = true; break;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
@ -263,12 +265,15 @@ bool TMenuitem::run_modal() const
|
||||
{
|
||||
bool yes = true;
|
||||
if (submenu().menu().mask_mode() == 3)
|
||||
{
|
||||
yes = _action.match("ba[128] -*", true);
|
||||
}
|
||||
yes = _action.match("ba[12] -*", true);
|
||||
return yes;
|
||||
}
|
||||
|
||||
bool TMenuitem::run_fullscreen() const
|
||||
{
|
||||
return _fullscreen != 0;
|
||||
}
|
||||
|
||||
bool TMenuitem::perform_program() const
|
||||
{
|
||||
bool ok = true;
|
||||
|
@ -37,6 +37,7 @@ class TMenuitem : public TObject
|
||||
char _firm : 2;
|
||||
char _password : 2;
|
||||
char _reloadmenu : 2;
|
||||
char _fullscreen : 2;
|
||||
|
||||
protected:
|
||||
bool perform_submenu() const;
|
||||
@ -55,6 +56,7 @@ public:
|
||||
bool is_program() const { return _type != '[' && _action.full(); }
|
||||
bool perform() const;
|
||||
bool run_modal() const;
|
||||
bool run_fullscreen() const;
|
||||
|
||||
TSubmenu& submenu() const { return *_submenu; }
|
||||
TMenu& menu() const;
|
||||
|
@ -8,10 +8,6 @@
|
||||
|
||||
#include "ba0102.h"
|
||||
|
||||
#define F_OPTIONS 201
|
||||
#define F_STAR 204
|
||||
#define F_ADDSTAR 205
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TMenu_tree
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -1184,14 +1180,17 @@ bool TExplorer_mask::on_field_event(TOperable_field& o, TField_event e, long jol
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TOOL_CONFIG:
|
||||
case DLG_CONFIG:
|
||||
dispatch_e_menu(TASK_WIN, MENU_ITEM(2));
|
||||
break;
|
||||
case TOOL_PREF:
|
||||
case DLG_ADDPREF:
|
||||
dispatch_e_menu(TASK_WIN, MENU_ITEM(5));
|
||||
break;
|
||||
case DLG_PREF:
|
||||
dispatch_e_menu(TASK_WIN, MENU_ITEM(6));
|
||||
break;
|
||||
case TOOL_ADDPREF:
|
||||
dispatch_e_menu(TASK_WIN, MENU_ITEM(5));
|
||||
case DLG_USER:
|
||||
dispatch_e_menu(TASK_WIN, MENU_ITEM(7));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -1216,15 +1215,16 @@ bool TExplorer_mask::on_key(KEY k)
|
||||
|
||||
TExplorer_mask::TExplorer_mask(TMenu& menu) : _tree(menu)
|
||||
{
|
||||
add_button_tool(DLG_SHRINK, TR("Menu Iniziale"), TOOL_FIRSTREC);
|
||||
add_button_tool(DLG_FINDREC, TR("Ricerca"), TOOL_LENTE);
|
||||
add_button_tool(TOOL_CONFIG, TR("Opzioni"), TOOL_CONFIG);
|
||||
add_button_tool(DLG_SETPRINT, TR("Imposta"), TOOL_SETPRINT);
|
||||
add_button_tool(TOOL_PREF, TR("Preferiti"), TOOL_PREF);
|
||||
add_button_tool(TOOL_ADDPREF, TR("Aggiungi"), TOOL_ADDPREF);
|
||||
add_button_tool(DLG_INFO, TR("Info"), TOOL_INFO);
|
||||
add_button_tool(DLG_HELP, TR("Help"), TOOL_HELP);
|
||||
add_button_tool(DLG_QUIT, TR(""), TOOL_QUIT);
|
||||
add_button_tool(DLG_SHRINK, TR("Menu Iniziale"), TOOL_FIRSTREC);
|
||||
add_button_tool(DLG_FINDREC, TR("Ricerca"), TOOL_LENTE);
|
||||
add_button_tool(DLG_CONFIG, TR("Opzioni"), TOOL_CONFIG);
|
||||
add_button_tool(DLG_USER, TR("Utente"), TOOL_PERMISSIONS);
|
||||
add_button_tool(DLG_SETPRINT, TR("Imposta"), TOOL_SETPRINT);
|
||||
add_button_tool(DLG_PREF, TR("Preferiti"), TOOL_PREF);
|
||||
add_button_tool(DLG_ADDPREF, TR("Aggiungi"), TOOL_ADDPREF);
|
||||
add_button_tool(DLG_INFO, TR("Info"), TOOL_INFO);
|
||||
add_button_tool(DLG_HELP, TR("Help"), TOOL_HELP);
|
||||
add_button_tool(DLG_QUIT, TR(""), TOOL_QUIT);
|
||||
|
||||
WINDOW panel = page_win(0);
|
||||
|
||||
|
@ -113,7 +113,8 @@ protected: // TMask
|
||||
|
||||
protected:
|
||||
virtual void select_tree_current();
|
||||
enum { DLG_TREE = 101, DLG_LIST = 102, DLG_SHRINK = 201 };
|
||||
enum { DLG_TREE = 101, DLG_LIST,
|
||||
DLG_SHRINK = 201, DLG_PREF, DLG_ADDPREF };
|
||||
|
||||
public:
|
||||
TExplorer_mask(TMenu& menu);
|
||||
|
@ -347,13 +347,16 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
{
|
||||
TBook_field& bf = (TBook_field&)field(DLG_MAIN);
|
||||
// ba1 e ba2 sono programmi di manutenzione da eseguire in modo esclusivo
|
||||
const bool manu = mi.run_modal();
|
||||
if (manu)
|
||||
if (mi.run_modal())
|
||||
{
|
||||
bf.remove_all_pages(); // Chiude tutti i programmi in corso
|
||||
mi.perform(); // Esegui in sincrono e a tutto schermo
|
||||
if (installing()) // when ba1 -6
|
||||
stop_run(K_FORCE_CLOSE);
|
||||
} else
|
||||
if (mi.run_fullscreen())
|
||||
{
|
||||
mi.perform(); // Esegui in asincrono a pieno schermo
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ END
|
||||
BUTTON DLG_FINDREC 10 2
|
||||
BEGIN
|
||||
PROMPT -45 -11 "Ri~cerca"
|
||||
PICTURE BMP_FINDREC
|
||||
PICTURE 166
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
|
@ -93,8 +93,8 @@ Caption = "Query e Report"
|
||||
Picture = <ba03>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Generatore query", "ba8 -1", ""
|
||||
Item_02 = "Generatore report", "ba8 -2", "", 10217
|
||||
Item_01 = "Generatore query", "ba8 -1", "S"
|
||||
Item_02 = "Generatore report", "ba8 -2", "S", 10217
|
||||
Item_03 = "Convertitore da form a report", "ba8 -3", ""
|
||||
Item_04 = "Ricerca file archiviati", "ba8 -5", ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user