home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.5 KB | 126 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 2 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // ----- Part Layer -----
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWBITMAP_H
- #include "FWBitmap.h"
- #endif
-
- #ifndef FWMENU_H
- #include "FWMenu.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWBNDSTR_H
- #include "FWBndStr.h"
- #endif
-
- #include "Defines.k"
-
- #if FW_SUPPORTS_CYBERDOG
- class FW_CCyberdogHelper;
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CBitmapContent;
-
- //========================================================================================
- // class CBitmapPart
- //========================================================================================
-
- class CBitmapPart : public FW_CPart
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CBitmapPart)
-
- CBitmapPart(ODPart* odPart);
- virtual ~ CBitmapPart();
-
- virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_CContent* NewPartContent(Environment* ev);
-
- virtual FW_CFrame* NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage);
-
- virtual FW_CWindow* NewDocumentWindow(Environment* ev);
-
- virtual FW_Handled DoAbout(Environment* ev);
-
- #if FW_SUPPORTS_CYBERDOG
- // These are here for the "Reload" commands. You don't need this in your
- // own part; it's just a demonstration feature in ODFBitmap.
- virtual FW_Handled DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Handled DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
- // You'll probably want these. LoadCyberItem will be called for you when
- // Cyberdog wants you to load something. GetCyberdogHelper is an accessor
- // which you'll need to call from your Frame subclass.
- static void LoadCyberItem (Environment* ev, void* selfCPart);
- FW_CCyberdogHelper* GetCyberdogHelper ();
- #endif
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void UpdatePresentation(Environment* ev);
- void AdjustFramesSize(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CBitmapContent* fBitmapContent;
- FW_CPresentation* fBitmapPresentation;
- #if FW_SUPPORTS_CYBERDOG
- // This is for the "Reload" stuff, which again, you don't need in your part.
- FW_Boolean fReloadContinuously;
- // You really really need this. The helper class implements all the
- // communication with the ODF-provided SOM subclass of CyberPartExtension,
- // along with some basic recipes.
- FW_CCyberdogHelper* fHelper;
- #endif
- };
-
- #if FW_SUPPORTS_CYBERDOG
- inline FW_CCyberdogHelper* CBitmapPart::GetCyberdogHelper ()
- {
- return fHelper;
- }
- #endif
-
- #endif // PART_H
-
-