Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_View_Imp_MLTE Class Reference

Inheritance diagram for CP_View_Imp_MLTE:

CP_View_Imp_Control CP_Object CP_View_Imp_Base CP_NoCopy CP_M_CommandHandler CP_SigSlot::CP_SlotObject List of all members.

Drawing

void HandleDraw (CP_Canvas &inCanvas, CP_Region &inUpdateArea)
virtual void FinishDrawing (CP_Canvas &drawingCanvas)
CP_Point GetOrigin ()
void SetOrigin (const CP_Point &inOrigin)

Drawing

void Invalidate (const CP_Region &inInvalidArea)
virtual void HandleDrawInCanvas (CP_Canvas &inCanvas, CP_Region &inUpdateArea)

Events

void CommandUpdateStatus (CP_Event_Base &inEvent)
void CommandProcess (CP_Event_Base &inEvent)
void HandleTextInputEvents (CP_Event_Base &inEvent)
static pascal::OSStatus CarbonEventHandler (EventHandlerCallRef inHandler, EventRef inEvent, void *inUserData)

Public Member Functions

 CP_View_Imp_MLTE (CP_View_Imp *inOwnerViewImp, CP_View *inSuperview, const CP_Point &inUpperLeft, const CP_Size &inContentSize, bool inHasHorizontalScroll=true, bool inHasVerticalScroll=true, bool inHasGrowBox=true, bool inReadOnly=false, bool inDrawFocusBorder=true)
virtual ~CP_View_Imp_MLTE () throw ()
void disconnect_all ()
void signal_connect (CP_Signal *inSender)
void signal_disconnect (CP_Signal *inSender)
void SetID (FourCharCode inIdentifier)
FourCharCode GetID ()
void RegisterSignal (const CP_SignalHolder &inSignal)
CP_DataValueSignalFindSignal (const CP_String &inSignalName)
UInt32 GetNumberSignals ()
CP_String GetNthSignalName (UInt32 inSignalIndex)
void RegisterSlot (const CP_SlotHolder &inSlot)
CP_DataValueSlot FindSlot (const CP_String &inSlotName)
UInt32 GetNumberSlots ()
CP_String GetNthSlotName (UInt32 inSlotIndex)
template<class R, class P1, class P2>
CP_CommandHandlerSignalConnect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode)
template<class R, class P1, class P2>
void Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2))
Appearance
void Activate ()
void Deactivate ()
Command Handling
void HandleCommandStatus (CP_CommandStatus &inCommandStatus, bool &inOutResult, CP_CommandNo &inCommandNo)
void HandleCutCommand (OSStatus &inOutStatus)
void HandleCopyCommand (OSStatus &inOutStatus)
void HandleClearCommand (OSStatus &inOutStatus)
void HandlePasteCommand (OSStatus &inOutStatus)
void HandleSelectAllCommand (OSStatus &inOutStatus)
void HandleUndoCommand (OSStatus &inOutStatus)
void HandleRedoCommand (OSStatus &inOutStatus)
Drawing
virtual void HandleDraw (ControlRef inControl)
virtual void PrepareDraw (CP_Canvas &inCanvas, CP_Region &inUpdateArea)
Events
OSStatus HandleCarbonEvent (EventHandlerCallRef inHandler, EventRef inEvent)
OSStatus HandleMouseDown (CP_Event_Base &inEvent)
virtual ControlPartCode HandleHitTest (ControlRef inControl, const CP_Point &inMouseLocation)
virtual ControlPartCode HandleFocus (ControlRef inControl, ControlFocusPart inAction)
virtual void HandleIdle (ControlRef inControl)
Focus
virtual void OnLosingFocus ()
Getters
OSStatus ReadTextFromFile (const CP_FileSystemSpec &inFileSpec)
CP_String GetText (char inLineEnd=CP_LF)
UInt32 GetTextLength ()
Key Filter
void AttachFilter (CP_KeyInputFilter *inFilter)
CP_KeyInputFilterGetFilter ()
Positioning
virtual void SetPortBounds (const CP_Rect &inBounds)
Printing
void Print ()
Selection
void GetSelection (UInt32 *inStartSelection, UInt32 *inEndSelection)
void SetSelection (UInt32 inStartSelection, UInt32 inEndSelection)
bool HasSelection ()
Setters
void SetText (const CP_String &inText)
void SetText (CP_InStream *inStream)
void InsertText (const CP_String &inText)
void InsertText (const char *inTextPtr, SInt32 inTextLength)
void SetFontSpec (CP_FontSpec &inFontSpec)

