App.h
bakery/App/AppInstanceManager.h
glibmm/object.h
vector
list
map
App_Gtk.h
App_WithDoc.h
bakery.h
list
map
glibmm/object.h
bakery/App/AppInstanceManager.h
vector
sigc++/sigc++.h
App.h
bakery.h
GtkDialogs.h
App_WithDoc.h
App_Gtk.h
App.h
App_WithDoc_Gtk.h
Bakery::App
Bakery

    /*
    *Copyright2000MurrayCumming
    *
    *Thislibraryisfreesoftware;youcanredistributeitand/or
    *modifyitunderthetermsoftheGNULibraryGeneralPublic
    *LicenseaspublishedbytheFreeSoftwareFoundation;either
    *version2oftheLicense,or(atyouroption)anylaterversion.
    *
    *Thislibraryisdistributedinthehopethatitwillbeuseful,
    *butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof
    *MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.SeetheGNU
    *LibraryGeneralPublicLicenseformoredetails.
    *
    *YoushouldhavereceivedacopyoftheGNULibraryGeneralPublic
    *Licensealongwiththislibrary;ifnot,writetotheFree
    *SoftwareFoundation,Inc.,675MassAve,Cambridge,MA02139,USA.
    */

    #ifndefBAKERY_APP_H
    #defineBAKERY_APP_H

    #include<bakery/App/AppInstanceManager.h>
    #include<glibmm/object.h>

    #include<vector>
    #include<list>
    #include<map>

    namespaceBakery
    {

    #ifndefDOXYGEN_SHOULD_SKIP_THIS
    classHelpInfo
    {
    public:
    typedefstd::vector<Glib::ustring>type_vecStrings;
    Glib::ustringm_strVersion,m_strCopyright,m_strDescription,m_strTranslatorCredits;

    type_vecStringsm_vecAuthors,m_vecDocumenters;
    };
    #endif//DOXYGEN_SHOULD_SKIP_THIS

    classApp:virtualpublicGlib::ObjectBase
    {
    public:
    friendclassAppInstanceManager;

    //Theconstructorhasadefaultargumentsothatthereisadefaultconstructor,
    //sothatderivedclassesdonotneedtocallaspecificconstructor.Thisis
    //avirtualbaseclasssotheywouldotherwiseneedtodothat.

    App(constGlib::ustring&appname=Glib::ustring());

    virtual~App();

    virtualvoidinit();//Setsitupandshowsit.

    //'AboutBox'information:
    typedefstd::vector<Glib::ustring>type_vecStrings;
    staticvoidset_about_information(constGlib::ustring&strVersion,consttype_vecStrings&vecAuthors,constGlib::ustring&strCopyright,constGlib::ustring&strDescription);
    staticvoidset_about_information(constGlib::ustring&strVersion,consttype_vecStrings&vecAuthors,constGlib::ustring&strCopyright,constGlib::ustring&strDescription,consttype_vecStrings&vecDocumenters,constGlib::ustring&strTranslatorCredits);
    virtualGlib::ustringget_version()const;

    staticvoidset_command_line_args(intargc,char**&argv);//Neededforsessionmanagement.

    typedefsigc::signal<void>type_signal_hide;
    type_signal_hideui_signal_hide();

    protected:
    staticvoidinit_app_name(constGlib::ustring&appname);

    virtualvoidinit_ui_manager();

    virtualvoidinit_menus();

    virtualvoidinit_menus_file()=0;

    virtualvoidinit_menus_edit()=0;

    virtualvoidinit_menus_help()=0;

    virtualvoidinit_toolbars();

    virtualApp*new_instance()=0;//Mustoverrideinordertonew()thederiveddocumentclass.

    //virtualvoidclose_window()=0;
    //virtualvoidbring_to_front()=0;
    //Signalhandlers:

    public://Wecannottakefunctionpointersofthesemethodsina
    //derivedclass,iftheyareprotected-forinstance,withsigc::mem_fun()
    //Menus:
    virtualvoidon_menu_file_new();
    virtualvoidon_menu_file_close();
    virtualvoidon_menu_file_exit();

    //EditmenuhandlersoverrideninApp_WithDoc:
    virtualvoidon_menu_edit_cut();
    virtualvoidon_menu_edit_copy();
    virtualvoidon_menu_edit_paste();
    virtualvoidon_menu_edit_clear();

    virtualvoidon_menu_help_about()=0;

    virtualvoidon_about_close();

    protected:
    //GUIabstractions:
    virtualvoidui_hide()=0;
    virtualvoidui_bring_to_front()=0;

    //operation_cancelled:
    //e.g.AFile|Opentriestosaveexistingdata,
    //butthisneedstobecancelledifthesavefailed.
    staticvoidset_operation_cancelled(boolbVal=true);
    staticboolget_operation_cancelled();

    //Memberdata:

    //'AboutBox'/WMClassinformation:
    staticGlib::ustringm_strAppName;

    //'AboutBox'information:
    staticHelpInfom_HelpInfo;

    //Instances
    staticAppInstanceManagerm_AppInstanceManager;

    staticboolm_bOperationCancelled;//seeset/get_operation_cancelled().

    //Allinstancesshare1Aboutbox:
    staticboolm_bAboutShown;

    //Commandlineargs:
    staticGlib::ustringm_strCommandLine_0;

    type_signal_hidem_signal_hide;

    //typedefstd::vector<poptOption>type_vecPoptOptions;
    //type_vecPoptOptionsm_vecPoptOptions;
    };

    }//namespace

    #endif//BAKERY_APP_H