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

hk_button.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 Horst Knorr <hk_classes@knoda.org>  
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_BUTTON_H
00012 #define HK_BUTTON_H
00013 #include "hk_dsvisible.h"
00014 #include <list>
00015 using namespace std;
00016 class hk_database;
00023 class hk_button :public hk_dsvisible
00024 {
00025     public:
00026         hk_button(hk_form* form=NULL);
00027         virtual ~hk_button(void);
00058         void set_action(const hk_string& action,const hk_string& object,bool showmaximized=false,bool registerchange=true);
00059         void set_action(long action,const hk_string& object,bool showmaximized=false,bool registerchange=true);
00060 virtual bool push_action(void);
00061         hk_string object (void);
00081         int action(void);
00082         bool show_maximized(void);
00083         void set_database(hk_database* database);
00084         hk_database* database(void);
00085 
00086         virtual void loaddata(const hk_string& definition);
00087         virtual void  savedata(ostream& s );
00088 
00089         typedef class
00090         {
00091             public:
00092                 hk_string reportfield;
00093                 hk_string condition;
00094                 hk_string formdatasource;
00095                 hk_string formfield;
00096         } struct_condition;
00097 
00098         void add_condition(const hk_string& reportfield,const hk_string& condition,const hk_string& formdatasource,const hk_string& formfield,bool registerchange=true);
00099         list<struct_condition>* conditions(void);
00100         void clear_conditions(bool registerchange=true);
00101 
00102     protected:
00103         virtual bool    widget_specific_open_form(void);
00104         virtual bool    widget_specific_close_form(void);
00105         virtual bool    widget_specific_open_table(void);
00106         virtual bool    widget_specific_open_query(void);
00107         virtual bool    widget_specific_preview_report(void);
00108         virtual bool    widget_specific_print_report(void);
00109         hk_string parsed_condition(hk_presentation*);
00110 
00111     private:
00112         long int p_action;
00113         hk_string p_object;
00114         bool p_showmaximized;
00115         hk_database* p_database;
00116         list<struct_condition> p_reportconditions;
00117 
00118 };
00119 #endif

Generated on Tue Mar 22 20:01:12 2005 for Databaseconnectionclasses by  doxygen 1.4.1