Migliorata visibilità studio corrente in menu principale
git-svn-id: svn://10.65.10.50/branches/R_10_00@22878 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
92268fcfd9
commit
d2d92a2761
@ -2349,7 +2349,7 @@ TMenu_application::TMenu_application(const char* name)
|
||||
int ba0100(int argc, char** argv)
|
||||
{
|
||||
if (xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_ALREADY_RUNNING))
|
||||
return error_box(TR("Il menu principale è già in esecuzione!"));
|
||||
return warning_box(TR("Il menu principale è già in esecuzione!"));
|
||||
|
||||
TApplication::check_parameters(argc, argv);
|
||||
|
||||
|
@ -320,11 +320,18 @@ void TMenu_tree::change_root(const char* rid)
|
||||
goto_root();
|
||||
}
|
||||
|
||||
TMenu_tree::TMenu_tree(TMenu& menu) : _menu(&menu), _curr_id(128, '/')
|
||||
void TMenu_tree::set_menu(TMenu& menu)
|
||||
{
|
||||
_menu = &menu;
|
||||
_curr_id.cut(0);
|
||||
change_root("MENU_000");
|
||||
}
|
||||
|
||||
TMenu_tree::TMenu_tree(TMenu& menu) : _menu(NULL), _curr_id(128, '/')
|
||||
{
|
||||
set_menu(menu);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Utility
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -952,12 +959,13 @@ void TMenulist_field::curr_item(TToken_string& id) const
|
||||
// TSpidey_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
#define DLG_TREE 301
|
||||
#define DLG_LIST 302
|
||||
#define DLG_LOOK 303
|
||||
|
||||
void draw_spider(WINDOW w, int mode, const PNT& mouse)
|
||||
{
|
||||
static int _spider = -1;
|
||||
if (_spider < 0)
|
||||
_spider = ADVANCED_GRAPHICS && is_power_reseller(true); // Attiva eventuale ragno
|
||||
|
||||
static bool _spider = ADVANCED_GRAPHICS && is_power_reseller(true); // Attiva eventuale ragno;
|
||||
if (_spider && xvt_vobj_is_focusable(w))
|
||||
{
|
||||
RCT client; xvt_vobj_get_client_rect(w, &client);
|
||||
@ -1043,9 +1051,9 @@ WINDOW TSpidey_mask::dlg2win(short id) const
|
||||
const int pos = id2pos(id);
|
||||
if (pos >= 0)
|
||||
{
|
||||
TMask_field& f = fld(pos);
|
||||
CHECKD(f.is_kind_of(CLASS_WINDOWED_FIELD), "Not a windowed field ", id);
|
||||
w = ((TWindowed_field&)f).win().win();
|
||||
const TMask_field& f = fld(pos);
|
||||
if (f.is_kind_of(CLASS_WINDOWED_FIELD))
|
||||
w = ((const TWindowed_field&)f).win().win();
|
||||
}
|
||||
return w;
|
||||
}
|
||||
@ -1140,10 +1148,6 @@ TSpidey_mask::TSpidey_mask() : TAutomask ("Menu", 1, 0, 0, 0, 0)
|
||||
// TExplorer_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
#define DLG_TREE 301
|
||||
#define DLG_LIST 302
|
||||
#define DLG_LOOK 303
|
||||
|
||||
void TExplorer_mask::update()
|
||||
{
|
||||
TMask::update();
|
||||
|
@ -57,6 +57,8 @@ public:
|
||||
bool find_string(const TString& str);
|
||||
long find_node(const TString& id);
|
||||
void change_root(const char* id);
|
||||
|
||||
void set_menu(TMenu& menu);
|
||||
|
||||
TMenu_tree(TMenu& menu);
|
||||
virtual ~TMenu_tree() { }
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <defmask.h>
|
||||
#include <dongle.h>
|
||||
#include <execp.h>
|
||||
#include <prefix.h>
|
||||
#include <utility.h>
|
||||
|
||||
enum { DLG_TREE = 101, DLG_LOOK = 102, DLG_MAIN = 103 };
|
||||
@ -716,6 +717,14 @@ long TOutlook_mask::handler(WINDOW w, EVENT* ep)
|
||||
return TSpidey_mask::handler(w, ep);
|
||||
}
|
||||
|
||||
void TOutlook_mask::on_firm_change()
|
||||
{
|
||||
WINDOW pane = dlg2win(DLG_TREE);
|
||||
if (pane != NULL_WIN)
|
||||
xvt_pane_set_title(pane, prefix().firm().ragione_sociale());
|
||||
TSpidey_mask::on_firm_change();
|
||||
}
|
||||
|
||||
bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
@ -871,7 +880,7 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
|
||||
TOutlook_mask::TOutlook_mask(TMenu& menu) : _tree(menu), _locked(false)
|
||||
{
|
||||
xvtil_statbar_destroy(); // Ammazza status bar inutile
|
||||
xvtil_statbar_destroy(); // Ammazza status bar "inutile"
|
||||
RCT rct; xvt_vobj_get_client_rect(TASK_WIN, &rct);
|
||||
|
||||
WINDOW panel = page_win(0);
|
||||
@ -899,6 +908,8 @@ TOutlook_mask::TOutlook_mask(TMenu& menu) : _tree(menu), _locked(false)
|
||||
save_perspective(0); // Salva default
|
||||
load_perspective(1); // Carica custom
|
||||
set_handlers();
|
||||
|
||||
on_firm_change(); // Mostra ragione sociale nella barra del menu
|
||||
}
|
||||
|
||||
TOutlook_mask::~TOutlook_mask()
|
||||
|
87
ba/ba0103.h
87
ba/ba0103.h
@ -1,43 +1,44 @@
|
||||
#ifndef __BA0103_H
|
||||
#define __BA0103_H
|
||||
|
||||
#ifndef TMenu_tree
|
||||
#include "ba0102.h"
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TOutlook_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TBook_field;
|
||||
|
||||
class TOutlook_mask : public TSpidey_mask
|
||||
{
|
||||
TMenu_tree _tree;
|
||||
TPointer_array _icon;
|
||||
TString_array _picture;
|
||||
|
||||
TString _per_def, _per_tmp;
|
||||
bool _locked;
|
||||
TString _last_search;
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
virtual bool can_be_closed() const;
|
||||
|
||||
TBook_field& book_field() const;
|
||||
|
||||
short add_page(const TMenuitem& mi);
|
||||
void set_page_caption(short page, const TString& caption, int icon);
|
||||
|
||||
void save_perspective(int per);
|
||||
void load_perspective(int per);
|
||||
|
||||
public:
|
||||
virtual long handler(WINDOW w, EVENT* ep); // Used by E_PROCESS
|
||||
|
||||
TOutlook_mask(TMenu& menu);
|
||||
~TOutlook_mask();
|
||||
};
|
||||
|
||||
#endif
|
||||
#ifndef __BA0103_H
|
||||
#define __BA0103_H
|
||||
|
||||
#ifndef TMenu_tree
|
||||
#include "ba0102.h"
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TOutlook_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TBook_field;
|
||||
|
||||
class TOutlook_mask : public TSpidey_mask
|
||||
{
|
||||
TMenu_tree _tree;
|
||||
TPointer_array _icon;
|
||||
TString_array _picture;
|
||||
|
||||
TString _per_def, _per_tmp;
|
||||
bool _locked;
|
||||
TString _last_search;
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
virtual bool can_be_closed() const;
|
||||
virtual void on_firm_change();
|
||||
|
||||
TBook_field& book_field() const;
|
||||
|
||||
short add_page(const TMenuitem& mi);
|
||||
void set_page_caption(short page, const TString& caption, int icon);
|
||||
|
||||
void save_perspective(int per);
|
||||
void load_perspective(int per);
|
||||
|
||||
public:
|
||||
virtual long handler(WINDOW w, EVENT* ep); // Used by E_PROCESS
|
||||
|
||||
TOutlook_mask(TMenu& menu);
|
||||
~TOutlook_mask();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user