Patch level : 4.0
Files correlati : ba8 Ricompilazione Demo : [ ] Commento : Corretta gestione immagini grandi su alberi git-svn-id: svn://10.65.10.50/trunk@16173 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5f61f2fff0
commit
b35f372dfc
@ -878,17 +878,6 @@ TTree_window::TTree_window(int x, int y, int dx, int dy,
|
||||
// TControl_host_window
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TControl_host_window : public TField_window
|
||||
{
|
||||
protected:
|
||||
WINDOW _ctrl;
|
||||
|
||||
protected:
|
||||
void handler(WINDOW win, EVENT* ep);
|
||||
TControl_host_window(int x, int y, int dx, int dy,
|
||||
WINDOW parent, TWindowed_field* owner);
|
||||
};
|
||||
|
||||
void TControl_host_window::handler(WINDOW win, EVENT* ep)
|
||||
{
|
||||
switch (ep->type)
|
||||
@ -901,6 +890,10 @@ void TControl_host_window::handler(WINDOW win, EVENT* ep)
|
||||
xvt_vobj_move(_ctrl, &rct);
|
||||
}
|
||||
break;
|
||||
case E_UPDATE:
|
||||
if (_ctrl != NULL_WIN)
|
||||
return; // Inutile disegnare: _ctrl occupa tutta la client area
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -968,8 +961,14 @@ bool TTree_window::add_child(XVT_TREEVIEW_NODE parent)
|
||||
else
|
||||
ii = im_nor->xvt_image();
|
||||
XVT_TREEVIEW_NODE child = xvt_treeview_add_child_node(_ctrl, parent, type, ii, ic, ie, desc, NULL, id);
|
||||
if (type == XVT_TREEVIEW_NODE_NONTERMINAL && _tree->expanded())
|
||||
if (child != NULL && type == XVT_TREEVIEW_NODE_NONTERMINAL && _tree->expanded())
|
||||
{
|
||||
for (bool ok = _tree->goto_firstson(); ok; ok = _tree->goto_rbrother())
|
||||
add_child(child);
|
||||
xvt_treeview_expand_node(_ctrl, child, FALSE);
|
||||
}
|
||||
|
||||
_tree->goto_node(id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,18 @@
|
||||
#include "maskfld.h"
|
||||
#endif
|
||||
|
||||
// Native control host window: autresizes its unique child control
|
||||
class TControl_host_window : public TField_window
|
||||
{
|
||||
protected:
|
||||
WINDOW _ctrl;
|
||||
|
||||
protected:
|
||||
virtual void handler(WINDOW win, EVENT* ep);
|
||||
TControl_host_window(int x, int y, int dx, int dy,
|
||||
WINDOW parent, TWindowed_field* owner);
|
||||
};
|
||||
|
||||
class TGolem_client_field : public TWindowed_field
|
||||
{
|
||||
TGolem_field* _driver;
|
||||
@ -25,7 +37,6 @@ public:
|
||||
virtual ~TGolem_client_field();
|
||||
};
|
||||
|
||||
|
||||
// Implemented in tree.cpp
|
||||
class TTree;
|
||||
|
||||
|
@ -590,7 +590,6 @@ long daytime()
|
||||
if (time(<) != -1)
|
||||
{
|
||||
struct tm * timeloc = localtime(<);
|
||||
|
||||
if (timeloc != NULL)
|
||||
t = timeloc->tm_sec + timeloc->tm_min * 100L + timeloc->tm_hour * 10000L;
|
||||
}
|
||||
@ -599,8 +598,9 @@ long daytime()
|
||||
|
||||
bool is_power_station()
|
||||
{
|
||||
const char* ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK", "SPOCK", "UHURA", NULL };
|
||||
char hostname[256]; xvt_sys_get_host_name(hostname, sizeof(hostname));
|
||||
const char* ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK",
|
||||
"PICARD", "SPOCK", "SULU", "UHURA", NULL };
|
||||
char hostname[80]; xvt_sys_get_host_name(hostname, sizeof(hostname));
|
||||
for (int i = 0; ranger[i]; i++)
|
||||
{
|
||||
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user