Tag: cws_src680_dba20blocker User: fs Date: 05/07/04 01:26:02 Modified: /dba/dbaccess/source/ui/dlg/ generalpage.hxx
Log: RESYNC: (1.13-1.14); FILE MERGED File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: generalpage.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/generalpage.hxx?r1=1.13.134.1&r2=1.13.134.2 Delta lines: +46 -12 --------------------- --- generalpage.hxx 23 Jun 2005 15:22:37 -0000 1.13.134.1 +++ generalpage.hxx 4 Jul 2005 08:25:59 -0000 1.13.134.2 @@ -65,6 +65,9 @@ #ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" #endif +#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX +#include "opendoccontrols.hxx" +#endif #ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> #endif @@ -74,7 +77,6 @@ #ifndef _SV_EDIT_HXX #include <vcl/edit.hxx> #endif - #include <memory> //......................................................................... @@ -82,22 +84,41 @@ { //......................................................................... class IAdminHelper; + class RadioDependentEnabler; //========================================================================= //= OGeneralPage //========================================================================= class OGeneralPage : public OGenericAdministrationPage { OGeneralPage(Window* pParent, const SfxItemSet& _rItems, sal_Bool _bDBWizardMode = sal_False); - // OGeneralPage(Window* pParent, const SfxItemSet& _rItems, sal_Bool _bDBWizardMode = false); ~OGeneralPage(); + public: + enum CreationMode + { + eCreateNew, + eConnectExternal, + eOpenExisting + }; + + struct DocumentDescriptor + { + String sURL; + String sFilter; + }; + private: // dialog controls FixedText m_aFTHeaderText; FixedText m_aFTHelpText; FixedText m_aFT_DatasourceTypeHeader; RadioButton m_aRB_CreateDatabase; + RadioButton m_aRB_OpenDocument; RadioButton m_aRB_GetExistingDatabase; + FixedText m_aFT_DocListLabel; + ::std::auto_ptr< OpenDocumentListBox > + m_pLB_DocumentList; + OpenDocumentButton m_aPB_OpenDocument; FixedText m_aTypePreLabel; FixedText m_aDatasourceTypeLabel; ::std::auto_ptr< ListBox > @@ -107,7 +128,13 @@ FixedText m_aSpecialMessage; sal_Bool m_DBWizardMode; String m_sMySQLEntry; - sal_Bool m_bEntryCreationMode : 1; + CreationMode m_eOriginalCreationMode; + DocumentDescriptor m_aBrowsedDocument; + + ::std::auto_ptr< RadioDependentEnabler > + m_pSelectTypeController; + ::std::auto_ptr< RadioDependentEnabler > + m_pOpenDocController; ODsnTypeCollection* m_pCollection; /// the DSN type collection instance @@ -125,6 +152,8 @@ Link m_aTypeSelectHandler; /// to be called if a new type is selected Link m_aCreationModeHandler; /// to be called if a new type is selected + Link m_aDocumentSelectionHandler; /// to be called when a document in the RecentDoc list is selected + Link m_aChooseDocumentHandler; /// to be called when a recent document has been definately chosen sal_Bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted sal_Bool m_bUserGrabFocus : 1; String VerifyDisplayName(DATASOURCE_TYPE eType, String _sDisplayName); @@ -135,9 +164,12 @@ /// set a handler which gets called every time the user selects a new type void SetTypeSelectHandler(const Link& _rHandler) { m_aTypeSelectHandler = _rHandler; } - void SetClickHandler(const Link& _rHandler) { m_aCreationModeHandler = _rHandler; } - sal_Bool IsDatabaseToBeCreated(); - void SetToCreationMode(sal_Bool _bCreate); + void SetCreationModeHandler(const Link& _rHandler) { m_aCreationModeHandler = _rHandler; } + void SetDocumentSelectionHandler( const Link& _rHandler) { m_aDocumentSelectionHandler = _rHandler; } + void SetChooseDocumentHandler( const Link& _rHandler) { m_aChooseDocumentHandler = _rHandler; } + CreationMode GetDatabaseCreationMode() const; + + DocumentDescriptor GetSelectedDocument() const; /// get the currently selected datasource type DATASOURCE_TYPE GetSelectedType() const { return m_eCurrentSelection; } @@ -171,6 +203,8 @@ DECL_LINK(OnDatasourceTypeSelected, ListBox*); DECL_LINK(OnSetupModeSelected, RadioButton*); + DECL_LINK(OnDocumentSelected, ListBox*); + DECL_LINK(OnOpenDocument, PushButton*); }; //......................................................................... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
