Added doc++ comments to ns/widget/src/windows

This commit is contained in:
kmcclusk 1998-04-14 23:20:49 +00:00
Родитель e0504463a1
Коммит ce81d87785
20 изменённых файлов: 100 добавлений и 31 удалений

Просмотреть файл

@ -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
{

Просмотреть файл

@ -27,7 +27,7 @@ int32 nsObject::s_nObjects = 0;
#endif
/**
* constructor
* constructor
*/
nsObject::nsObject(nsISupports *aOuter)
{
@ -52,7 +52,7 @@ nsObject::nsObject(nsISupports *aOuter)
/**
* destructor
* destructor
*/
nsObject::~nsObject()
{
@ -68,7 +68,7 @@ nsObject::~nsObject()
}
/**
* The evil triad
* nsISupports methods
*/
nsresult nsObject::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
@ -76,7 +76,7 @@ nsresult nsObject::QueryInterface(const nsIID& aIID, void** aInstancePtr)
}
/**
*
*
*/
nsrefcnt nsObject::AddRef(void)
{
@ -84,7 +84,7 @@ nsrefcnt nsObject::AddRef(void)
}
/**
*
*
*/
nsrefcnt nsObject::Release(void)
{
@ -92,21 +92,21 @@ nsrefcnt nsObject::Release(void)
}
/**
*
*
*/
inline nsrefcnt nsObject::AddRefObject(void) {
return ++mRefCnt;
}
/**
*
*
*/
inline nsrefcnt nsObject::ReleaseObject(void) {
return (--mRefCnt) ? mRefCnt : (delete this, 0);
}
/**
*
*
*/
nsresult nsObject::QueryObject(const nsIID& aIID, void** aInstancePtr)
{
@ -125,8 +125,9 @@ nsresult nsObject::QueryObject(const nsIID& aIID, void** aInstancePtr)
/**
* static utility. Delete all live objects
* 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
@ -41,8 +44,7 @@ public:
void CallMethod(MethodInfo *info);
// Return whether the current thread is the application's Gui thread.
PRBool IsGuiThread(void) { return (PRBool)(mGuiThread == PR_GetCurrentThread());}
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