Static Public Member Functions

static void Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false)
static void Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue)

Protected Member Functions

Events
virtual bool HandleFieldExitChar (char inChar)
Misc
OSStatus OpenControl (ControlHandle inControl, bool inHasHorizontalScroll=true, bool inHasVerticalScroll=true, bool inHasGrowBox=true, bool inReadOnly=false)
OSStatus CloseControl (ControlHandle inControl)
Tracking
virtual ControlPartCode HandleTracking (ControlRef inControl, const CP_Point &inMouseLocation, ControlActionUPP actionProc)

Protected Attributes

CP_MLTESupport fMLTESupport
CGrafPtr fDrawingEnvironment
bool fInDialogWindow
EventHandlerUPP fHandlerUPP
EventHandlerRef fHandlerRef
CP_KeyInputFilterfKeyFilter
CP_DataValueSignal fFieldExitSignal
CP_EventHandler fEventHandler
CP_ViewfSuperview
CP_Point fOrigin
CP_View_ImpfOwnerViewImp
OSControl fOSControl
CP_EventHandler fDummyEventHandler
CP_Point fLocation
CP_Size fSize
CP_Commands_ArrayfCommands
CP_MenuSelectionSignalfMennuSelectionSignal
sender_set fSenders
CP_Signals_ArrayfSignals
CP_Slots_ArrayfSlots
FourCharCode fObjectID

Static Protected Attributes

static ControlUserPaneDrawUPP fsPaneImp_DrawProc = NULL
static ControlUserPaneHitTestUPP fsPaneImp_HitTestProc = NULL
static ControlUserPaneTrackingUPP fsPaneImp_PaneTrackingProc = NULL
static ControlUserPaneFocusUPP fsPaneImp_PaneFocusProc = NULL
static ControlUserPaneIdleUPP fsPaneImp_PaneIdleProc = NULL
static ControlUserPaneActivateUPP fsPaneImp_PaneActivateProc = NULL
static ControlUserPaneKeyDownUPP fsPaneImp_PaneKeyDownProc = NULL
static FourCharCode fObjectIDCount = 0

Private Member Functions

Drawing
void TPPaneDrawEntry (STPPaneState *ps)
void TPPaneDrawExit (STPPaneState *ps)
Misc
void TextChanged ()

Constructor & Destructor Documentation

CP_View_Imp_MLTE::CP_View_Imp_MLTE CP_View_Imp inOwnerViewImp,
CP_View inSuperview,
const CP_Point inUpperLeft,
const CP_Size inContentSize,
bool  inHasHorizontalScroll = true,
bool  inHasVerticalScroll = true,
bool  inHasGrowBox = true,
bool  inReadOnly = false,
bool  inDrawFocusBorder = true
 

virtual CP_View_Imp_MLTE::~CP_View_Imp_MLTE  )  throw () [virtual]
 


Member Function Documentation

void CP_View_Imp_MLTE::Activate  )  [virtual]
 

Reimplemented from CP_View_Imp_Control.

void CP_View_Imp_MLTE::Deactivate  )  [virtual]
 

Reimplemented from CP_View_Imp_Control.

void CP_View_Imp_MLTE::HandleCommandStatus CP_CommandStatus inCommandStatus,
bool &  inOutResult,
CP_CommandNo inCommandNo
 

void CP_View_Imp_MLTE::HandleCutCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandleCopyCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandleClearCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandlePasteCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandleSelectAllCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandleUndoCommand OSStatus inOutStatus  ) 
 

