Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
GeckoFrame Class Reference

#include <GeckoFrame.h>

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

List of all members.

Public Member Functions

 GeckoFrame ()
void OnActivate (wxActivateEvent &event)
void OnEditCut (wxCommandEvent &event)
void OnUpdateEditCut (wxUpdateUIEvent &event)
void OnEditCopy (wxCommandEvent &event)
void OnUpdateEditCopy (wxUpdateUIEvent &event)
void OnEditPaste (wxCommandEvent &event)
void OnUpdateEditPaste (wxUpdateUIEvent &event)
void OnEditSelectAll (wxCommandEvent &event)
bool SetupDefaultGeckoWindow ()
bool SetupGeckoWindow (GeckoWindow *aGeckoWindow, GeckoContainerUI *aUI, nsIWebBrowser **aWebBrowser) const
void SetFocus ()
virtual nsresult CreateBrowserWindow (PRUint32 aChromeFlags, nsIWebBrowserChrome *aParent, nsIWebBrowserChrome **aNewWindow)
virtual void Destroy ()
virtual void Destroyed ()
virtual void KillFocus ()
virtual void UpdateStatusBarText (const PRUnichar *aStatusText)
virtual void UpdateCurrentURI ()
virtual void UpdateBusyState (PRBool aBusy)
virtual void UpdateProgress (PRInt32 aCurrent, PRInt32 aMax)
virtual void GetResourceStringById (PRInt32 aID, char **aReturn)
virtual void ShowContextMenu (PRUint32 aContextFlags, nsIContextMenuInfo *aContextMenuInfo)
virtual void ShowTooltip (PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
virtual void HideTooltip ()
virtual void ShowWindow (PRBool aShow)
virtual void SizeTo (PRInt32 aWidth, PRInt32 aHeight)
virtual void EnableChromeWindow (PRBool aEnabled)
virtual PRUint32 RunEventLoop (PRBool &aRunCondition)

Protected Attributes

GeckoWindowmGeckoWnd
nsCOMPtr< nsIWebBrowsermWebBrowser
PRBool mBusy

Detailed Description

Definition at line 39 of file GeckoFrame.h.


Constructor & Destructor Documentation

Definition at line 39 of file GeckoFrame.cpp.

                       :
    mGeckoWnd(NULL)
{
}

Member Function Documentation

nsresult GeckoContainerUI::CreateBrowserWindow ( PRUint32  aChromeFlags,
nsIWebBrowserChrome aParent,
nsIWebBrowserChrome **  aNewWindow 
) [virtual, inherited]

Reimplemented in BrowserFrame.

Definition at line 36 of file GeckoContainerUI.cpp.

{
    return NS_ERROR_FAILURE;
}
void GeckoContainerUI::Destroy ( void  ) [virtual, inherited]

Definition at line 42 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::Destroyed ( ) [virtual, inherited]

Definition at line 46 of file GeckoContainerUI.cpp.

{
}

Here is the caller graph for this function:

void GeckoContainerUI::EnableChromeWindow ( PRBool  aEnabled) [virtual, inherited]

Definition at line 99 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::GetResourceStringById ( PRInt32  aID,
char **  aReturn 
) [virtual, inherited]

Definition at line 75 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::HideTooltip ( ) [virtual, inherited]

Definition at line 87 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::KillFocus ( ) [virtual, inherited]

Definition at line 54 of file GeckoContainerUI.cpp.

{
}
void GeckoFrame::OnActivate ( wxActivateEvent &  event)

Definition at line 94 of file GeckoFrame.cpp.

{
    nsCOMPtr<nsIWebBrowserFocus> focus(do_GetInterface(mWebBrowser));
    if (focus)
    {
        if (event.GetActive())
            focus->Activate();
        else
            focus->Deactivate();
    }
    wxFrame::OnActivate(event);
}

Here is the call graph for this function:

void GeckoFrame::OnEditCopy ( wxCommandEvent &  event)

Definition at line 123 of file GeckoFrame.cpp.

{
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->CopySelection();
}

Here is the call graph for this function:

void GeckoFrame::OnEditCut ( wxCommandEvent &  event)

Definition at line 107 of file GeckoFrame.cpp.

{
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->CutSelection();
}

Here is the call graph for this function:

void GeckoFrame::OnEditPaste ( wxCommandEvent &  event)

Definition at line 139 of file GeckoFrame.cpp.

{
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->Paste();
}

Here is the call graph for this function:

void GeckoFrame::OnEditSelectAll ( wxCommandEvent &  event)

Definition at line 155 of file GeckoFrame.cpp.

{
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->SelectAll();
}

Here is the call graph for this function:

void GeckoFrame::OnUpdateEditCopy ( wxUpdateUIEvent &  event)

Definition at line 130 of file GeckoFrame.cpp.

{
    PRBool canCopy = PR_FALSE;
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->CanCopySelection(&canCopy);
    event.Enable(canCopy ? true : false);
}

Here is the call graph for this function:

void GeckoFrame::OnUpdateEditCut ( wxUpdateUIEvent &  event)

Definition at line 114 of file GeckoFrame.cpp.

{
    PRBool canCut = PR_FALSE;
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->CanCutSelection(&canCut);
    event.Enable(canCut ? true : false);
}

Here is the call graph for this function:

void GeckoFrame::OnUpdateEditPaste ( wxUpdateUIEvent &  event)

Definition at line 146 of file GeckoFrame.cpp.

{
    PRBool canPaste = PR_FALSE;
    nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(mWebBrowser);
    if(clipCmds)
        clipCmds->CanPaste(&canPaste);
    event.Enable(canPaste ? true : false);
}

Here is the call graph for this function:

PRUint32 GeckoContainerUI::RunEventLoop ( PRBool aRunCondition) [virtual, inherited]

Definition at line 103 of file GeckoContainerUI.cpp.

{
    return 0;
}
void GeckoFrame::SetFocus ( ) [virtual]

Reimplemented from GeckoContainerUI.

Definition at line 165 of file GeckoFrame.cpp.

{
    mGeckoWnd->SetFocus();
}

Definition at line 57 of file GeckoFrame.cpp.

{
    mGeckoWnd  = (GeckoWindow *) FindWindowById(XRCID("gecko"), this);
    if (!mGeckoWnd)
        return FALSE;
    return SetupGeckoWindow(mGeckoWnd, this, getter_AddRefs(mWebBrowser));
}

Here is the call graph for this function:

bool GeckoFrame::SetupGeckoWindow ( GeckoWindow aGeckoWindow,
GeckoContainerUI aUI,
nsIWebBrowser **  aWebBrowser 
) const

Definition at line 65 of file GeckoFrame.cpp.

{
    if (!aGeckoWindow || !aUI)
        return FALSE;

    GeckoContainer *geckoContainer = new GeckoContainer(aUI);
    if (!geckoContainer)
        return FALSE;

    mGeckoWnd->SetGeckoContainer(geckoContainer);

    PRUint32 aChromeFlags = nsIWebBrowserChrome::CHROME_ALL;
    geckoContainer->SetChromeFlags(aChromeFlags);
    geckoContainer->SetParent(nsnull);
    wxSize size = mGeckoWnd->GetClientSize();

    // Insert the browser
    geckoContainer->CreateBrowser(0, 0, size.GetWidth(), size.GetHeight(),
        (nativeWindow) aGeckoWindow->GetHWND(), aWebBrowser);

    nsCOMPtr<nsIBaseWindow> webBrowserAsWin = do_QueryInterface(*aWebBrowser);
    if (webBrowserAsWin)
    {
        webBrowserAsWin->SetVisibility(PR_TRUE);
    }

    return TRUE;
}

Here is the call graph for this function:

void GeckoContainerUI::ShowContextMenu ( PRUint32  aContextFlags,
nsIContextMenuInfo aContextMenuInfo 
) [virtual, inherited]

Reimplemented in BrowserFrame.

Definition at line 79 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::ShowTooltip ( PRInt32  aXCoords,
PRInt32  aYCoords,
const PRUnichar aTipText 
) [virtual, inherited]

Definition at line 83 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::ShowWindow ( PRBool  aShow) [virtual, inherited]

Definition at line 91 of file GeckoContainerUI.cpp.

{
}

Here is the caller graph for this function:

void GeckoContainerUI::SizeTo ( PRInt32  aWidth,
PRInt32  aHeight 
) [virtual, inherited]

Definition at line 95 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::UpdateBusyState ( PRBool  aBusy) [virtual, inherited]

Definition at line 66 of file GeckoContainerUI.cpp.

{
    mBusy = aBusy;
}
void GeckoContainerUI::UpdateCurrentURI ( ) [virtual, inherited]

Reimplemented in BrowserFrame.

Definition at line 62 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::UpdateProgress ( PRInt32  aCurrent,
PRInt32  aMax 
) [virtual, inherited]

Definition at line 71 of file GeckoContainerUI.cpp.

{
}
void GeckoContainerUI::UpdateStatusBarText ( const PRUnichar aStatusText) [virtual, inherited]

Reimplemented in BrowserFrame, and EditorFrame.

Definition at line 58 of file GeckoContainerUI.cpp.

{
}

Member Data Documentation

PRBool GeckoContainerUI::mBusy [protected, inherited]

Definition at line 138 of file GeckoContainer.h.

Definition at line 44 of file GeckoFrame.h.

Definition at line 45 of file GeckoFrame.h.


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