Controls
Here is the Small Windows control hierarchy:
Control.h
namespace SmallWindows { class Dialog;
The constructor sends the parent window pointer to the Window
constructer and stores the other values until it is added to the dialog information list by AddControlInfo
:
class Control : public Window { public: Control(Dialog* parentPtr, Point topLeft, Size controlSize, String className, String text, int style); void AddControlInfo(InfoList& infoList) const; Point TopLeft() const {return topLeft;} Size GetSize() const {return controlSize;}
The following methods are intended to be overridden by subclasses and are by default empty:
virtual void OnControlInit(Dialog* dialogPtr) {/* Empty. */} virtual void OnGainFocus(Dialog* dialogPtr) {/* Empty. */} virtual void OnLoseFocus(Dialog* dialogPtr) {/* Empty. */} virtual void OnChange(Dialog* dialogPtr) {/* Empty. */} virtual void OnSelect(Dialog* dialogPtr...