hk_button Class Reference

base class for a button in a form More...

#include <hk_button.h>

Inheritance diagram for hk_button:

Inheritance graph
[legend]
Collaboration diagram for hk_button:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 hk_button (hk_form *form=NULL)
void set_action (const hk_string &action, const hk_string &object, bool showmaximized=false, bool registerchange=true)
void set_action (long action, const hk_string &object, bool showmaximized=false, bool registerchange=true)
virtual bool push_action (void)
hk_string object (void)
int action (void)
bool show_maximized (void)
void set_database (hk_database *database)
hk_databasedatabase (void)
virtual void loaddata (xmlNodePtr definition)
virtual void savedata (ostream &s)
void add_condition (const hk_string &reportfield, const hk_string &condition, const hk_string &formdatasource, const hk_string &formfield, bool registerchange=true)
list< struct_condition > * conditions (void)
void clear_conditions (bool registerchange=true)
virtual bool load_icon (const hk_string &filename, bool registerchange=true)
struct_raw_dataicon ()
virtual void show_icon ()
virtual void set_is_togglebutton (bool, bool registerchange=true, bool forcesetting=false)
bool is_togglebutton (void) const
virtual bool is_pushed () const
virtual void set_is_pushed (bool, bool registerchange=true, bool forcesetting=false)

Protected Member Functions

virtual bool widget_specific_open_form (void)
virtual bool widget_specific_close_form (void)
virtual bool widget_specific_open_table (void)
virtual bool widget_specific_open_query (void)
virtual bool widget_specific_open_view (void)
virtual bool widget_specific_preview_report (void)
virtual bool widget_specific_print_report (void)
virtual bool widget_specific_close_application (void)
virtual bool widget_specific_is_pushed (void)
hk_string parsed_condition (hk_presentation *)

Classes

class  struct_condition

Detailed Description

base class for a button in a form

Version:
Revision
1.26
Author:
Horst Knorr (hk_classes@knoda.org)


Member Function Documentation

void hk_button::set_action ( const hk_string &  action,
const hk_string &  object,
bool  showmaximized = false,
bool  registerchange = true 
)

when the button is pushed the action will be executed on the object

Parameters:
action allowed actions:
   open_form,
   close_form,
   open_table,
   open_query,
   preview_report,
   print_report,
   goto_firstrow,
goto_lastrow,
goto_nextrow,
goto_previousrow,
insert_row,
delete_row,
store_row,
action_query
object i.e. a form name (if you want to open a form)
showmaximized if true show the window maximized else show the new window in its origin or default size
registerchange if this button is part of a form and any registerchange is true, the changes will be stored when you close the window
Example: to open the form "test" use
set_action("open_form","test");
push_action();
push_action();

int hk_button::action ( void   ) 

Returns:
-1 no action set;
   0 open_form;
   1 close_form;
   2 open_table;
   3 open_query;
   4 preview_report;
   5 print_report;
   6 goto_firstrow,
   7 goto_lastrow,
8 goto_nextrow,
9 goto_previousrow,
10 insert_row,
11 delete_row,
12 store_row,
13 quiet_query,
14 close_application,
15 open_view,

void hk_button::loaddata ( xmlNodePtr  definition  )  [virtual]

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

Reimplemented from hk_dsvisible.

void hk_button::savedata ( ostream &  s  )  [virtual]

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

Reimplemented from hk_dsvisible.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 02:48:10 2006 for Databaseconnectionclasses by  doxygen 1.5.0