Source: midimountain/mvcBase.h


Annotated List
Files
Globals
Hierarchy
Index
//=============================================================================
//  model view control base class definition
//=============================================================================
// Author  : Adrian Meyer
// Version : 0.2.0
// Log     :
//=============================================================================
// 22.03.2000 building class
// 23.03.2000 adding menu_item->submenu to list
//            adding signal hook
// 27.03.2000 add constructor and destructor
// 27.02.2001 adding language dump into ini file
// 03.04.2001 loading language file
// 10.04.2001 read language file name
//=============================================================================
// to do   :
//=============================================================================

#include <gtk/gtk.h>
#include <stlini.h>

#ifndef __MVCBASE__
#define __MVCBASE__
class TMvcBase
{
  private:
		INIFile fIniFile;
    char* fLanguageFileName;

    bool DumpWidget( GtkWidget* aWidget  );           // dump widget values
    void DumpWidgetArgument( char* aName, GtkWidget* aWidget, char* aArgument );
    void WriteWidgetToIni( char* aName, char* aValue );

    void ReadWidget( GtkWidget* aWidget  );           // read widget values
    void ReadWidgetArgument( char* aName, GtkWidget* aWidget, char* aArgument );
    bool ReadWidgetFromIni( char* aName, char* tmpValue );

  protected:
    GList* fWidgetList;                               // list with widgets
    void AddChildrenToWidgetList( GtkWidget* aWidget );// find widgets kids
    void AddWidgetList( GtkWidget* aWidget );         // add widget to list
    GtkWidget* FindWidget( char* aName );             // find widget by name
    bool fUpdateView;                                 // flag for updating the view
  public:
                                                      // connect signal
    void HookSignal( char* aWidgetName, char* aSignal, GtkSignalFunc aFunc, gpointer data );
    TMvcBase(void);                                   // constructor
    ~TMvcBase(void);                                  // destructor
    void SetUpdateView( bool aUpdateView );           // set update view
    bool GetUpdateView( void );                       // read update view
    void DumpLanguageFile( char* aFileName );         // dump english file
    void LoadLanguageFile( char* aFileName );         // load language file
		char* GetLanguageFileName( void );                // read language file name
    void SetLanguageFileName( char*aLanguageFileName);// set language file name
};

#endif

Generated by: root@castle on Fri Jul 20 00:33:17 2001, using kdoc 2.0a36.