mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Added doc++ comments to ns/widget/src/windows
This commit is contained in:
parent
e0504463a1
commit
ce81d87785
@ -288,7 +288,7 @@ class nsIWidget : public nsISupports {
|
||||
/**
|
||||
* Set the cursor for this widget
|
||||
*
|
||||
* @aCursor the new cursor for this widget
|
||||
* @param aCursor the new cursor for this widget
|
||||
*/
|
||||
|
||||
virtual void SetCursor(nsCursor aCursor) = 0;
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
#include "nsIButton.h"
|
||||
|
||||
/**
|
||||
* Native Win32 button wrapper
|
||||
*/
|
||||
|
||||
class nsButton : public nsWindow,
|
||||
public nsIButton
|
||||
{
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
#include "nsICheckButton.h"
|
||||
|
||||
/**
|
||||
* Native Win32 Checkbox wrapper
|
||||
*/
|
||||
|
||||
class nsCheckButton : public nsWindow,
|
||||
public nsICheckButton
|
||||
{
|
||||
@ -41,7 +45,7 @@ public:
|
||||
// nsIWidget interface
|
||||
BASE_IWIDGET_IMPL
|
||||
|
||||
// nsIChecknsButton part
|
||||
// nsICheckButton part
|
||||
virtual void SetLabel(const nsString& aText);
|
||||
virtual void GetLabel(nsString& aBuffer);
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include "nsSwitchToUIThread.h"
|
||||
#include "nsIComboBox.h"
|
||||
|
||||
/**
|
||||
* Native Win32 Combobox wrapper
|
||||
*/
|
||||
|
||||
class nsComboBox : public nsWindow,
|
||||
public nsIComboBox
|
||||
{
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIFileWidget.h"
|
||||
|
||||
/**
|
||||
* Native Win32 FileSelector wrapper
|
||||
*/
|
||||
|
||||
class nsFileWidget : public nsIFileWidget, public nsObject
|
||||
{
|
||||
public:
|
||||
|
@ -24,6 +24,10 @@
|
||||
#include "nsSwitchToUIThread.h"
|
||||
#include "nsIListBox.h"
|
||||
|
||||
/**
|
||||
* Native Win32 Listbox wrapper
|
||||
*/
|
||||
|
||||
class nsListBox : public nsWindow,
|
||||
public nsIListBox
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ nsObject::~nsObject()
|
||||
}
|
||||
|
||||
/**
|
||||
* The evil triad
|
||||
* nsISupports methods
|
||||
*/
|
||||
nsresult nsObject::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
@ -127,6 +127,7 @@ nsresult nsObject::QueryObject(const nsIID& aIID, void** aInstancePtr)
|
||||
/**
|
||||
* static utility. Delete all live objects
|
||||
*/
|
||||
|
||||
void nsObject::DeleteAllObjects(void)
|
||||
{
|
||||
PR_EnterMonitor(s_liveChainMutex);
|
||||
|
@ -21,13 +21,11 @@
|
||||
|
||||
#include "nsdefs.h"
|
||||
#include "nsCList.h"
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
#include "prmon.h"
|
||||
|
||||
/*
|
||||
* nsObject is the base class for all widgets
|
||||
/**
|
||||
* nsObject is the base class for all native widgets
|
||||
*/
|
||||
|
||||
class nsObject : public nsISupports
|
||||
@ -37,7 +35,6 @@ public:
|
||||
nsObject(nsISupports *aOuter);
|
||||
virtual ~nsObject();
|
||||
|
||||
// the evil triad.
|
||||
// Implementation of those, always forward to the outer object.
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID,
|
||||
void** aInstancePtr);
|
||||
|
@ -27,6 +27,11 @@
|
||||
#include "nsIRadioButton.h"
|
||||
#include "nsIRadioGroup.h"
|
||||
|
||||
|
||||
/**
|
||||
* Native Win32 Radio button wrapper
|
||||
*/
|
||||
|
||||
class nsRadioButton : public nsWindow,
|
||||
public nsIRadioButton
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ nsRadioGroup::Enumerator::~Enumerator()
|
||||
}
|
||||
|
||||
//
|
||||
// The evil triad
|
||||
// nsISupports methods
|
||||
//
|
||||
NS_IMPL_ISUPPORTS(nsRadioGroup::Enumerator, NS_IENUMERATOR_IID);
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
#include "nsRadioButton.h"
|
||||
#include "nsHashtable.h"
|
||||
|
||||
/**
|
||||
* Native radio button manager
|
||||
*/
|
||||
|
||||
class nsRadioGroup : public nsObject,
|
||||
public nsIRadioGroup
|
||||
{
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
#include "nsIScrollbar.h"
|
||||
|
||||
/**
|
||||
* Native WIN32 scrollbar wrapper.
|
||||
*/
|
||||
|
||||
class nsScrollbar : public nsWindow,
|
||||
public nsIScrollbar
|
||||
{
|
||||
|
@ -23,6 +23,10 @@
|
||||
// foreward declaration
|
||||
struct MethodInfo;
|
||||
|
||||
/**
|
||||
* Switch thread to match the thread the widget was created in so messages will be dispatched.
|
||||
*/
|
||||
|
||||
class nsSwitchToUIThread {
|
||||
|
||||
public:
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include "nsITextAreaWidget.h"
|
||||
|
||||
/**
|
||||
* Native WIN32 multi-line edit control wrapper.
|
||||
*/
|
||||
|
||||
class nsTextAreaWidget : public nsTextHelper,
|
||||
public nsITextAreaWidget
|
||||
{
|
||||
|
@ -22,6 +22,10 @@
|
||||
#include "nsITextWidget.h"
|
||||
#include "nsWindow.h"
|
||||
|
||||
/**
|
||||
* Base class for nsTextAreaWidget and nsTextWidget
|
||||
*/
|
||||
|
||||
class nsTextHelper : public nsWindow, public nsITextWidget
|
||||
{
|
||||
|
||||
|
@ -26,6 +26,10 @@
|
||||
|
||||
#include "nsITextWidget.h"
|
||||
|
||||
/**
|
||||
* Native WIN32 single line edit control wrapper.
|
||||
*/
|
||||
|
||||
class nsTextWidget : public nsTextHelper
|
||||
{
|
||||
|
||||
|
@ -138,7 +138,7 @@ nsToolkit::~nsToolkit()
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// The evil triad in a single shot macro
|
||||
// nsISupports implementation macro
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMPL_ISUPPORTS(nsToolkit, NS_ITOOLKIT_IID)
|
||||
|
@ -24,13 +24,16 @@
|
||||
|
||||
struct MethodInfo;
|
||||
|
||||
//
|
||||
// nsToolkit is a wrapper around the thread running the message pump
|
||||
//
|
||||
/**
|
||||
* Wrapper around the thread running the message pump.
|
||||
* The toolkit abstraction is necessary because the message pump must
|
||||
* execute within the same thread that created the widget under Win32.
|
||||
*/
|
||||
|
||||
class nsToolkit : public nsIToolkit
|
||||
{
|
||||
|
||||
public:
|
||||
public:
|
||||
nsToolkit();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -42,7 +45,6 @@ public:
|
||||
|
||||
// Return whether the current thread is the application's Gui thread.
|
||||
PRBool IsGuiThread(void) { return (PRBool)(mGuiThread == PR_GetCurrentThread());}
|
||||
|
||||
PRThread* GetGuiThread(void) { return mGuiThread; }
|
||||
HWND GetDispatchWindow(void) { return mDispatchWnd; }
|
||||
|
||||
@ -78,12 +80,15 @@ inline void nsToolkit::CallMethod(MethodInfo *info)
|
||||
::SendMessage(mDispatchWnd, WM_CALLMETHOD, (WPARAM)0, (LPARAM)info);
|
||||
}
|
||||
|
||||
//
|
||||
// MouseTrailer is used to make sure exit/enter mouse messages
|
||||
// are always dispatched
|
||||
//
|
||||
class nsWindow;
|
||||
|
||||
/**
|
||||
* Makes sure exit/enter mouse messages are always dispatched.
|
||||
* In the case where the mouse has exited the outer most window the
|
||||
* only way to tell if it has exited is to set a timer and look at the
|
||||
* mouse pointer to see if it is within the outer most window.
|
||||
*/
|
||||
|
||||
class MouseTrailer {
|
||||
|
||||
public:
|
||||
@ -92,7 +97,7 @@ public:
|
||||
static void SetMouseTrailerWindow(nsWindow * aNSWin);
|
||||
|
||||
private:
|
||||
// Global nsToolkit Instance
|
||||
/// Global nsToolkit Instance
|
||||
static MouseTrailer* theMouseTrailer;
|
||||
|
||||
public:
|
||||
@ -102,6 +107,13 @@ public:
|
||||
void DestroyTimer();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Handle timer events
|
||||
* @param hWnd handle to window
|
||||
* @param msg Win32 message
|
||||
* @param event Win32 event
|
||||
* @param time time of the event
|
||||
*/
|
||||
static void CALLBACK TimerProc(HWND hWnd,
|
||||
UINT msg,
|
||||
UINT event,
|
||||
@ -110,9 +122,14 @@ private:
|
||||
MouseTrailer();
|
||||
|
||||
private:
|
||||
// global information for mouse enter/exit events
|
||||
/* global information for mouse enter/exit events
|
||||
*/
|
||||
//@{
|
||||
/// last window
|
||||
static nsWindow* mHoldMouse;
|
||||
/// timer ID
|
||||
UINT mTimerId;
|
||||
//@}
|
||||
|
||||
};
|
||||
|
||||
|
@ -1615,7 +1615,7 @@ nsWindow::Enumerator::~Enumerator()
|
||||
}
|
||||
|
||||
//
|
||||
// The evil triad
|
||||
// nsISupports implementation macro
|
||||
//
|
||||
NS_IMPL_ISUPPORTS(nsWindow::Enumerator, NS_IENUMERATOR_IID);
|
||||
|
||||
|
@ -33,6 +33,11 @@
|
||||
#define NSRGB_2_COLOREF(color) \
|
||||
RGB(NS_GET_R(color),NS_GET_G(color),NS_GET_B(color))
|
||||
|
||||
|
||||
/**
|
||||
* Native WIN32 window wrapper.
|
||||
*/
|
||||
|
||||
class nsWindow : public nsObject,
|
||||
public nsIWidget,
|
||||
public nsSwitchToUIThread
|
||||
|
Loading…
Reference in New Issue
Block a user