Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_visible Class Reference

base class for visible widgets More...

#include <hk_visible.h>

Inheritance diagram for hk_visible:

hk_class hk_dbvisible hk_dsvisible hk_dsdatavisible hk_dsgrid hk_importcsv hk_kdesimplegrid hk_kdetabledesign hk_subform hk_dsgridcolumn hk_reportdata hk_reportsection hk_kdegrid hk_kdecsvimportdialog List of all members.

Public Types

enum  enum_visibletype {
  textlabel, button, rowselector, boolean,
  lineedit, memo, combobox, grid,
  form, report, reportsection, reportdata,
  query, subform, image, date,
  tabvisible, other
}
enum  alignmenttype { alignleft, alignright, aligncenter, aligndefault }

Public Member Functions

 hk_visible (hk_presentation *p=NULL)
virtual ~hk_visible (void)
void set_x (unsigned int px, bool registerchange=true)
void set_y (unsigned int py, bool registerchange=true)
void set_width (unsigned int w, bool registerchange=true)
void set_height (unsigned int h, bool registerchange=true)
unsigned int x (void) const
unsigned int y (void) const
unsigned int width (void) const
unsigned int height (void)
void set_size (unsigned int x, unsigned int y, unsigned int w, unsigned int h, bool registerchange=true)
void set_size (unsigned int x, unsigned int y, unsigned int w, unsigned int h, bool registerchange, bool force_setting)
void set_size (unsigned int width, unsigned int height, bool registerchange=true)
void set_position (unsigned int x, unsigned int y, bool registerchange=true)
void set_label (const hk_string &l, bool registerchange=true)
void set_label (const hk_string &l, bool registerchange, bool force_setting)
hk_string label (void)
bool set_identifier (const hk_string &, bool registerchange=true, enum_interaction=interactive)
hk_string identifier (void) const
enum_visibletype type (void)
void set_font (const hk_string &font, int size, bool registerchange=true)
void set_font (const hk_string &font, int size, bool registerchange, bool force_setting)
void set_font (const hk_font &font, bool registerchange=true)
void set_font (const hk_font &font, bool registerchange, bool force_setting)
virtual hk_font font (void)
void set_foregroundcolour (const hk_colour &colour, bool registerchange=true)
void set_foregroundcolour (const hk_colour &colour, bool registerchange, bool force_setting)
hk_colour foregroundcolour (void)
void set_backgroundcolour (const hk_colour &colour, bool registerchange=true)
void set_backgroundcolour (const hk_colour &colour, bool registerchange, bool force_setting)
hk_colour backgroundcolour (void)
void set_neverregisterchange (bool n)
void set_neverregisterchange (bool n, bool force_setting)
bool neverregisterchange (void)
virtual void savedata (ostream &s)
virtual void loaddata (const hk_string &definition)
long presentationnumber (void) const
void set_datetimeformat (const hk_string &datetime, const hk_string &date, const hk_string &time)
void set_datetimeformat (const hk_string &datetime, const hk_string &date, const hk_string &time, bool force_setting)
hk_string datetimeformat (void)
hk_string dateformat (void)
hk_string timeformat (void)
void set_counts_as (unsigned long int c)
virtual void set_counts_as (unsigned long int c, bool force_setting)
virtual unsigned long int counts_as (void)
virtual hk_string replace (const hk_string &where)
hk_presentationpresentation (void)
void set_load_presentationnumber (bool l)
void set_load_presentationnumber (bool l, bool force_setting)
bool load_presentationnumber (void)
void set_alignment (alignmenttype a, bool registerchange=true)
void set_alignment (alignmenttype a, bool registerchange, bool force_setting)
alignmenttype alignment (void)
void set_tooltip (const hk_string &, bool registerchange=true, bool force_setting=false)
hk_string tooltip (void)
virtual void show_widget (void)
virtual void hide_widget (void)
virtual bool close_widget (void)
virtual void lower_widget (bool registerchange=true)
virtual void raise_widget (bool registerchange=true)
void set_on_click_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_click_action (void)
void set_on_doubleclick_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_doubleclick_action (void)
void set_on_open_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_open_action (void)
void set_on_close_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_close_action (void)
void set_on_getfocus_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_getfocus_action (void)
void set_on_loosefocus_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_loosefocus_action (void)
void set_on_key_action (const hk_string &, bool registerchange=true, bool force_setting=true)
hk_string on_key_action (void)
void set_key (const hk_key &)
hk_keykey () const
void set_enabled (bool enabled, bool registerchange=true, bool force_setting=false)
bool is_enabled ()
virtual bool action_on_click (void)
virtual bool action_on_doubleclick (void)
virtual bool action_on_close (void)
virtual bool action_on_open (void)
virtual bool action_on_getfocus (void)
virtual bool action_on_loosefocus (void)
virtual bool action_on_key (void)
bool in_tabvisible (void) const
void set_buddylabel (long int labelid, bool registerchange=true, bool force_setting=false)
long int buddylabel (void) const
void set_movebuddylabel (bool)
bool move_buddylabel (void) const
int tag_number (const hk_string &)
virtual hk_string tag_value (int tagnumber, bool &ok)
virtual hk_string column_value (const hk_string &colname, bool &ok)
hk_string tag_value (const hk_string &, bool &ok)
int register_tag (const hk_string &)

