anagiu.h Aggiunti campi
config.cpp Aggiunta list_values controls.cpp Allineati meglio i campi statici ed allargati i bottoni golem.cpp Corretto TDDE mailbox.cpp Aggiunti const qua e la mask.cpp Corretto conteggio delle pagine git-svn-id: svn://10.65.10.50/trunk@3012 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ffcea7e716
commit
7371da0e38
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#ifndef __ANAGIU_H
|
#ifndef __ANAGIU_H
|
||||||
#define __ANAGIU_H
|
#define __ANAGIU_H
|
||||||
|
|
||||||
|
#define ANG_TIPOA "TIPOA"
|
||||||
#define ANG_CODANAGR "CODANAGR"
|
#define ANG_CODANAGR "CODANAGR"
|
||||||
#define ANG_NATGIU "NATGIU"
|
#define ANG_NATGIU "NATGIU"
|
||||||
#define ANG_COMRES "COMRES"
|
#define ANG_COMRES "COMRES"
|
||||||
|
@ -503,6 +503,12 @@ int TConfig::list_variables(TString_array& vl, bool value, const char* section)
|
|||||||
return vl.items();
|
return vl.items();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TAssoc_array& TConfig::list_variables(const char* section)
|
||||||
|
{
|
||||||
|
set_paragraph(section);
|
||||||
|
return _data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TConfig::TConfig(int which_config, const char* paragraph)
|
TConfig::TConfig(int which_config, const char* paragraph)
|
||||||
{
|
{
|
||||||
|
@ -127,6 +127,10 @@ public:
|
|||||||
// add_value e' TRUE ci mette "variabile<pipe>valore"
|
// add_value e' TRUE ci mette "variabile<pipe>valore"
|
||||||
// ACHTUNG: l'array e' in ordine HASH (CAZZ)
|
// ACHTUNG: l'array e' in ordine HASH (CAZZ)
|
||||||
int list_variables(TString_array& vl, bool add_value = FALSE, const char* section = NULL);
|
int list_variables(TString_array& vl, bool add_value = FALSE, const char* section = NULL);
|
||||||
|
|
||||||
|
// @cmember Ritorna l'intero array delle variabili della sezione
|
||||||
|
// eventualmente specificata da <p section>
|
||||||
|
const TAssoc_array& list_variables(const char* section = NULL);
|
||||||
|
|
||||||
// @cmember Costruttore (il paragrafo iniziale e' il modulo corrente
|
// @cmember Costruttore (il paragrafo iniziale e' il modulo corrente
|
||||||
// salvo diversa indicazione)
|
// salvo diversa indicazione)
|
||||||
|
@ -797,10 +797,6 @@ TText_control::TText_control(WINDOW win, short cid,
|
|||||||
_obj = xi_create(get_interface(win), def);
|
_obj = xi_create(get_interface(win), def);
|
||||||
CHECKS(_obj, "Can't create TText_control ", text);
|
CHECKS(_obj, "Can't create TText_control ", text);
|
||||||
|
|
||||||
// Alza di un pixel il rettangolo per allinearlo meglio agli edit field
|
|
||||||
RCT& tr = _obj->v.text->rct;
|
|
||||||
tr.top--; tr.bottom--;
|
|
||||||
|
|
||||||
xi_dequeue();
|
xi_dequeue();
|
||||||
xi_tree_free(def);
|
xi_tree_free(def);
|
||||||
}
|
}
|
||||||
@ -823,7 +819,11 @@ TGroupbox_control::TGroupbox_control(WINDOW win, short cid,
|
|||||||
short left, short top, short width, short height,
|
short left, short top, short width, short height,
|
||||||
const char* flags, const char* text)
|
const char* flags, const char* text)
|
||||||
: TText_control(win, cid, left, top, width, 1, flags, text)
|
: TText_control(win, cid, left, top, width, 1, flags, text)
|
||||||
{
|
{
|
||||||
|
// Alza di un pixel il rettangolo per non coprire il rettangolo
|
||||||
|
RCT& tr = _obj->v.text->rct;
|
||||||
|
tr.top--; tr.bottom--;
|
||||||
|
|
||||||
XI_RCT rct; coord2rct(win, left, top, width, height, rct);
|
XI_RCT rct; coord2rct(win, left, top, width, height, rct);
|
||||||
rct.top += XI_FU_MULTIPLE - 2;
|
rct.top += XI_FU_MULTIPLE - 2;
|
||||||
rct.bottom -= Y_FU_MULTIPLE / 2;
|
rct.bottom -= Y_FU_MULTIPLE / 2;
|
||||||
@ -881,6 +881,8 @@ void TField_control::create(WINDOW win, short cid,
|
|||||||
frm_def->app_data = (long)this;
|
frm_def->app_data = (long)this;
|
||||||
|
|
||||||
XI_RCT rct; coord2rct(win, left, top, width, height, rct);
|
XI_RCT rct; coord2rct(win, left, top, width, height, rct);
|
||||||
|
rct.right += XI_FU_MULTIPLE/4;
|
||||||
|
|
||||||
unsigned long attrib = flags2attr(flags) | XI_ATR_AUTOSELECT;
|
unsigned long attrib = flags2attr(flags) | XI_ATR_AUTOSELECT;
|
||||||
if (!CAMPI_SCAVATI)
|
if (!CAMPI_SCAVATI)
|
||||||
attrib |= XI_ATR_BORDER;
|
attrib |= XI_ATR_BORDER;
|
||||||
@ -889,7 +891,7 @@ void TField_control::create(WINDOW win, short cid,
|
|||||||
|
|
||||||
XI_OBJ_DEF* def = xi_add_field_def(frm_def, cid,
|
XI_OBJ_DEF* def = xi_add_field_def(frm_def, cid,
|
||||||
rct.top, rct.left,
|
rct.top, rct.left,
|
||||||
width * XI_FU_MULTIPLE + XI_FU_MULTIPLE/4,
|
rct.right - rct.left,
|
||||||
attrib, cid, maxlen+1,
|
attrib, cid, maxlen+1,
|
||||||
NORMAL_COLOR, NORMAL_BACK_COLOR,
|
NORMAL_COLOR, NORMAL_BACK_COLOR,
|
||||||
NORMAL_COLOR, DISABLED_BACK_COLOR,
|
NORMAL_COLOR, DISABLED_BACK_COLOR,
|
||||||
@ -905,7 +907,7 @@ void TField_control::create(WINDOW win, short cid,
|
|||||||
f->button = TRUE;
|
f->button = TRUE;
|
||||||
f->pixel_button_distance = 1;
|
f->pixel_button_distance = 1;
|
||||||
}
|
}
|
||||||
if (rct.bottom - rct.top > Y_FU_MULTIPLE)
|
if (height > 1) // E' un multiline, quindi setto il rettangolo
|
||||||
f->xi_rct = rct;
|
f->xi_rct = rct;
|
||||||
|
|
||||||
XI_OBJ* itf = get_interface(win);
|
XI_OBJ* itf = get_interface(win);
|
||||||
@ -1009,16 +1011,7 @@ void TButton_control::create(WINDOW win, short cid,
|
|||||||
if (width <= 0) width = strlen(t)+3;
|
if (width <= 0) width = strlen(t)+3;
|
||||||
|
|
||||||
RCT rct; coord2rct(win, left, top, width, height, rct);
|
RCT rct; coord2rct(win, left, top, width, height, rct);
|
||||||
if (cid == DLG_F9)
|
|
||||||
{
|
|
||||||
rct.left++;
|
|
||||||
rct.top--;
|
|
||||||
rct.right++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wc == WC_CHECKBOX)
|
|
||||||
rct.right += XI_FU_MULTIPLE / 2;
|
|
||||||
|
|
||||||
const unsigned long attrib = flags2attr(flags);
|
const unsigned long attrib = flags2attr(flags);
|
||||||
XI_OBJ_DEF* def = xi_add_button_def(NULL, cid, &rct, attrib, (char*)t, cid);
|
XI_OBJ_DEF* def = xi_add_button_def(NULL, cid, &rct, attrib, (char*)t, cid);
|
||||||
CHECKD(def, "Can't create the interface of TButton_control ", cid);
|
CHECKD(def, "Can't create the interface of TButton_control ", cid);
|
||||||
@ -1037,6 +1030,15 @@ void TButton_control::create(WINDOW win, short cid,
|
|||||||
_obj = xi_create(container, def);
|
_obj = xi_create(container, def);
|
||||||
CHECKD(_obj, "Can't create TButton_control ", cid);
|
CHECKD(_obj, "Can't create TButton_control ", cid);
|
||||||
|
|
||||||
|
// Aggiusta bottoni con icona a sinistra
|
||||||
|
if (wc == WC_CHECKBOX || wc == WC_RADIOBUTTON)
|
||||||
|
{
|
||||||
|
RCT& r = _obj->v.btn->rct;
|
||||||
|
r.top++; r.bottom++;
|
||||||
|
r.right += XI_FU_MULTIPLE / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
xi_dequeue();
|
xi_dequeue();
|
||||||
xi_tree_free(def);
|
xi_tree_free(def);
|
||||||
|
|
||||||
|
@ -243,20 +243,37 @@ HIDDEN BOOLEAN hook(HWND hwnd,
|
|||||||
bool ok = FALSE;
|
bool ok = FALSE;
|
||||||
const char* an = CUR_DDE->get_app_name();
|
const char* an = CUR_DDE->get_app_name();
|
||||||
if (an && *an)
|
if (an && *an)
|
||||||
ok = a.empty() || a == an;
|
ok = a.empty() || a.compare(an, -1, TRUE) == 0;
|
||||||
if (ok)
|
if (ok) // Server name ok
|
||||||
{
|
{
|
||||||
ok = CUR_DDE->do_initiate(wparam, t);
|
const bool query_topics = t.empty() || t == "*";
|
||||||
if (ok)
|
TToken_string topics = CUR_DDE->get_topics();
|
||||||
{
|
ok = !topics.empty_items(); // No topics?
|
||||||
TToken_string topics(t);
|
if (ok && !query_topics)
|
||||||
if (topics.empty_items())
|
{
|
||||||
topics = CUR_DDE->get_topics();
|
ok = FALSE;
|
||||||
for (t = topics.get(0); t.not_empty(); t = topics.get())
|
for (const char* topo = topics.get(0); topo; topo = topics.get())
|
||||||
{ // E' obbligatorio crearne dei nuovi! Non spostare fuori dal ciclo!
|
{
|
||||||
app = GlobalAddAtom(CUR_DDE->get_app_name());
|
if (t.compare(topo, -1, TRUE) == 0)
|
||||||
topic = GlobalAddAtom(t);
|
{
|
||||||
SendMessage((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, MAKELPARAM(app,topic));
|
ok = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ok) // Topic ok
|
||||||
|
{
|
||||||
|
ok = CUR_DDE->do_initiate(wparam, t);
|
||||||
|
if (ok) // Connection ok
|
||||||
|
{
|
||||||
|
if (!query_topics)
|
||||||
|
topics = t;
|
||||||
|
for (t = topics.get(0); t.not_empty(); t = topics.get())
|
||||||
|
{ // E' obbligatorio crearne dei nuovi! Non spostare fuori dal ciclo!
|
||||||
|
app = GlobalAddAtom(CUR_DDE->get_app_name());
|
||||||
|
topic = GlobalAddAtom(t);
|
||||||
|
SendMessage((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, MAKELPARAM(app,topic));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -273,10 +290,7 @@ HIDDEN BOOLEAN hook(HWND hwnd,
|
|||||||
break;
|
break;
|
||||||
case WM_DDE_EXECUTE:
|
case WM_DDE_EXECUTE:
|
||||||
{
|
{
|
||||||
TString cmd(256);
|
const TString cmd((const char*)lparam);
|
||||||
cmd = (const char*)GlobalLock((HGLOBAL)lparam);
|
|
||||||
GlobalUnlock((HGLOBAL)lparam);
|
|
||||||
|
|
||||||
DDEACK ack; memset(&ack, 0, sizeof(ack));
|
DDEACK ack; memset(&ack, 0, sizeof(ack));
|
||||||
ack.fAck = CUR_DDE->do_execute(wparam, cmd);
|
ack.fAck = CUR_DDE->do_execute(wparam, cmd);
|
||||||
// Ritorna indietro l'handle globale che verra' distrutto dal chiamante
|
// Ritorna indietro l'handle globale che verra' distrutto dal chiamante
|
||||||
|
@ -96,7 +96,7 @@ TMessage* TMailbox::next(
|
|||||||
|
|
||||||
// @mfunc Ritorna il prossimo messaggio con lo stesso oggetto
|
// @mfunc Ritorna il prossimo messaggio con lo stesso oggetto
|
||||||
TMessage* TMailbox::next_s(
|
TMessage* TMailbox::next_s(
|
||||||
char* s, // @parm Oggetto del messaggio da ritornare
|
const char* s, // @parm Oggetto del messaggio da ritornare
|
||||||
bool read) // @parm Indica se il messaggio deve essere tra quelli
|
bool read) // @parm Indica se il messaggio deve essere tra quelli
|
||||||
// letti (default FALSE)
|
// letti (default FALSE)
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public:
|
|||||||
// @cmember Ritorna il prossimo messaggio
|
// @cmember Ritorna il prossimo messaggio
|
||||||
TMessage* next(bool read = FALSE);
|
TMessage* next(bool read = FALSE);
|
||||||
// @cmember Ritorna il prossimo messaggio con lo stesso oggetto
|
// @cmember Ritorna il prossimo messaggio con lo stesso oggetto
|
||||||
TMessage* next_s(char* s, bool read = FALSE);
|
TMessage* next_s(const char* s, bool read = FALSE);
|
||||||
// @cmember Ritorna il prossimo messaggio con lo stesso mandante
|
// @cmember Ritorna il prossimo messaggio con lo stesso mandante
|
||||||
TMessage* next_f(char* f, bool read = FALSE);
|
TMessage* next_f(char* f, bool read = FALSE);
|
||||||
// @cmember Manda un messaggio
|
// @cmember Manda un messaggio
|
||||||
|
@ -728,17 +728,17 @@ WINDOW TMask::read_page(
|
|||||||
if (!orecchie && !toolbar) // Controlla se la maschera ha piu' di una pagina
|
if (!orecchie && !toolbar) // Controlla se la maschera ha piu' di una pagina
|
||||||
{
|
{
|
||||||
const streampos pos = scanner.tellg(); // Memorizza posizione dello scanner
|
const streampos pos = scanner.tellg(); // Memorizza posizione dello scanner
|
||||||
TString l(scanner.line().left(2));
|
TString l(scanner.line());
|
||||||
while (l != "EN" && l.not_empty())
|
while (l != "ENDMASK" && l.not_empty())
|
||||||
{
|
{
|
||||||
if (l == "PA") // Ho trovato un'altra pagina!
|
if (l == "PA") // Ho trovato un'altra pagina!
|
||||||
{
|
{
|
||||||
orecchie = TRUE; // Quindi devo metterci le orecchie
|
orecchie = TRUE; // Quindi devo metterci le orecchie
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
l = scanner.line().left(2);
|
l = scanner.line();
|
||||||
}
|
}
|
||||||
scanner.seekg(pos); // Ripristin aposizione dello scanner
|
scanner.seekg(pos); // Ripristina posizione dello scanner
|
||||||
}
|
}
|
||||||
|
|
||||||
WINDOW w;
|
WINDOW w;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user