|
From: <kw...@us...> - 2003-10-29 19:27:24
|
Update of /cvsroot/aedgui/aedGUI/include
In directory sc8-pr-cvs1:/tmp/cvs-serv7649/include
Modified Files:
aedWidget.h aedWindow.h
Log Message:
Tweaks to the aedWindow Class
Index: aedWidget.h
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/include/aedWidget.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** aedWidget.h 25 Oct 2003 19:23:04 -0000 1.2
--- aedWidget.h 29 Oct 2003 19:27:19 -0000 1.3
***************
*** 255,259 ****
virtual int wm_mouseenter() { return 0; }
virtual int wm_mouseleave() { return 0; }
! virtual int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy) { return 0; }
bool isEnabled() const
--- 255,259 ----
virtual int wm_mouseenter() { return 0; }
virtual int wm_mouseleave() { return 0; }
! virtual int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy) { return 0; }
bool isEnabled() const
Index: aedWindow.h
===================================================================
RCS file: /cvsroot/aedgui/aedGUI/include/aedWindow.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** aedWindow.h 25 Oct 2003 19:23:04 -0000 1.39
--- aedWindow.h 29 Oct 2003 19:27:19 -0000 1.40
***************
*** 1,11 ****
! #ifndef AEDWINDOW_H
! #define AEDWINDOW_H
!
! #include "dllmacros.h"
! #include "aedWidget.h"
! #include "aedStaticText.h"
! #include "aedButton.h"
!
enum aedWinFlags
{
--- 1,11 ----
! #ifndef AEDWINDOW_H
! #define AEDWINDOW_H
!
! #include "dllmacros.h"
! #include "aedWidget.h"
! #include "aedStaticText.h"
! #include "aedButton.h"
!
enum aedWinFlags
{
***************
*** 21,103 ****
};
! const Uint32 WF_NORMAL = WF_RESIZEABLE | WF_MOVEABLE | WF_TITLEBAR | WF_CLOSEBUTTON;
!
! class DLLEXPORT aedWindow : public aedWidget
! {
! public:
! aedWindow();
! virtual ~ aedWindow();
!
! virtual void create(aedWidget * parent = NULL, aedRect pos = aedDEFAULTPOSITION,
! std::string caption = "", Uint32 flags = WF_NORMAL);
!
! virtual void render(void);
!
! virtual int wm_lbuttondown(Uint16 x, Uint16 y);
! virtual int wm_lbuttonup(Uint16 x, Uint16 y);
! virtual int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy);
!
! virtual void setCaption(const std::string & caption)
! {
! m_Caption = caption;
! m_CaptionLabel->setCaption(caption);
! }
!
! aedWidget * getClientArea()
! {
! return &m_ClientArea;
! }
!
! virtual bool addWidget(aedWidget * win)
! {
! if (m_InitComplete == false || win->getUserData() == this)
! {
! return aedWidget::addWidget(win);
! }
! else
! {
! return m_ClientArea.addWidget(win);
! }
! }
!
! virtual bool removeWindget(aedWidget * win)
! {
! if (m_InitComplete == false ||win->getUserData() == this)
! {
! return aedWidget::removeWidget(win);
! }
! else
! {
! return m_ClientArea.removeWidget(win);
! }
! }
!
! void Maximize();
! void Minimize();
!
! private:
! bool m_InitComplete;
!
! bool m_Dragging;
! bool m_Moveable;
!
! int m_TitleBarBorderX;
! int m_TitleBarBorderY;
! int m_TitleBarHeight;
!
! aedWidget m_ClientArea;
! aedButton * m_CloseButton;
! aedButton * m_MinimizeButton;
! aedButton * m_MaximizeButton;
! aedStaticText * m_CaptionLabel;
! };
!
! void __aedInternal__WindowCloseButtonHandler(void * caller, void * data);
! void __aedInternal__WindowMaxButtonHandler(void * caller, void * data);
! void __aedInternal__WindowMinButtonHandler(void * caller, void * data);
!
! #if defined(_MSC_VER)
! DLLEXTERN template DLLEXPORT aedFunctor1Arg<stub, aedButton>;
! #endif
!
! #endif
--- 21,105 ----
};
! const Uint32 WF_NORMAL = WF_RESIZEABLE | WF_MOVEABLE | WF_TITLEBAR | WF_CLOSEBUTTON;
!
! class DLLEXPORT aedWindow : public aedWidget
! {
! public:
! aedWindow();
! virtual ~ aedWindow();
!
! virtual void create(aedWidget * parent = NULL, aedRect pos = aedDEFAULTPOSITION,
! std::string caption = "", Uint32 flags = WF_NORMAL);
!
! virtual void render(void);
!
! virtual int wm_lbuttondown(Uint16 x, Uint16 y);
! virtual int wm_lbuttonup(Uint16 x, Uint16 y);
! virtual int wm_mousemove(Uint16 x, Uint16 y, Uint16 dx, Uint16 dy);
!
! virtual void setCaption(const std::string & caption)
! {
! m_Caption = caption;
! m_CaptionLabel->setCaption(caption);
! }
!
! aedWidget * getClientArea()
! {
! return &m_ClientArea;
! }
!
! virtual bool addWidget(aedWidget * win)
! {
! if (m_InitComplete == false || win->getUserData() == this)
! {
! return aedWidget::addWidget(win);
! }
! else
! {
! return m_ClientArea.addWidget(win);
! }
! }
!
! virtual bool removeWindget(aedWidget * win)
! {
! if (m_InitComplete == false ||win->getUserData() == this)
! {
! return aedWidget::removeWidget(win);
! }
! else
! {
! return m_ClientArea.removeWidget(win);
! }
! }
!
! void Maximize();
! void Minimize();
!
! private:
! bool m_InitComplete;
!
! bool m_Dragging;
! bool m_Moveable;
!
! int m_TitleBarBorderX;
! int m_TitleBarBorderY;
! int m_TitleBarHeight;
!
! aedWidget m_ClientArea;
! aedButton * m_CloseButton;
! aedButton * m_MinimizeButton;
! aedButton * m_MaximizeButton;
! aedStaticText * m_CaptionLabel;
! Uint16 dragXoffset;
! Uint16 dragYoffset;
! };
!
! void __aedInternal__WindowCloseButtonHandler(void * caller, void * data);
! void __aedInternal__WindowMaxButtonHandler(void * caller, void * data);
! void __aedInternal__WindowMinButtonHandler(void * caller, void * data);
!
! #if defined(_MSC_VER)
! DLLEXTERN template DLLEXPORT aedFunctor1Arg<stub, aedButton>;
! #endif
!
! #endif
|