Static Public Member Functions

static void set_defaulttextalignment (alignmenttype a)
static alignmenttype defaulttextalignment (void)
static void set_defaultnumberalignment (alignmenttype a)
static alignmenttype defaultnumberalignment (void)
static void set_open_maximized_windows (bool m)
static bool open_maximized_windows (void)

Protected Types

enum  enum_has_changed { standard, forcesetting }

Protected Member Functions

virtual void widget_specific_form_resizes (void)
virtual void widget_specific_font_changed (void)
virtual void widget_specific_label_changed (void)
virtual void widget_specific_foregroundcolour_changed (const hk_colour &oldcolour)
virtual void widget_specific_backgroundcolour_changed (const hk_colour &oldcolour)
virtual bool widget_specific_coordinates (unsigned int px, unsigned int py, unsigned int pwidth, unsigned int pheight)
virtual void widget_specific_raise_widget (void)
virtual void widget_specific_lower_widget (void)
virtual void widget_specific_tooltip_changed (void)
virtual void widget_specific_enabled_changed (void)
virtual bool presentationmode_changed (void)
virtual void widget_specific_alignment (void)
virtual void sizetype_changed (void)
virtual void widget_specific_sizetype_changed (void)
bool allow_datachanging (bool force_setting)
void has_changed (bool registerchange, enum_has_changed force_setting=standard)
void set_tabvisible (hk_tabvisible *)

Protected Attributes

hk_presentationp_presentation
enum_visibletype p_visibletype
bool p_setcoordinates
bool p_setwidgetcoordinates
bool while_init

Friends

class hk_presentation
class hk_form
class hk_reportdata
class hk_tabvisible

Detailed Description

base class for visible widgets

Version:
Revision
1.68
Author:
Horst Knorr (hk_classes@knoda.org)
base class for visible widgets.


Member Enumeration Documentation

enum hk_visible::alignmenttype
 

Defines whether the value should be aligned left, right or center.

Enumeration values:
alignleft 
alignright 
aligncenter 
aligndefault 

enum hk_visible::enum_has_changed [protected]
 

Enumeration values:
standard 
forcesetting 

enum hk_visible::enum_visibletype
 

Enumeration values:
textlabel 
button 
rowselector 
boolean 
lineedit 
memo 
combobox 
grid 
form 
report 
reportsection 
reportdata 
query 
subform 
image 
date 
tabvisible 
other 


Constructor & Destructor Documentation

hk_visible::hk_visible hk_presentation p = NULL  ) 
 

virtual hk_visible::~hk_visible void   )  [virtual]
 


Member Function Documentation

virtual bool hk_visible::action_on_click void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_close void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_doubleclick void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_getfocus void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_key void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_loosefocus void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

virtual bool hk_visible::action_on_open void   )  [virtual]
 

