Allineati a destra tutti i campi numerici
Corretta gestione del grassetto di default git-svn-id: svn://10.65.10.50/trunk@1185 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
79509e0417
commit
7924f321c4
@ -1,11 +1,10 @@
|
||||
|
||||
#ifndef __ANAFIS_H
|
||||
#define __ANAFIS_H
|
||||
|
||||
#define ANF_CODANAGR "CODANAGR"
|
||||
#define ANF_DATANASC "DATANASC"
|
||||
#define ANF_SESSO "SESSO"
|
||||
#define ANF_STATONASC "STATONASC"
|
||||
#define ANF_STATONASC "STATO"
|
||||
#define ANF_COMNASC "COMNASC"
|
||||
#define ANF_COMRES "COMRES"
|
||||
#define ANF_TIPOA "TIPOA"
|
||||
|
@ -2550,7 +2550,8 @@ word TReal_field::class_id() const
|
||||
void TReal_field::create(WINDOW w)
|
||||
{
|
||||
TEdit_field::create(w);
|
||||
|
||||
_flags.rightjust = TRUE;
|
||||
|
||||
if (_flags.firm)
|
||||
set(::format("%ld", main_app().get_firm()));
|
||||
else
|
||||
|
@ -37,12 +37,7 @@ public:
|
||||
TString(const TString& s); // Costruttore da un oggetto TString s
|
||||
virtual ~TString(); // Deallocates the string
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// @DES Methods derived from TObject
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// @FPUB
|
||||
virtual const char* class_name() const; // Ritorna il nome della classe
|
||||
virtual const char* class_name() const; // Ritorna il nome della classe
|
||||
virtual word class_id() const; // Ritorna l'identificatore della classe
|
||||
virtual bool ok() const { return _str != NULL; }
|
||||
virtual TObject* dup() const;
|
||||
@ -50,12 +45,7 @@ public:
|
||||
virtual void read_from(istream& in);
|
||||
virtual word hash() const; // Return hash value
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// @DES Query methods
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// @FPUB
|
||||
operator const char*() const { return (const char*)_str; } // *(TString) -> _str
|
||||
operator const char*() const { return (const char*)_str; } // *(TString) -> _str
|
||||
char& operator[](int i) // TString[i] -> _str[i]
|
||||
{
|
||||
CHECKD(i >= 0 && i <= _size, "Bad string subscript: ", i);
|
||||
@ -81,13 +71,7 @@ public:
|
||||
const TString& sub(int from, int to = -1) const; // Ritorna la stringa da FROM a TO (escluso)
|
||||
const TString& right(int count) const; // Ritorna l'oggetto TString composto dai count caratteri da destra
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// @DES Modifying methods
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// @FPUB
|
||||
|
||||
TString& fill(char c, int n = -1); // Riempie con n caratteri c
|
||||
TString& fill(char c, int n = -1); // Riempie con n caratteri c
|
||||
TString& spaces(int n = -1) { return fill(' ', n); }
|
||||
TString& overwrite(const char* s, int pos = 0); // Sovrascrive la stringa s dalla posizione pos
|
||||
TString& insert(const char* s, int pos = 0); // Inserisce la stringa s dalla posizione pos
|
||||
@ -114,13 +98,7 @@ public:
|
||||
TString& lower(); // Mette la stringa in minuscolo
|
||||
TString& add_plural(long num, const char * name); // aggiunge il plurale di name
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// @DES Standard operators
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// @FPUB
|
||||
|
||||
const TString& operator =(const TString& s) { return set(s._str); }
|
||||
const TString& operator =(const TString& s) { return set(s._str); }
|
||||
const TString& operator =(const char* s) { return set(s); }
|
||||
|
||||
TString& operator <<(const char*);
|
||||
|
@ -20,6 +20,7 @@ void fatal_hook()
|
||||
#endif
|
||||
|
||||
HIDDEN XVT_FNTID DEF_FONT = NULL;
|
||||
HIDDEN XVT_FNTID FAT_FONT = NULL;
|
||||
|
||||
#if XVTWS == WMWS
|
||||
|
||||
@ -603,6 +604,7 @@ void customize_controls(bool on)
|
||||
free_controls_bmp();
|
||||
#endif
|
||||
xvt_font_destroy(DEF_FONT);
|
||||
xvt_font_destroy(FAT_FONT);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
@ -615,6 +617,7 @@ XVT_FNTID xvt_default_font()
|
||||
if (DEF_FONT == NULL)
|
||||
{
|
||||
DEF_FONT = xvt_dwin_get_font(TASK_WIN);
|
||||
FAT_FONT = xvt_dwin_get_font(TASK_WIN);
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
NormalFont = GetStockObject(ANSI_FIXED_FONT);
|
||||
@ -637,13 +640,13 @@ XVT_FNTID xvt_default_font()
|
||||
NormalFont = CreateFontIndirect(&LogFont);
|
||||
|
||||
TToken_string desc(128, '/');
|
||||
desc.add("WIN01");
|
||||
desc.add(LogFont.lfHeight);
|
||||
desc.add(LogFont.lfWidth);
|
||||
desc.add(LogFont.lfEscapement);
|
||||
desc.add(LogFont.lfOrientation);
|
||||
desc.add(LogFont.lfWeight);
|
||||
desc.add(LogFont.lfItalic);
|
||||
desc.add("WIN01"); // 0
|
||||
desc.add(LogFont.lfHeight); // 1
|
||||
desc.add(LogFont.lfWidth); // 2
|
||||
desc.add(LogFont.lfEscapement); // 3
|
||||
desc.add(LogFont.lfOrientation); // 4
|
||||
desc.add(LogFont.lfWeight); // 5
|
||||
desc.add(LogFont.lfItalic); // 6
|
||||
desc.add(LogFont.lfUnderline);
|
||||
desc.add(LogFont.lfStrikeOut);
|
||||
desc.add(LogFont.lfCharSet);
|
||||
@ -659,6 +662,12 @@ XVT_FNTID xvt_default_font()
|
||||
CHECK(xvt_font_is_mapped(DEF_FONT), "Can't map native font");
|
||||
xvt_dwin_set_font(TASK_WIN, DEF_FONT);
|
||||
|
||||
desc.add(600, 5);
|
||||
xvt_font_set_native_desc(FAT_FONT, (char*)(const char*)desc);
|
||||
CHECK(xvt_font_has_valid_native_desc(FAT_FONT), "Bad font description");
|
||||
xvt_font_map_using_default(FAT_FONT);
|
||||
CHECK(xvt_font_is_mapped(FAT_FONT), "Can't map native font");
|
||||
|
||||
// Get true text size
|
||||
TEXTMETRIC tm;
|
||||
HWND hdc = (HDC)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_GRAPHIC_CONTEXT);
|
||||
@ -682,16 +691,25 @@ void xvt_set_font(WINDOW win, const char* family, int style, int dim)
|
||||
CHECK(win != NULL_WIN, "Can't set the font in a NULL window");
|
||||
|
||||
#if XVT_OS != XVT_OS_SCOUNIX
|
||||
XVT_FNTID font = xvt_dwin_get_font(TASK_WIN);
|
||||
if (family && *family) xvt_font_set_family(font, (char*)family);
|
||||
if (dim != 0) xvt_font_set_size(font, dim);
|
||||
if (style != XVT_FS_NONE) xvt_font_set_style(font, style);
|
||||
|
||||
if(!xvt_font_is_mapped(font));
|
||||
xvt_font_map(font, win);
|
||||
|
||||
xvt_dwin_set_font(win, font);
|
||||
xvt_font_destroy(font);
|
||||
if ((family == NULL || *family == '\0') &&
|
||||
(style == XVT_FS_NONE || style == XVT_FS_BOLD) &&
|
||||
dim == 0)
|
||||
{
|
||||
xvt_dwin_set_font(win, (style == XVT_FS_NONE) ? DEF_FONT : FAT_FONT);
|
||||
}
|
||||
else
|
||||
{
|
||||
XVT_FNTID font = xvt_dwin_get_font(TASK_WIN);
|
||||
if (family && *family) xvt_font_set_family(font, (char*)family);
|
||||
if (dim != 0) xvt_font_set_size(font, dim);
|
||||
if (style != XVT_FS_NONE) xvt_font_set_style(font, style);
|
||||
|
||||
if(!xvt_font_is_mapped(font));
|
||||
xvt_font_map(font, win);
|
||||
|
||||
xvt_dwin_set_font(win, font);
|
||||
xvt_font_destroy(font);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user