Aggiunta gestione di get e set_picture ai form items
git-svn-id: svn://10.65.10.50/trunk@2272 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
837b4c0c46
commit
780df3a079
@ -663,6 +663,18 @@ bool TForm_item::edit(TMask& m)
|
||||
return dirty;
|
||||
}
|
||||
|
||||
const TString& TForm_item::picture() const
|
||||
{
|
||||
CHECK(0, "Can't get the picture of a generic form item!");
|
||||
return _prompt;
|
||||
}
|
||||
|
||||
void TForm_item::set_picture(const char*)
|
||||
{
|
||||
CHECK(0, "Can't set the picture of a generic form item!");
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TForm_subsection
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -866,14 +878,13 @@ protected:
|
||||
virtual const char* get() const;
|
||||
bool set(const char*);
|
||||
|
||||
const TString& picture() const { return _picture; }
|
||||
|
||||
TFieldref& field(int i) const { return (TFieldref&)_field[i]; }
|
||||
void put_paragraph(const char* s);
|
||||
|
||||
public:
|
||||
virtual const TString& picture() const { return _picture; }
|
||||
virtual void set_picture(const char* p) { _picture = p; }
|
||||
|
||||
void set_picture(const char* p) { _picture = p; }
|
||||
virtual bool edit(TMask& m);
|
||||
TForm_string(TPrint_section* section) : TForm_item(section) {}
|
||||
virtual ~TForm_string() {}
|
||||
@ -1030,7 +1041,7 @@ void TForm_string::put_paragraph(const char* s)
|
||||
_effective_height= i - (_prompt.not_empty() ? 1 : 0);
|
||||
}
|
||||
else
|
||||
string_at(-1, _y, s);
|
||||
string_at(-1, _y, s);
|
||||
}
|
||||
|
||||
|
||||
@ -2782,30 +2793,30 @@ bool TForm::write_profile()
|
||||
|
||||
void TForm::init()
|
||||
{
|
||||
_relation= NULL;
|
||||
_cursor= NULL;
|
||||
_rel_desc= NULL;
|
||||
_isnew= FALSE;
|
||||
_fontname= "Roman 17cpi";
|
||||
_fontsize= 12;
|
||||
_x= 0;
|
||||
_y= 0;
|
||||
_char_to_pos= '\0';
|
||||
_ipx= 0;
|
||||
_ipy= 0;
|
||||
_fpx= 0;
|
||||
_arrange= TRUE;
|
||||
_fink= "+,+,+,+,+,+,+,+,+,-,|";
|
||||
_fink.separator(',');
|
||||
_dirty= FALSE;
|
||||
_relation= NULL;
|
||||
_cursor= NULL;
|
||||
_rel_desc= NULL;
|
||||
_isnew= FALSE;
|
||||
_fontname= "Roman 17cpi";
|
||||
_fontsize= 12;
|
||||
_x= 0;
|
||||
_y= 0;
|
||||
_char_to_pos= '\0';
|
||||
_ipx= 0;
|
||||
_ipy= 0;
|
||||
_fpx= 0;
|
||||
_arrange= TRUE;
|
||||
_fink= "+,+,+,+,+,+,+,+,+,-,|";
|
||||
_fink.separator(',');
|
||||
_dirty= FALSE;
|
||||
}
|
||||
|
||||
void TForm::read(const char* name, const char* code, int lev, const char* desc)
|
||||
{
|
||||
_name= name;
|
||||
_code= code;
|
||||
_editlevel= lev;
|
||||
_desc= desc;
|
||||
_name= name;
|
||||
_code= code;
|
||||
_editlevel= lev;
|
||||
_desc= desc;
|
||||
|
||||
main_app().begin_wait();
|
||||
|
||||
@ -2872,13 +2883,13 @@ void TForm::read(const char* name, const char* code, int lev, const char* desc)
|
||||
|
||||
TForm::TForm()
|
||||
{
|
||||
init();
|
||||
init();
|
||||
}
|
||||
|
||||
TForm::TForm(const char* name, const char* code, int lev, const char* desc)
|
||||
{
|
||||
init();
|
||||
read(name, code, lev, desc);
|
||||
init();
|
||||
read(name, code, lev, desc);
|
||||
}
|
||||
|
||||
TForm::~TForm()
|
||||
|
@ -134,8 +134,8 @@ class TForm : public TObject
|
||||
bool ps_change_number_format(TPrint_section& s, int w, int dec, const char* p);
|
||||
|
||||
protected:
|
||||
void init(); // inizializza il form
|
||||
void read(const char* form, const char * code = "", int editlevel = 0, const char* desc = ""); // carica il form dal file specificato
|
||||
void init(); // inizializza il form
|
||||
void read(const char* form, const char * code = "", int editlevel = 0, const char* desc = ""); // carica il form dal file specificato
|
||||
|
||||
// H = Header, B = Body, F = Footer, R = Relation
|
||||
TPrint_section& section(char s = 'B', word page = 1);
|
||||
@ -295,7 +295,10 @@ public:
|
||||
|
||||
virtual const char* get() const { return _prompt; }
|
||||
virtual bool set(const char* s) { _prompt = s; return TRUE; }
|
||||
const char* prompt() const { return _prompt; }
|
||||
const TString& prompt() const { return _prompt; }
|
||||
|
||||
virtual const TString& picture() const; // Da' CHECK
|
||||
virtual void set_picture(const char*); // Da' CHECK
|
||||
|
||||
TPrint_section& section() const { return *_section; }
|
||||
TForm& form() const { return _section->form(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user