Reimplemented in hk_dsgridcolumn.

alignmenttype hk_visible::alignment void   ) 
 

bool hk_visible::allow_datachanging bool  force_setting  )  [protected]
 

hk_colour hk_visible::backgroundcolour void   ) 
 

long int hk_visible::buddylabel void   )  const
 

virtual bool hk_visible::close_widget void   )  [virtual]
 

Reimplemented in hk_kdegrid.

virtual hk_string hk_visible::column_value const hk_string colname,
bool &  ok
[virtual]
 

Reimplemented in hk_reportdata.

virtual unsigned long int hk_visible::counts_as void   )  [virtual]
 

Reimplemented in hk_reportsection.

hk_string hk_visible::dateformat void   ) 
 

Reimplemented in hk_importcsv.

hk_string hk_visible::datetimeformat void   ) 
 

Reimplemented in hk_importcsv.

static alignmenttype hk_visible::defaultnumberalignment void   )  [static]
 

static alignmenttype hk_visible::defaulttextalignment void   )  [static]
 

virtual hk_font hk_visible::font void   )  [virtual]
 

Reimplemented in hk_reportsection, and hk_reportdata.

hk_colour hk_visible::foregroundcolour void   ) 
 

void hk_visible::has_changed bool  registerchange,
enum_has_changed  force_setting = standard
[protected]
 

unsigned int hk_visible::height void   ) 
 

Reimplemented in hk_reportdata.

virtual void hk_visible::hide_widget void   )  [virtual]
 

Reimplemented in hk_kdegrid.

hk_string hk_visible::identifier void   )  const
 

bool hk_visible::in_tabvisible void   )  const
 

bool hk_visible::is_enabled  ) 
 

hk_key* hk_visible::key  )  const
 

returns the currently pressed key. See hk_key for details.

hk_string hk_visible::label void   ) 
 

bool hk_visible::load_presentationnumber void   ) 
 

virtual void hk_visible::loaddata const hk_string definition  )  [virtual]
 

loads the object's values out of the definition string. Especially used to load queries, forms and reports

Reimplemented from hk_class.

Reimplemented in hk_dsvisible, hk_dsdatavisible, hk_dsgrid, hk_dsgridcolumn, and hk_subform.

virtual void hk_visible::lower_widget bool  registerchange = true  )  [virtual]
 

if the widget is part of a presentation this widget will be moved into the background

Reimplemented in hk_reportdata.

bool hk_visible::move_buddylabel void   )  const
 

bool hk_visible::neverregisterchange void   ) 
 

hk_string hk_visible::on_click_action void   ) 
 

Returns:
the script for the on_click action

hk_string hk_visible::on_close_action void   ) 
 

Returns:
the script for the on_close action

hk_string hk_visible::on_doubleclick_action void   ) 
 

Returns:
the script for the on_doubleclick action

hk_string hk_visible::on_getfocus_action void   ) 
 

Returns:
the script for the on_getfocus action

hk_string hk_visible::on_key_action void   ) 
 

Returns:
the script for the on_key action

hk_string hk_visible::on_loosefocus_action void   ) 
 

Returns:
the script for the on_getfocus action

hk_string hk_visible::on_open_action void   ) 
 

Returns:
the script for the on_open action

static bool hk_visible::open_maximized_windows void   )  [static]
 

hk_presentation* hk_visible::presentation void   ) 
 

virtual bool hk_visible::presentationmode_changed void   )  [protected, virtual]
 

Reimplemented in hk_dsvisible, hk_dsdatavisible, hk_dsgridcolumn, hk_reportsection, hk_reportdata, hk_subform, and hk_kdegrid.

long hk_visible::presentationnumber void   )  const
 

returns the unique identification number when this object is part of a form or a report

virtual void hk_visible::raise_widget bool  registerchange = true  )  [virtual]
 

if the widget is part of a presentation this widget will be moved into the front

Reimplemented in hk_reportdata.

int hk_visible::register_tag const hk_string  ) 
 

virtual hk_string hk_visible::replace const hk_string where  )  [virtual]
 

