Patch level : 10.0
Files correlati : ca0 Ricompilazione Demo : [ ] Commento : Migliorata efficienza alberi molto grandi (calib) git-svn-id: svn://10.65.10.50/trunk@20634 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b63eb4e087
commit
294f084769
@ -1234,8 +1234,8 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
int num;
|
||||
XI_OBJ** column = xi_get_member_list(_obj, &num);
|
||||
CHECK(cell.column < num, "Bad column");
|
||||
int rec = cell.row;
|
||||
rec = row2rec(rec);
|
||||
int row = cell.row;
|
||||
const int rec = row2rec(row);
|
||||
const int col = column[cell.column]->cid - FIRST_FIELD;
|
||||
if (!cell_disabled(rec, col))
|
||||
{
|
||||
@ -1569,7 +1569,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
||||
//gestione campi che non appaiono nello sheet ma che possono essere usati nelle ricerche
|
||||
//es: per evitare di avere il valore della prima colonna in una descrizione che si puo' usere..
|
||||
//..per le ricerche, ma che non appare nello sheet (es. ca2100a.uml)
|
||||
if (cid2index(_edit_field->dlg()) == 0 || _cur_col > 1)
|
||||
if (cid2index(_edit_field->dlg()) == 0 || _cur_col > 0)
|
||||
copy_cell2field();
|
||||
|
||||
_edit_field->set_dirty(_cell_dirty = spork); // TBT
|
||||
|
@ -225,6 +225,9 @@ bool TTree::has_rbrother() const
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TTree::could_have_son() const
|
||||
{ return has_son(); }
|
||||
|
||||
bool TTree::has_son() const
|
||||
{
|
||||
TString myself; curr_id(myself);
|
||||
@ -324,7 +327,7 @@ TImage* TTree::get_res_icon(short icon_id) const
|
||||
TImage* TTree::image(bool selected) const
|
||||
{
|
||||
short bmp_id = BMP_FILE;
|
||||
if (has_son())
|
||||
if (could_have_son())
|
||||
bmp_id = selected ? BMP_DIRDN : BMP_DIR;
|
||||
return get_res_image(bmp_id);
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
|
||||
virtual bool has_root() const;
|
||||
virtual bool has_father() const;
|
||||
virtual bool could_have_son() const; // Is not terminal node
|
||||
virtual bool has_son() const;
|
||||
virtual bool has_lbrother() const;
|
||||
virtual bool has_rbrother() const;
|
||||
|
@ -132,7 +132,7 @@ RCT& TWindowed_field::get_rect(RCT& r) const
|
||||
if (_win)
|
||||
xvt_vobj_get_outer_rect(_win->win(), &r);
|
||||
else
|
||||
xvt_rect_set_empty(&r);
|
||||
xvt_rect_set_null(&r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -197,6 +197,15 @@ long TControl_host_window::handler(WINDOW win, EVENT* ep)
|
||||
{
|
||||
switch (ep->type)
|
||||
{
|
||||
case E_FOCUS:
|
||||
if (ep->v.active)
|
||||
{
|
||||
if (_ctrl != NULL_WIN && _ctrl != win)
|
||||
xvt_scr_set_focus_vobj(_ctrl);
|
||||
owner().mask().notify_focus_field(owner().dlg());
|
||||
return 0L;
|
||||
}
|
||||
break;
|
||||
case E_SIZE:
|
||||
if (_ctrl != NULL_WIN)
|
||||
{
|
||||
@ -215,6 +224,12 @@ long TControl_host_window::handler(WINDOW win, EVENT* ep)
|
||||
return TField_window::handler(win, ep);
|
||||
}
|
||||
|
||||
void TControl_host_window::set_focus()
|
||||
{
|
||||
if (_ctrl != NULL_WIN)
|
||||
xvt_scr_set_focus_vobj(_ctrl);
|
||||
}
|
||||
|
||||
TControl_host_window::TControl_host_window(int x, int y, int dx, int dy,
|
||||
WINDOW parent, TWindowed_field* owner)
|
||||
: TField_window(x, y, dx, dy, parent, owner), _ctrl(NULL_WIN)
|
||||
@ -257,8 +272,8 @@ public:
|
||||
|
||||
bool TTree_window::add_child(XVT_TREEVIEW_NODE parent)
|
||||
{
|
||||
XVT_TREEVIEW_NODE_TYPE type = _tree->has_son() ? XVT_TREEVIEW_NODE_NONTERMINAL
|
||||
: XVT_TREEVIEW_NODE_TERMINAL;
|
||||
XVT_TREEVIEW_NODE_TYPE type = _tree->could_have_son() ? XVT_TREEVIEW_NODE_NONTERMINAL
|
||||
: XVT_TREEVIEW_NODE_TERMINAL;
|
||||
if (_hide_leaves && type == XVT_TREEVIEW_NODE_TERMINAL)
|
||||
return false;
|
||||
|
||||
|
@ -17,6 +17,8 @@ protected:
|
||||
|
||||
protected:
|
||||
virtual long handler(WINDOW win, EVENT* ep);
|
||||
virtual void set_focus();
|
||||
|
||||
TControl_host_window(int x, int y, int dx, int dy,
|
||||
WINDOW parent, TWindowed_field* owner);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user