Patch level : 10.0
Files correlati : ba0 Ricompilazione Demo : [ ] Commento : Aggiunto supporto per interlinea git-svn-id: svn://10.65.10.50/trunk@19736 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6b0f9067aa
commit
166297ad31
@ -38,6 +38,7 @@ extern int TOOL_SIZE;
|
||||
extern bool TOOL_TEXT;
|
||||
extern bool EASY_RIDER;
|
||||
extern bool ENTER_AS_TAB;
|
||||
extern int INTERLINE;
|
||||
|
||||
const COLOR COLOR_DKCYAN = XVT_MAKE_COLOR(0,128,128);
|
||||
const COLOR COLOR_DKYELLOW = XVT_MAKE_COLOR(128,128, 0);
|
||||
|
@ -46,6 +46,7 @@ int TOOL_SIZE = 24;
|
||||
bool TOOL_TEXT = true;
|
||||
bool EASY_RIDER = true;
|
||||
bool ENTER_AS_TAB = false;
|
||||
int INTERLINE = 0;
|
||||
|
||||
HIDDEN bool _ddl_shown = false;
|
||||
HIDDEN int _last_mouse_button = 0;
|
||||
@ -202,7 +203,7 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
|
||||
|
||||
TConfig font(CONFIG_GUI, "Colors");
|
||||
TString font_ser_desc = font.get("FontDesc"); // Modernamente e' nel paragrafo Colors
|
||||
int interline = font.get_int("InterLine", NULL, -1, -1);
|
||||
INTERLINE = font.get_int("InterLine", NULL, -1, -1);
|
||||
|
||||
if (font_ser_desc.empty())
|
||||
{
|
||||
@ -231,13 +232,13 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
|
||||
else
|
||||
{
|
||||
//calcolo interlinea se non specificata dall'utente
|
||||
if (interline < 0) //interlinea automatica
|
||||
if (INTERLINE < 0) //interlinea automatica
|
||||
{
|
||||
const PNT pnt = xvtil_taskwin_size();
|
||||
ROWY = max(CHARY, pnt.v/MAX_MASK_ROWS);
|
||||
}
|
||||
else
|
||||
ROWY = CHARY + interline;
|
||||
ROWY = CHARY + INTERLINE;
|
||||
}
|
||||
XI_PNT fu = { ROWY, CHARX };
|
||||
xi_pu_to_fu(NULL, &fu, 1);
|
||||
@ -1856,18 +1857,6 @@ TRadiobutton_control::TRadiobutton_control(WINDOW win, short cid,
|
||||
XI_OBJ* itf = get_interface(win);
|
||||
XI_RCT rct = coord2rct(itf, left, top, width, height);
|
||||
|
||||
if (height > 1)
|
||||
{
|
||||
// Aggiusta rettangolo in modo da centrare i bottoni
|
||||
const int extra = rct.bottom - rct.top - tot * XI_FU_MULTIPLE;
|
||||
if (extra > 0)
|
||||
rct.top += extra / 2;
|
||||
else
|
||||
if (extra < 0)
|
||||
rct.bottom -= extra;
|
||||
rct.left -= XI_FU_MULTIPLE / 4;
|
||||
rct.right += XI_FU_MULTIPLE / 4;
|
||||
}
|
||||
XI_OBJ_DEF* def = xi_add_container_def(NULL, cid, &rct, orient, cid);
|
||||
def->app_data = (long)this;
|
||||
|
||||
@ -1892,6 +1881,24 @@ TRadiobutton_control::TRadiobutton_control(WINDOW win, short cid,
|
||||
_obj = xi_create(itf, def);
|
||||
CHECKD(_obj, "Can't create radio-button container ", cid);
|
||||
|
||||
if (height > 1 && tot > 1)
|
||||
{
|
||||
xi_get_rect(_obj, &rct);
|
||||
|
||||
int children;
|
||||
XI_OBJ** child = xi_get_member_list(_obj, &children);
|
||||
|
||||
XI_RCT brct; xi_get_rect(child[0], &brct);
|
||||
const int bheight = brct.bottom-brct.top;
|
||||
const int delta = rct.bottom-rct.top - children*bheight;
|
||||
for (int c = 0; c < children; c++)
|
||||
{
|
||||
XI_RCT& brct = child[c]->v.btn->rct;
|
||||
brct.top = rct.top + delta*c/(tot-1) + bheight*c;
|
||||
brct.bottom = brct.top + bheight;
|
||||
}
|
||||
}
|
||||
|
||||
update_tab_cid();
|
||||
|
||||
xi_dequeue();
|
||||
|
@ -854,6 +854,7 @@ bool TDongle::burn()
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*
|
||||
#define BIT31 (1L<<31)
|
||||
#define MSK31 (~BIT31)
|
||||
|
||||
@ -927,6 +928,7 @@ bool TDongle::pay_assist(int index, real imp, bool lire)
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
*/
|
||||
|
||||
const TString_array& TDongle::info() const
|
||||
{
|
||||
|
@ -81,12 +81,12 @@ public:
|
||||
TDongleHardware hardware() const { return _hardware; }
|
||||
bool local() const { return _hardware == _dongle_hardlock || _hardware == _dongle_eutron; }
|
||||
bool network() const { return _hardware == _dongle_network; }
|
||||
|
||||
/*
|
||||
real residual_assist(int index, bool lire) const;
|
||||
bool can_require_assist(int index) const;
|
||||
bool require_assist(int index, real imp, bool lire);
|
||||
bool pay_assist(int index, real imp, bool lire);
|
||||
|
||||
*/
|
||||
const TString& administrator(TString* pwd = NULL) const;
|
||||
int oem() const;
|
||||
const TString& reseller() const;
|
||||
|
@ -28,7 +28,7 @@ class TScanner : public ifstream
|
||||
// @cmember:(INTERNAL) Indica se il token e' stato ritornato al file
|
||||
bool _pushed;
|
||||
// @cmember:(INTERNAL) Numero della linea in corso di lettura
|
||||
word _line;
|
||||
size_t _line;
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
@ -72,7 +72,7 @@ public:
|
||||
const TString& token() const
|
||||
{ return _token; }
|
||||
// @cmember Ritorna il numero di linea corrente
|
||||
word linenum()
|
||||
size_t linenum()
|
||||
{ return _line; }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user