# class hk_visible

base class for visible widgets. More...

Definition | `#include <hk_classes/hk_classes/hk_visible.h>`
Inherits | hk_class [public ]
Inherited by | hk_dbvisible, hk_dsdatavisible, hk_dsgrid, hk_dsgridcolumn, hk_dsvisible, hk_importcsv, hk_kdecsvimportdialog, hk_kdegrid, hk_kdesimplegrid, hk_kdetabledesign, hk_reportdata, hk_reportsection
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum enum_visibletype {textlabel,button,rowselector,boolean,lineedit,memo,combobox,grid,form,report,reportsection,reportdata,other}
- enum alignmenttype {alignleft,alignright,aligncenter,aligndefault}

#### Public Methods

- 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) const
- 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=false)
- 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)
- 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_presentation* presentation (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)
- 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)
- hk_string on_click_action (void)
- void set_on_doubleclick_action (const hk_string&,bool registerchange=true)
- hk_string on_doubleclick_action (void)
- void set_on_open_action (const hk_string&,bool registerchange=true)
- hk_string on_open_action (void)
- void set_on_close_action (const hk_string&,bool registerchange=true)
- hk_string on_close_action (void)

#### Public Static Methods

- 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 Methods

- 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 presentationmode_changed (void)
- virtual void widget_specific_alignment (void)
- virtual void sizetype_changed (void)
- virtual void widget_specific_sizetype_changed (void)
- virtual bool action_on_click (void)
- virtual bool action_on_doubleclick (void)
- virtual bool action_on_close (void)
- virtual bool action_on_open (void)
- bool allow_datachanging (bool force_setting)
- void has_changed (bool registerchange)

#### Protected Members

- hk_presentation* p_presentation
- enum_visibletype p_visibletype
- bool p_setcoordinates
- bool p_setwidgetcoordinates
- bool while_init

## Detailed Description

base class for visible widgets.

hk_visible (hk_presentation* p=NULL)

### hk_visible

~hk_visible (void)

### ~hk_visible

[virtual]

void set_x (unsigned int px, bool registerchange=true)

### set_x

see set_size

void set_y (unsigned int py, bool registerchange=true)

### set_y

see set_size

void set_width (unsigned int w, bool registerchange=true)

### set_width

see set_size

void set_height (unsigned int h, bool registerchange=true)

### set_height

see set_size

unsigned int x (void)

### x

[const]

unsigned int y (void)

### y

[const]

unsigned int width (void)

### width

[const]

unsigned int height (void)

### height

[const]

void set_size (unsigned int x, unsigned int y,unsigned int w, unsigned int h, bool registerchange=true)

### set_size

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

void set_size (unsigned int x, unsigned int y,unsigned int w, unsigned int h, bool registerchange,bool force_setting)

### set_size

void set_size (unsigned int width, unsigned int height, bool registerchange=true)

### set_size

void set_position (unsigned int x, unsigned int y, bool registerchange=true)

### set_position

void set_label (const hk_string& l, bool registerchange=true)

### set_label

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

void set_label (const hk_string& l, bool registerchange,bool force_setting)

### set_label

hk_string label (void)

### label

bool set_identifier (const hk_string&,bool registerchange=true,enum_interaction=interactive)

### set_identifier

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

hk_string identifier (void)

### identifier

[const]

enum enum_visibletype {textlabel,button,rowselector,boolean,lineedit,memo,combobox,grid,form,report,reportsection,reportdata,other}

### enum_visibletype

enum_visibletype type (void)

### type

void set_font (const hk_string& font,int size,bool registerchange=true)

### set_font

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

void set_font (const hk_string& font,int size,bool registerchange,bool force_setting)

### set_font

void set_font (const hk_font& font,bool registerchange=false)

### set_font

void set_font (const hk_font& font,bool registerchange,bool force_setting)

### set_font

hk_font font (void)

### font

[virtual]

void set_foregroundcolour (const hk_colour& colour,bool registerchange=true)

### set_foregroundcolour

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

void set_foregroundcolour (const hk_colour& colour,bool registerchange,bool force_setting)

### set_foregroundcolour

hk_colour foregroundcolour (void)

### foregroundcolour

void set_backgroundcolour (const hk_colour& colour,bool registerchange=true)

### set_backgroundcolour

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

void set_backgroundcolour (const hk_colour& colour,bool registerchange,bool force_setting)

### set_backgroundcolour

hk_colour backgroundcolour (void)

### backgroundcolour

void set_neverregisterchange (bool n)

### set_neverregisterchange

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 set_neverregisterchange (bool n,bool force_setting)

### set_neverregisterchange

bool neverregisterchange (void)

### neverregisterchange

void savedata (ostream& s )

### savedata

[virtual]

Reimplemented from hk_class.

void loaddata (const hk_string& definition)

### loaddata

[virtual]

Reimplemented from hk_class.

long presentationnumber (void)

### presentationnumber

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