Reimplemented in hk_reportsection.

virtual void hk_visible::savedata ostream &  s  )  [virtual]
 

stores the object's values to stream s. Especially used to store queries, forms and reports

Reimplemented from hk_class.

Reimplemented in hk_dsvisible, hk_dsdatavisible, hk_dsgrid, hk_dsgridcolumn, and hk_subform.

void hk_visible::set_alignment alignmenttype  a,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_alignment alignmenttype  a,
bool  registerchange = true
 

sets the text alignment

void hk_visible::set_backgroundcolour const hk_colour colour,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_backgroundcolour const hk_colour colour,
bool  registerchange = true
 

sets the background colour. This colour will be used to fill the whole background

void hk_visible::set_buddylabel long int  labelid,
bool  registerchange = true,
bool  force_setting = false
 

virtual void hk_visible::set_counts_as unsigned long int  c,
bool  force_setting
[virtual]
 

void hk_visible::set_counts_as unsigned long int  c  ) 
 

void hk_visible::set_datetimeformat const hk_string datetime,
const hk_string date,
const hk_string time,
bool  force_setting
 

void hk_visible::set_datetimeformat const hk_string datetime,
const hk_string date,
const hk_string time
 

static void hk_visible::set_defaultnumberalignment alignmenttype  a  )  [static]
 

Defines how numbers should be aligned. See also set_defaulttextalignment. Numbers are als integer and realtypes and also auto_inc.

static void hk_visible::set_defaulttextalignment alignmenttype  a  )  [static]
 

Defines how text (text are all datatypes except the number types) should be aligned. See also set_defaultnumberalignment

void hk_visible::set_enabled bool  enabled,
bool  registerchange = true,
bool  force_setting = false
 

void hk_visible::set_font const hk_font &  font,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_font const hk_font &  font,
bool  registerchange = true
 

void hk_visible::set_font const hk_string font,
int  size,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_font const hk_string font,
int  size,
bool  registerchange = true
 

sets the font name and size to be used of some reportgenerators

void hk_visible::set_foregroundcolour const hk_colour colour,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_foregroundcolour const hk_colour colour,
bool  registerchange = true
 

sets the foreground colour. This colour will be used for fonts, frames etc

void hk_visible::set_height unsigned int  h,
bool  registerchange = true
 

see set_size

bool hk_visible::set_identifier const hk_string ,
bool  registerchange = true,
enum_interaction  = interactive
 

the identifier is a unique name within a presentation (either a form or a report) with which this object can be identified and thus located

void hk_visible::set_key const hk_key  ) 
 

void hk_visible::set_label const hk_string l,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_label const hk_string l,
bool  registerchange = true
 

Every visible object has a (static) label which will be displayed when necessary, i.e. a combobox usually needs a label

void hk_visible::set_load_presentationnumber bool  l,
bool  force_setting
 

void hk_visible::set_load_presentationnumber bool  l  ) 
 

only interesting with loaddata is used to copy a visible object in a form or a report.

Parameters:
l if true the presentationnumber will be loaded (default)

void hk_visible::set_movebuddylabel bool   ) 
 

void hk_visible::set_neverregisterchange bool  n,
bool  force_setting
 

void hk_visible::set_neverregisterchange bool  n  ) 
 

if a hk_visible object is part of a hk_presentation (i.e. a form) and the size or the label changes the presentation will be informed of this change (and will be stored when closed). If you set n to true the presentation will not be informed

void hk_visible::set_on_click_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_click action

void hk_visible::set_on_close_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_close action The on_close action will be executed when the parent form or report will be set into designmode

void hk_visible::set_on_doubleclick_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_doubleclick action

void hk_visible::set_on_getfocus_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_getfocus action The on_getfocus action will be executed when this widget gets the keyboard focus

void hk_visible::set_on_key_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

void hk_visible::set_on_loosefocus_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_loosefocus action The on_loosefocus action will be executed when this widget looses the keyboard focus

void hk_visible::set_on_open_action const hk_string ,
bool  registerchange = true,
bool  force_setting = true
 

