summaryrefslogtreecommitdiff
path: root/src/w32dlib/control.h
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-03-25 01:23:52 +0000
committerIan C <ianc@noddybox.co.uk>2005-03-25 01:23:52 +0000
commit72f0c86eb3ecdda4cab53213302fad645bc571f0 (patch)
treea78b285260bc369da116c1d98e4f5daa9f2441f9 /src/w32dlib/control.h
parent2d704117349864405f1c749b40bdd9d6f819ca03 (diff)
Cleaned up a bit by adding a base Window class.
Diffstat (limited to 'src/w32dlib/control.h')
-rw-r--r--src/w32dlib/control.h52
1 files changed, 10 insertions, 42 deletions
diff --git a/src/w32dlib/control.h b/src/w32dlib/control.h
index 85106a9..5096abf 100644
--- a/src/w32dlib/control.h
+++ b/src/w32dlib/control.h
@@ -29,7 +29,7 @@ namespace W32DLib
/// \brief The base Control class.
///
- class Control : public W32DLibCallbackInterface
+ class Control : public Window
{
public:
@@ -48,43 +48,15 @@ namespace W32DLib
///
int ResourceID();
- /// \brief Sets the text in a control
- ///
- /// \param text The control's text
- /// \sa GetText()
- ///
- void SetText(const char *text);
-
- /// \brief Gets the text in a control
- ///
- /// \param maxlen The maximum length to fetch
- /// \return The control's text
- /// \sa SetText()
- ///
- std::string GetText(int maxlen);
-
- /// \brief Enables or disables the control.
- ///
- /// Calling this when the dialog is not on display is undefined.
- ///
- /// \param enable Set true to enable, false to disable.
- ///
- void Enable(bool enable);
-
- /// \brief Gets the control's window handle
- ///
- /// Calling this when the dialog is not on display is undefined.
- ///
- /// \return The window handle
- ///
- HWND GetHWND();
-
/// \brief Processes a windows event.
///
- /// \param msg The Windows event parameters
+ /// This is called by the Dialog when a message is recieved that
+ /// refers to this control's resource ID.
+ ///
+ /// \param msg The Windows event
/// \param wp The Windows event parameters
/// \param lp The Windows event parameters
- /// \return True if the message was processed.
+ /// \return TRUE if the message was processed.
///
BOOL ProcessMessage(UINT msg, WPARAM wp, LPARAM lp);
@@ -95,11 +67,11 @@ namespace W32DLib
/// \param msg The Windows event message to respond to.
/// \param owner The class (generally a Dialog derived one) in which
/// the callback resides. The class must be derived from
- /// W32DLibCallbackInterface.
+ /// Window.
/// \param callback The callback.
///
void AddCallback(UINT msg,
- W32DLibCallbackInterface *owner,
+ Window *owner,
W32DLibCallback callback);
/// \brief Filled in by the constructor with the parent dialog.
@@ -110,16 +82,12 @@ namespace W32DLib
///
int m_resid;
- /// \brief Filled in when the WM_INITDIALOG message is recieved.
- ///
- HWND m_wnd;
-
private:
struct CallbackDetails
{
- W32DLibCallbackInterface *owner;
- W32DLibCallback cb;
+ Window *owner;
+ W32DLibCallback cb;
};
typedef std::map<UINT,CallbackDetails> CallbackList;