void CP_View_Imp_MLTE::HandleRedoCommand OSStatus inOutStatus  ) 
 

virtual void CP_View_Imp_MLTE::HandleDraw ControlRef  inControl  )  [virtual]
 

Reimplemented from CP_View_Imp_Control.

virtual void CP_View_Imp_MLTE::PrepareDraw CP_Canvas inCanvas,
CP_Region inUpdateArea
[virtual]
 

Reimplemented from CP_View_Imp_Control.

OSStatus CP_View_Imp_MLTE::HandleCarbonEvent EventHandlerCallRef  inHandler,
EventRef  inEvent
 

OSStatus CP_View_Imp_MLTE::HandleMouseDown CP_Event_Base inEvent  ) 
 

virtual ControlPartCode CP_View_Imp_MLTE::HandleHitTest ControlRef  inControl,
const CP_Point inMouseLocation
[virtual]
 

Reimplemented from CP_View_Imp_Control.

virtual ControlPartCode CP_View_Imp_MLTE::HandleFocus ControlRef  inControl,
ControlFocusPart  inAction
[virtual]
 

Reimplemented from CP_View_Imp_Control.

virtual void CP_View_Imp_MLTE::HandleIdle ControlRef  inControl  )  [virtual]
 

Reimplemented from CP_View_Imp_Control.

virtual void CP_View_Imp_MLTE::OnLosingFocus  )  [virtual]
 

OSStatus CP_View_Imp_MLTE::ReadTextFromFile const CP_FileSystemSpec inFileSpec  ) 
 

CP_String CP_View_Imp_MLTE::GetText char  inLineEnd = CP_LF  ) 
 

UInt32 CP_View_Imp_MLTE::GetTextLength  ) 
 

void CP_View_Imp_MLTE::AttachFilter CP_KeyInputFilter inFilter  ) 
 

CP_KeyInputFilter* CP_View_Imp_MLTE::GetFilter  ) 
 

virtual void CP_View_Imp_MLTE::SetPortBounds const CP_Rect inBounds  )  [virtual]
 

Reimplemented from CP_View_Imp_Control.

void CP_View_Imp_MLTE::Print  ) 
 

void CP_View_Imp_MLTE::GetSelection UInt32 inStartSelection,
UInt32 inEndSelection
 

void CP_View_Imp_MLTE::SetSelection UInt32  inStartSelection,
UInt32  inEndSelection
 

bool CP_View_Imp_MLTE::HasSelection  ) 
 

void CP_View_Imp_MLTE::SetText const CP_String inText  ) 
 

void CP_View_Imp_MLTE::SetText CP_InStream inStream  ) 
 

void CP_View_Imp_MLTE::InsertText const CP_String inText  ) 
 

void CP_View_Imp_MLTE::InsertText const char *  inTextPtr,
SInt32  inTextLength
 

void CP_View_Imp_MLTE::SetFontSpec CP_FontSpec inFontSpec  ) 
 

virtual bool CP_View_Imp_MLTE::HandleFieldExitChar char  inChar  )  [protected, virtual]
 

OSStatus CP_View_Imp_MLTE::OpenControl ControlHandle  inControl,
bool  inHasHorizontalScroll = true,
bool  inHasVerticalScroll = true,
bool  inHasGrowBox = true,
bool  inReadOnly = false
[protected]
 

OSStatus CP_View_Imp_MLTE::CloseControl ControlHandle  inControl  )  [protected]
 

virtual ControlPartCode CP_View_Imp_MLTE::HandleTracking ControlRef  inControl,
const CP_Point inMouseLocation,
ControlActionUPP  actionProc
[protected, virtual]
 

Reimplemented from CP_View_Imp_Control.

void CP_View_Imp_MLTE::TPPaneDrawEntry STPPaneState ps  )  [private]
 

void CP_View_Imp_MLTE::TPPaneDrawExit STPPaneState ps  )  [private]
 

