Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Attributes
nsWindowBeOS Class Reference

#include <nsWindow.h>

Inheritance diagram for nsWindowBeOS:
Inheritance graph
[legend]
Collaboration diagram for nsWindowBeOS:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsWindowBeOS (nsIWidget *aWidgetWindow, BRect aFrame, const char *aName, window_look aLook, window_feel aFeel, int32 aFlags, int32 aWorkspace=B_CURRENT_WORKSPACE)
virtual ~nsWindowBeOS ()
virtual bool QuitRequested (void)
virtual void MessageReceived (BMessage *msg)
virtual void DispatchMessage (BMessage *msg, BHandler *handler)
virtual void WindowActivated (bool active)
virtual void FrameMoved (BPoint origin)
virtual void WorkspacesChanged (uint32 oldworkspace, uint32 newworkspace)
virtual void FrameResized (float width, float height)
virtual nsIWidgetGetMozillaWidget (void)

Public Attributes

bool fJustGotBounds

Private Attributes

BPoint lastWindowPoint

Detailed Description

Definition at line 260 of file nsWindow.h.


Constructor & Destructor Documentation

nsWindowBeOS::nsWindowBeOS ( nsIWidget aWidgetWindow,
BRect  aFrame,
const char *  aName,
window_look  aLook,
window_feel  aFeel,
int32  aFlags,
int32  aWorkspace = B_CURRENT_WORKSPACE 
)

Definition at line 2847 of file nsWindow.cpp.

              : BWindow( aFrame, aName, aLook, aFeel, aFlags, aWorkspace ),
              nsIWidgetStore( aWidgetWindow )
{
       fJustGotBounds = true;
}

Definition at line 2855 of file nsWindow.cpp.

{
       //placeholder for clean up
}

Member Function Documentation

void nsWindowBeOS::DispatchMessage ( BMessage *  msg,
BHandler *  handler 
) [virtual]

Definition at line 2888 of file nsWindow.cpp.

{
       if (msg->what == B_KEY_DOWN && modifiers() & B_COMMAND_KEY) {
              BString bytes;
              if (B_OK == msg->FindString("bytes", &bytes)) {
                     BView *view = this->CurrentFocus();
                     if (view)
                            view->KeyDown(bytes.String(), bytes.Length());
              }
              if (strcmp(bytes.String(),"w") && strcmp(bytes.String(),"W"))
                     BWindow::DispatchMessage(msg, handler);
       }
       // In some cases the message don't reach QuitRequested() hook,
       // so do it here
       else if(msg->what == B_QUIT_REQUESTED)
       {
              // tells nsWindow to kill me
              nsWindow      *w = (nsWindow *)GetMozillaWidget();
              nsToolkit     *t;
              if (w && (t = w->GetToolkit()) != 0)
              {
                     MethodInfo *info = nsnull;
                     if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::CLOSEWINDOW)))
                            t->CallMethodAsync(info);
                     NS_RELEASE(t);
              }
       }
       else
              BWindow::DispatchMessage(msg, handler);
}

Here is the call graph for this function:

void nsWindowBeOS::FrameMoved ( BPoint  origin) [virtual]

Definition at line 2921 of file nsWindow.cpp.

{      

       //determine if the window position actually changed
       if (origin.x == lastWindowPoint.x && origin.x == lastWindowPoint.x) 
       {
              //it didn't - don't bother
              return;
       }
       lastWindowPoint = origin;
       nsWindow  *w = (nsWindow *)GetMozillaWidget();
       nsToolkit *t;
       if (w && (t = w->GetToolkit()) != 0) 
       {
              MethodInfo *info = nsnull;
              if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONMOVE)))
                     t->CallMethodAsync(info);
              NS_RELEASE(t);
       }
}

Here is the call graph for this function:

void nsWindowBeOS::FrameResized ( float  width,
float  height 
) [virtual]

Definition at line 2977 of file nsWindow.cpp.

{
       // We have send message already, and Mozilla still didn't get it
       // so don't poke it endlessly with no reason
       if (!fJustGotBounds)
              return;
       nsWindow        *w = (nsWindow *)GetMozillaWidget();
       nsToolkit     *t;
       if (w && (t = w->GetToolkit()) != 0)
       {
              MethodInfo *info = nsnull;
              if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONRESIZE)))
              {
                     t->CallMethodAsync(info);
                     //Memorize fact of sending message
                     fJustGotBounds = false;
              }
              NS_RELEASE(t);
       }      
}

Here is the call graph for this function:

nsIWidget * nsIWidgetStore::GetMozillaWidget ( void  ) [virtual, inherited]

Definition at line 2838 of file nsWindow.cpp.

{
       return mWidget;
}

Here is the caller graph for this function:

void nsWindowBeOS::MessageReceived ( BMessage *  msg) [virtual]

Definition at line 2877 of file nsWindow.cpp.

{
       // Temp replacement for real DnD. Supports file drop onto window.
       if (msg->what == B_SIMPLE_DATA)
       {
              be_app_messenger.SendMessage(msg);
       }
       BWindow::MessageReceived(msg);
}

Definition at line 2860 of file nsWindow.cpp.

{
       if (CountChildren() != 0)
       {
              nsWindow      *w = (nsWindow *)GetMozillaWidget();
              nsToolkit     *t;
              if (w && (t = w->GetToolkit()) != 0)
              {
                     MethodInfo *info = nsnull;
                     if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::CLOSEWINDOW)))
                            t->CallMethodAsync(info);
                     NS_RELEASE(t);
              }
       }
       return true;
}

Here is the call graph for this function:

void nsWindowBeOS::WindowActivated ( bool  active) [virtual]

Definition at line 2942 of file nsWindow.cpp.

{
// Calls method ONACTIVATE to dispatch focus ACTIVATE messages
       nsWindow        *w = (nsWindow *)GetMozillaWidget();
       nsToolkit     *t;
       if (w && (t = w->GetToolkit()) != 0)
       {
              uint32 args[2];
              args[0] = (uint32)active;
              args[1] = (uint32)this;
              MethodInfo *info = nsnull;
              if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONACTIVATE, 2, args)))
                     t->CallMethodAsync(info);
              NS_RELEASE(t);
       }
}

Here is the call graph for this function:

void nsWindowBeOS::WorkspacesChanged ( uint32  oldworkspace,
uint32  newworkspace 
) [virtual]

Definition at line 2959 of file nsWindow.cpp.

{
       if (oldworkspace == newworkspace)
              return;
       nsWindow        *w = (nsWindow *)GetMozillaWidget();
       nsToolkit     *t;
       if (w && (t = w->GetToolkit()) != 0)
       {
              uint32 args[2];
              args[0] = newworkspace;
              args[1] = oldworkspace;
              MethodInfo *info = nsnull;
              if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONWORKSPACE, 2, args)))
                     t->CallMethodAsync(info);
              NS_RELEASE(t);
       }      
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 280 of file nsWindow.h.

Definition at line 282 of file nsWindow.h.


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