void set_datetimeformat (const hk_string& datetime,const hk_string& date, const hk_string& time)

### set_datetimeformat

void set_datetimeformat (const hk_string& datetime,const hk_string& date, const hk_string& time,bool force_setting)

### set_datetimeformat

hk_string datetimeformat (void)

### datetimeformat

hk_string dateformat (void)

### dateformat

hk_string timeformat (void)

### timeformat

void set_counts_as (unsigned long int c)

### set_counts_as

void set_counts_as (unsigned long int c,bool force_setting)

### set_counts_as

[virtual]

unsigned long int counts_as (void)

### counts_as

[virtual]

hk_string replace (const hk_string& where)

### replace

[virtual]

hk_presentation* presentation (void)

### presentation

void set_load_presentationnumber (bool l)

### set_load_presentationnumber

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 set_load_presentationnumber (bool l,bool force_setting)

### set_load_presentationnumber

bool load_presentationnumber (void)

### load_presentationnumber

enum alignmenttype {alignleft,alignright,aligncenter,aligndefault}

### alignmenttype

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

void set_alignment (alignmenttype a,bool registerchange=true)

### set_alignment

sets the text alignment

void set_alignment (alignmenttype a,bool registerchange,bool force_setting)

### set_alignment

alignmenttype alignment (void)

### alignment

void set_defaulttextalignment (alignmenttype a)

### set_defaulttextalignment

[static]

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

alignmenttype defaulttextalignment (void)

### defaulttextalignment

[static]

void set_defaultnumberalignment (alignmenttype a)

### set_defaultnumberalignment

[static]

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

alignmenttype defaultnumberalignment (void)

### defaultnumberalignment

[static]

void set_open_maximized_windows (bool m)

### set_open_maximized_windows

[static]

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

bool open_maximized_windows (void)

### open_maximized_windows

[static]

void lower_widget (bool registerchange=true)

### lower_widget

[virtual]

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

void raise_widget (bool registerchange=true)

### raise_widget

[virtual]

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

void set_on_click_action (const hk_string&,bool registerchange=true)

### set_on_click_action

sets the script for the on_click action

hk_string on_click_action (void)

### on_click_action

Returns: the script for the on_click action

void set_on_doubleclick_action (const hk_string&,bool registerchange=true)

### set_on_doubleclick_action

sets the script for the on_doubleclick action

hk_string on_doubleclick_action (void)

### on_doubleclick_action

Returns: the script for the on_doubleclick action

void set_on_open_action (const hk_string&,bool registerchange=true)

### set_on_open_action

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

hk_string on_open_action (void)

### on_open_action

Returns: the script for the on_open action

void set_on_close_action (const hk_string&,bool registerchange=true)

### set_on_close_action

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

hk_string on_close_action (void)

### on_close_action

Returns: the script for the on_close action

void widget_specific_form_resizes (void)

### widget_specific_form_resizes

[protected virtual]

void widget_specific_font_changed (void)

### widget_specific_font_changed

[protected virtual]

void widget_specific_label_changed (void)

### widget_specific_label_changed

[protected virtual]

void widget_specific_foregroundcolour_changed (const hk_colour& oldcolour)

### widget_specific_foregroundcolour_changed

[protected virtual]

void widget_specific_backgroundcolour_changed (const hk_colour& oldcolour)

### widget_specific_backgroundcolour_changed

[protected virtual]

bool widget_specific_coordinates (unsigned int px,unsigned int py,unsigned int pwidth,unsigned int pheight)

### widget_specific_coordinates

[protected virtual]

void widget_specific_raise_widget (void)

### widget_specific_raise_widget

[protected virtual]

void widget_specific_lower_widget (void)

### widget_specific_lower_widget

[protected virtual]

void presentationmode_changed (void)

### presentationmode_changed

[protected virtual]

void widget_specific_alignment (void)

### widget_specific_alignment

[protected virtual]

void sizetype_changed (void)

### sizetype_changed

[protected virtual]

void widget_specific_sizetype_changed (void)

### widget_specific_sizetype_changed

[protected virtual]

bool action_on_click (void)

### action_on_click

[protected virtual]

bool action_on_doubleclick (void)

### action_on_doubleclick

[protected virtual]

bool action_on_close (void)

### action_on_close

[protected virtual]

bool action_on_open (void)

### action_on_open

[protected virtual]

bool allow_datachanging (bool force_setting)

### allow_datachanging

[protected]

void has_changed (bool registerchange)

### has_changed

[protected]

hk_presentation* p_presentation

### p_presentation

[protected]

enum_visibletype p_visibletype

### p_visibletype

[protected]

bool p_setcoordinates

### p_setcoordinates

[protected]

bool p_setwidgetcoordinates

### p_setwidgetcoordinates

[protected]

bool while_init

### while_init

[protected]

- Version: $Revision: 1.49 $
- Author: Horst Knorr (hk_classes@knoda.org)
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.