void CP_View_Imp_MLTE::CommandUpdateStatus CP_Event_Base inEvent  )  [private]
 

void CP_View_Imp_MLTE::CommandProcess CP_Event_Base inEvent  )  [private]
 

void CP_View_Imp_MLTE::HandleTextInputEvents CP_Event_Base inEvent  )  [private]
 

static pascal ::OSStatus CP_View_Imp_MLTE::CarbonEventHandler EventHandlerCallRef  inHandler,
EventRef  inEvent,
void *  inUserData
[static, private]
 

void CP_View_Imp_MLTE::TextChanged  )  [private]
 

void CP_View_Imp_Control::Show  )  [virtual, inherited]
 

Show this control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Hide  )  [virtual, inherited]
 

Hide this control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Enable  )  [virtual, inherited]
 

Enable this control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Disable  )  [virtual, inherited]
 

Disable this control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

CP_Canvas CP_View_Imp_Control::SetupForDrawing  )  [virtual, inherited]
 

Used when the user needs to draw into a view at times other than the normal drawing times. This will setup the control for drawing into, and return a canvas object suitable for use.

Exceptions:
none 
Returns:
CP_Canvas CP_Canvas object to use to draw into.

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Base::HandleDraw CP_Canvas inCanvas,
CP_Region inUpdateArea
[inherited]
 

Public method called from the various OS implementations when they need to draw some content. This then calls the CP_View_Imp HandleDraw to notify your object that is should draw something via its OnDraw() method.

Parameters:
inCanvas CP_Canvas object that holds the graphics port for the View to draw into. The canvas object should only be considered setup correctly in this call, and not held onto.
inUpdateArea The area that needs to be updated or drawn.
Exceptions:
none 
Returns:
void

void CP_View_Imp_Control::Draw  )  [virtual, inherited]
 

Draws the user pane control immediately. This will take care of setting up the drawing environment for the control to draw, and then draw the contents of the control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Refresh  )  [virtual, inherited]
 

Cause the control to refresh itself by invalidating the bounds of this control.

Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::HandleActivate ControlRef  inControl,
Boolean  inActivating
[virtual, inherited]
 

void CP_View_Imp_Control::HandleKeyDown ControlRef  inControl,
SInt16  keyCode,
SInt16  charCode,
SInt16  modifiers
[virtual, inherited]
 

CP_EventHandler & CP_View_Imp_Control::GetEventHandler  )  [virtual, inherited]
 

Return the event handler for this view implementation. This will be the OS implentation event handler.

Exceptions:
none 
Returns:
CP_EventHandler& The OS implementations event handler.

Reimplemented from CP_View_Imp_Base.

CP_Rect CP_View_Imp_Control::GetPortBounds  )  [virtual, inherited]
 

Return the port bounds of this pane. This is the bounds of the pane in port coordinates.

Exceptions:
none 
Returns:
CP_Rect Returns the bounds of this pane.

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Move const CP_Point inOffset  )  [virtual, inherited]
 

Reimplemented from CP_View_Imp_Base.

Reimplemented in CP_View_Imp_ControlScroller.

void CP_View_Imp_Control::AddSubview CP_View_Imp inView  )  [virtual, inherited]
 

Embeds the passed in view into this control.

Parameters:
inView The CP_View object to embed into this one.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::AdjustToSuperview CP_View inView  )  [virtual, inherited]
 

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::SetLocation const CP_Point inLocation  )  [virtual, inherited]
 

Sets the location of this control releative to its superview. The passed in location is relative to the subview that contains this control.

Parameters:
inLocation Superview relative coordinates of the location.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::SetSize const CP_Size inSize  )  [virtual, inherited]
 

Sets the size of this control. This will expand or shrink the control relative to its upper left corner.

Parameters:
inSize Size to make this control.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

bool CP_View_Imp_Control::IsVisible  )  const [virtual, inherited]
 

Returns true if this view is visible.

Exceptions:
none 
Returns:
bool Returns true if the view is visible.

Reimplemented from CP_View_Imp_Base.

