Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
CNavCallbackData Class Reference
Inheritance diagram for CNavCallbackData:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CNavCallbackData (const Rect &inPanelRect, ResIDT inPanelResID)
virtual ~CNavCallbackData ()
Handle GetDITLHandle ()
void SetFirstControlID (short inFirstID)
short GetFirstControlID ()
virtual void NegotiatePanelBounds (NavCBRecPtr inNavCallbackData)
virtual void InitControls (NavCBRecPtr inNavCallbackData)=0
virtual void SaveControlValues (NavCBRecPtr inNavCallbackData)=0

Protected Attributes

Rect mPanelRect
short mLastTryWidth
short mLastTryHeight
StResource mResource
short mFirstControlID

Detailed Description

Definition at line 22 of file UCustomNavServicesDialogs.cpp.


Constructor & Destructor Documentation

CNavCallbackData::CNavCallbackData ( const Rect &  inPanelRect,
ResIDT  inPanelResID 
) [inline]

Definition at line 25 of file UCustomNavServicesDialogs.cpp.

                : mPanelRect(inPanelRect)
                , mLastTryWidth(0)
                , mLastTryHeight(0)
                , mResource('DITL', inPanelResID, false /* don't throw */, false /* all res files */)
                , mFirstControlID(0)
                {
                }
virtual CNavCallbackData::~CNavCallbackData ( ) [inline, virtual]

Definition at line 34 of file UCustomNavServicesDialogs.cpp.

                {
                }

Member Function Documentation

Handle CNavCallbackData::GetDITLHandle ( ) [inline]

Definition at line 39 of file UCustomNavServicesDialogs.cpp.

{ return mResource.Get(); }

Here is the caller graph for this function:

Definition at line 42 of file UCustomNavServicesDialogs.cpp.

{ return mFirstControlID; };    // only valid after the NavCustomControl call
virtual void CNavCallbackData::InitControls ( NavCBRecPtr  inNavCallbackData) [pure virtual]
void CNavCallbackData::NegotiatePanelBounds ( NavCBRecPtr  inNavCallbackData) [virtual]

Definition at line 62 of file UCustomNavServicesDialogs.cpp.

{
  Rect&   offeredRect   = inNavCallbackData->customRect;
  short   neededWidth   = offeredRect.left + (mPanelRect.right - mPanelRect.left);
  short   neededHeight  = offeredRect.top  + (mPanelRect.bottom - mPanelRect.top);

  // first round of negotiations
  if (offeredRect.right == 0 && offeredRect.bottom == 0)
  {
    // just tell it what dimensions we want
    offeredRect.right   = neededWidth;
    offeredRect.bottom  = neededHeight;
  }
  else
  {
    // we are in the middle of negotiating
    if (mLastTryWidth != offeredRect.right)
      if (offeredRect.right < neededWidth)
        offeredRect.right = neededWidth;

    if (mLastTryHeight != offeredRect.bottom)
      if (offeredRect.bottom < neededHeight)
        offeredRect.bottom = neededHeight;
        
    mLastTryWidth   = offeredRect.right;
    mLastTryHeight  = offeredRect.bottom;
  }  
}

Here is the caller graph for this function:

virtual void CNavCallbackData::SaveControlValues ( NavCBRecPtr  inNavCallbackData) [pure virtual]
void CNavCallbackData::SetFirstControlID ( short  inFirstID) [inline]

Definition at line 41 of file UCustomNavServicesDialogs.cpp.

{ mFirstControlID = inFirstID; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 55 of file UCustomNavServicesDialogs.cpp.

Definition at line 53 of file UCustomNavServicesDialogs.cpp.

Definition at line 52 of file UCustomNavServicesDialogs.cpp.

Rect CNavCallbackData::mPanelRect [protected]

Definition at line 51 of file UCustomNavServicesDialogs.cpp.

StResource CNavCallbackData::mResource [protected]

Definition at line 54 of file UCustomNavServicesDialogs.cpp.


The documentation for this class was generated from the following file: