// $Revision: 1.2 $ // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // TilesPresenter.h #ifndef TaligentSample_TILESPRESENTER #define TaligentSample_TILESPRESENTER // Include for Presentation Framework #ifndef Taligent_GUICOMPOUNDDOCUMENT #include #endif // Include for TStandardText and TTextLabel #ifndef Taligent_LABEL #include #endif #ifndef TaligentSample_TILESVIEW #include "TilesView.h" #endif // Enabler class #ifndef TaligentSample_MENUHOLDER #include "MenuHolder.h" #endif // The presenter is responsible for managing all the "presentable" aspects of a document // component. This includes views, menus, palettes, dialogs, etc. This TTilesPresenter // will add an extended menu through the overridden HandleCreateExtendedMenus function. class TTilesPresenter : public TGUIPresenterFor { public: // The constructor for TTilesPresenter must take a TGUIBundle which it passes on // to the constructor for TGUIPresenterFor. TTilesPresenter (); TTilesPresenter (const TGUIBundle&); virtual ~TTilesPresenter (); // The following macro must be called within class declarations in order to use Taligent // Type Extensions.The macro defines a set of Taligent Type Extension utility functions. // This macro call matches a macro call to TaligentTypeExtensionMacro in TilesPresenter.C TaligentTypeExtensionDeclarationsMacro (TTilesPresenter) // The following macro must be called when dynamic type casting is required. // The macro defines a set of dynamic casting utility functions. // This macro call matches a macro call to DynamicCastDefinitionsMacro in TilesPresenter.C DynamicCastDeclarationsMacro(); // Build the Tiles menu. virtual void HandleMenuActivate(TMenu& theMainMenu); virtual void HandleMenuDeactivate(TMenu& theMainMenu); // The following members are only used in the USE_ARCHIVES version #ifdef USE_ARCHIVES virtual bool HandleMenuAction(TMenuAction& action); virtual void HandleCurrentSelectionChange(const TNotification& ); protected: void DoCommand(TCommandOn* command, const TStandardText& label); virtual TMenu* CopyArchivedMenu(const char* key) const; virtual TArchive* CopyDefaultArchive() const; static const TMenuItemID kRedMenuItem; static const TMenuItemID kGreenMenuItem; static const TMenuItemID kBlueMenuItem; #endif // USE_ARCHIVES private: TMenuHolder fMenuHolder; bool fArchiveRead; }; #endif // TaligentSample_TILESPRESENTER