sets the script for the on_open action The on_open action will be executed when the parent form or report will be set into viewmode

static void hk_visible::set_open_maximized_windows bool  m  )  [static]
 

defines whether stand alone windows should open maximized or in defined window size

void hk_visible::set_position unsigned int  x,
unsigned int  y,
bool  registerchange = true
 

void hk_visible::set_size unsigned int  width,
unsigned int  height,
bool  registerchange = true
 

void hk_visible::set_size unsigned int  x,
unsigned int  y,
unsigned int  w,
unsigned int  h,
bool  registerchange,
bool  force_setting
 

void hk_visible::set_size unsigned int  x,
unsigned int  y,
unsigned int  w,
unsigned int  h,
bool  registerchange = true
 

sets the size and the position of the object. In forms the coordinates are in a range from 0 to 10000 (100.00%)

void hk_visible::set_tabvisible hk_tabvisible *   )  [protected]
 

void hk_visible::set_tooltip const hk_string ,
bool  registerchange = true,
bool  force_setting = false
 

sets a little help text that will be shown when the mouse moves over the widget

void hk_visible::set_width unsigned int  w,
bool  registerchange = true
 

see set_size

void hk_visible::set_x unsigned int  px,
bool  registerchange = true
 

see set_size

void hk_visible::set_y unsigned int  py,
bool  registerchange = true
 

see set_size

virtual void hk_visible::show_widget void   )  [virtual]
 

Reimplemented in hk_kdegrid.

virtual void hk_visible::sizetype_changed void   )  [protected, virtual]
 

Reimplemented in hk_reportsection, and hk_reportdata.

int hk_visible::tag_number const hk_string  ) 
 

hk_string hk_visible::tag_value const hk_string ,
bool &  ok
 

virtual hk_string hk_visible::tag_value int  tagnumber,
bool &  ok
[virtual]
 

Reimplemented in hk_reportdata.

hk_string hk_visible::timeformat void   ) 
 

Reimplemented in hk_importcsv.

hk_string hk_visible::tooltip void   ) 
 

Returns:
the tooltip text

enum_visibletype hk_visible::type void   )  [inline]
 

virtual void hk_visible::widget_specific_alignment void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_backgroundcolour_changed const hk_colour oldcolour  )  [protected, virtual]
 

Reimplemented in hk_kdegrid.

virtual bool hk_visible::widget_specific_coordinates unsigned int  px,
unsigned int  py,
unsigned int  pwidth,
unsigned int  pheight
[protected, virtual]
 

Reimplemented in hk_kdegrid.

virtual void hk_visible::widget_specific_enabled_changed void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_font_changed void   )  [protected, virtual]
 

Reimplemented in hk_kdegrid.

virtual void hk_visible::widget_specific_foregroundcolour_changed const hk_colour oldcolour  )  [protected, virtual]
 

Reimplemented in hk_kdegrid.

virtual void hk_visible::widget_specific_form_resizes void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_label_changed void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_lower_widget void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_raise_widget void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_sizetype_changed void   )  [protected, virtual]
 

virtual void hk_visible::widget_specific_tooltip_changed void   )  [protected, virtual]
 

Reimplemented in hk_kdesimplegrid.

unsigned int hk_visible::width void   )  const
 

unsigned int hk_visible::x void   )  const
 

unsigned int hk_visible::y void   )  const
 


Friends And Related Function Documentation

friend class hk_form [friend]
 

Reimplemented in hk_subform.

friend class hk_presentation [friend]
 

friend class hk_reportdata [friend]
 

Reimplemented in hk_reportsection.

friend class hk_tabvisible [friend]
 


Member Data Documentation

hk_presentation* hk_visible::p_presentation [protected]
 

bool hk_visible::p_setcoordinates [protected]
 

bool hk_visible::p_setwidgetcoordinates [protected]
 

enum_visibletype hk_visible::p_visibletype [protected]
 

bool hk_visible::while_init [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Mar 9 18:40:42 2006 for hk_classes by  doxygen 1.4.1