bool CP_View_Imp_Control::IsActive  )  const [virtual, inherited]
 

Returns true if this view is active.

Exceptions:
none 
Returns:
bool Returns true if the view is active.

Reimplemented from CP_View_Imp_Base.

bool CP_View_Imp_Control::IsEnabled  )  const [virtual, inherited]
 

Returns true if this view is enabled.

Exceptions:
none 
Returns:
bool Returns true if the view is enabled.

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::Invalidate const CP_Region inInvalidArea  )  [protected, virtual, inherited]
 

Cause the passed in area of this pane to become invalid and force the OS to create an update event to redraw that portion.

Parameters:
inRegion CP_Region that contains the invalid area, in local coordinates.
Exceptions:
none 
Returns:
void

Reimplemented from CP_View_Imp_Base.

void CP_View_Imp_Control::HandleDrawInCanvas CP_Canvas inCanvas,
CP_Region inUpdateArea
[protected, virtual, inherited]
 

Reimplemented in CP_View_Imp_Toolbar, and CP_View_Imp_Toolbar_Item.

void CP_View_Imp_Base::PortToLocal CP_Point inPortPoint  )  [virtual, inherited]
 

void CP_View_Imp_Base::PortToLocal CP_Rect inPortRect  )  [inherited]
 

void CP_View_Imp_Base::PortToGlobal CP_Point inPortPoint  )  [inherited]
 

void CP_View_Imp_Base::PortToGlobal CP_Rect inPortRect  )  [inherited]
 

void CP_View_Imp_Base::LocalToPort CP_Point inPortPoint  )  [inherited]
 

void CP_View_Imp_Base::LocalToPort CP_Rect inPortRect  )  [inherited]
 

virtual void CP_View_Imp_Base::InitEventHandler CP_EventHandler  )  [virtual, inherited]
 

Reimplemented in CP_View_Imp_Gtk, CP_View_Imp_Win, and CP_View_Imp_WinToolbar.

CP_Rect CP_View_Imp_Base::GetLocalBounds  )  [inherited]
 

Return the local bounds of this pane. This will always have the top left corner at location 0, 0.

Exceptions:
none 
Returns:
CP_Rect const Returns the bounds of this pane.

OSControl CP_View_Imp_Base::GetOSControl  )  const [inherited]
 

Returns the OSControl that is implementing this base view. The will be a MacOS ControlHandle on non HIView OSs or non compositing windows, and an HIViewRef on compositing windows.

Exceptions:
none 
Returns:
OSControl The OSControl implementing this view.

void CP_View_Imp_Base::SetOSControl OSControl  inOSControl  )  [inherited]
 

CP_View* CP_View_Imp_Base::GetSuperview  )  [inherited]
 

CP_Point CP_View_Imp_Base::GetLocation  )  [inherited]
 

CP_Size CP_View_Imp_Base::GetSize  )  [inherited]
 

void CP_View_Imp_Base::FinishDrawing CP_Canvas drawingCanvas  )  [virtual, inherited]
 

Reimplemented in CP_View_Imp_Win.

CP_Point CP_View_Imp_Base::GetOrigin  )  [inherited]
 

void CP_View_Imp_Base::SetOrigin const CP_Point inOrigin  )  [inherited]
 

CP_View_Imp * CP_View_Imp_Base::GetOwnerViewImp  )  const [inherited]
 

Gets the CP_View_Imp class that this object provides the OS implementation of.

Exceptions:
none 
Returns:
CP_View_Imp * const Returns the owner CP_View_Imp that we belong to.

void CP_View_Imp_Base::SetOwnerViewImp CP_View_Imp inViewImp  )  [inherited]
 

Sets the CP_View_Imp class that this object provides the OS implementation of.

Parameters:
inViewImp The CP_View_Imp class that created us, and we are providing the implementation for.
Exceptions:
none 
Returns:
void

<
virtual void CP_View_Imp_Base::SetSizeAndPosition GtkWidget *  ,
CP_View ,
const CP_Point ,
const CP_Size