// $Revision: 1.26 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: StockBrowser // File: PickerView.h // Build/Version: 1.0.0 // // Description: TPickerView displays a linear list of stocks from which // the user can select one or many. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_PICKERVIEW #define TaligentSamples_PICKERVIEW class TPickerView; #ifndef TaligentSamples_PICKERMODEL #include "PickerModel.h" #endif #ifndef TaligentSamples_DRAGOMATIC #include #endif #ifndef Taligent_TEXTDISPLAY #include #endif //============================================================================== // TPickerView class TPickerView : public TDOMDocumentComponentView { public: TaligentTypeExtensionDeclarationsMacro(TPickerView) TPickerView(); TPickerView( TGUIBundle* guiBundleToAlias, const TPaint& backgroundColor = TColorPaint::GetWhite()); virtual ~TPickerView(); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); protected: virtual void DrawContents(TGrafPort& port) const; virtual void HandleAfterConnectionToViewRoot(); virtual void HandleModelChanged(const TNotification& notification); // MSelectionMapping overrides virtual TGArea GetSelectionDisplayArea(const TModelSelection& selection) const; virtual TModelSelection* CreateInsertionPoint(const TGPoint& where) const; virtual TModelSelection* CreateSelectionFromPoint(const TGPoint& where) const; virtual TModelSelection* CreateSelectionFromArea(const TGArea& area) const; private: enum {kOriginalVersion}; TPickerView(const TPickerView& source); TPickerView& operator=(const TPickerView& source); void CacheDisplaysAndUpdate(); bool GetDisplaysHit(const TGArea& hitRect, TCollectionOf& fill) const; TPaint* fBackgroundPaint; TDequeOf fNameDisplays; }; #endif