Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions
CWebBrowserCMAttachment Class Reference

#include <CWebBrowserCMAttachment.h>

List of all members.

Public Types

enum  { class_ID = FOUR_CHAR_CODE('WBCM') }

Public Member Functions

 CWebBrowserCMAttachment ()
 CWebBrowserCMAttachment (LCommander *inTarget, PaneIDT inTargetPaneID=PaneIDT_Unspecified)
 CWebBrowserCMAttachment (LStream *inStream)
virtual ~CWebBrowserCMAttachment ()
virtual void ExecuteSelf (MessageT inMessage, void *ioParam)
virtual void SetCommandList (SInt16 mcmdResID)
virtual void DoContextMenuClick (const EventRecord &inMacEvent)

Detailed Description

Definition at line 56 of file CWebBrowserCMAttachment.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
class_ID 

Definition at line 59 of file CWebBrowserCMAttachment.h.

{ class_ID = FOUR_CHAR_CODE('WBCM') };

Constructor & Destructor Documentation

Definition at line 54 of file CWebBrowserCMAttachment.cpp.

{
}
CWebBrowserCMAttachment::CWebBrowserCMAttachment ( LCommander *  inTarget,
PaneIDT  inTargetPaneID = PaneIDT_Unspecified 
)

Definition at line 58 of file CWebBrowserCMAttachment.cpp.

       : LCMAttachment(inTarget, inTargetPaneID)
{
}

Definition at line 64 of file CWebBrowserCMAttachment.cpp.

       : LCMAttachment(inStream)
{
}

Definition at line 69 of file CWebBrowserCMAttachment.cpp.

{
}

Member Function Documentation

void CWebBrowserCMAttachment::DoContextMenuClick ( const EventRecord &  inMacEvent) [virtual]

Definition at line 141 of file CWebBrowserCMAttachment.cpp.

{
    DoCMMClick(inMacEvent);
}

Here is the caller graph for this function:

void CWebBrowserCMAttachment::ExecuteSelf ( MessageT  inMessage,
void ioParam 
) [virtual]

Definition at line 74 of file CWebBrowserCMAttachment.cpp.

{
       SetExecuteHost(true);
       
              // Ensure the CMM is installed and initialized. If not, just
              // return quietly.
       if (not mCMMInitialized) {
              return;
       }

              // Dispatch to the various messages we handle.
              
       if (inMessage == msg_AdjustCursor) {
       
                     // Only display the cursor if the control key is depressed
              if (((static_cast<EventRecord*>(ioParam))->modifiers & controlKey) != 0) {
              
                            //+++ This needs to be updated to use kThemeContextualMenuArrowCursor,
                            //+++ but UCursor needs to be updated to be Theme-savvy first.
                     UCursor::SetTheCursor(mCMMCursorID);
                     SetExecuteHost(false);
              }
              
       } else if (inMessage == msg_Event) {
       
       } else if (inMessage == msg_Click) {

                     // It's a click, but is it a CMM click?
              if (::IsShowContextualMenuClick(
                            &(static_cast<SMouseDownEvent*>(ioParam))->macEvent)) {

                     // It is; let's handle it. However, first we must switch the
                     // target to our object, and update the port.
                     
                     LCommander*   target = FindCommandTarget();
                     if ((target != nil) && LCommander::SwitchTarget(target)) {
                            LPane* ownerAsPane = dynamic_cast<LPane*>(mOwnerHost);                       
                            if (ownerAsPane != nil) {
                                   ownerAsPane->UpdatePort();
                            }
                     }
              }
       }
}
void CWebBrowserCMAttachment::SetCommandList ( SInt16  mcmdResID) [virtual]

Definition at line 121 of file CWebBrowserCMAttachment.cpp.

{
    Handle mcmdRes = ::GetResource(ResType_MenuCommands, mcmdResID);
    ThrowIfResFail_(mcmdRes);
    ::DetachResource(mcmdRes);  // LHandleStream takes ownership and uses DisposeHandle()
    LHandleStream inStream(mcmdRes);
    
    mCommandList.RemoveItemsAt(mCommandList.GetCount(), LArray::index_First);
    
       UInt16 numCommands;
       inStream >> numCommands;
       
       for (SInt16 i = 1; i <= numCommands; i++) {
              CommandT theCommand;
              inStream >> theCommand;
              mCommandList.AddItem(theCommand);
       }
}

Here is the caller graph for this function:


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