But, like I said, here is my first engine description:
The code:
S[name_of_class] = Classes that describe structs;
P[name_of_class] = Standard classes;
I[name_of_class] = Interfaces;
EN[name] = Enumerators;
F[name] = Attributes;
A[Name] = Parameters;
From the beginning:
I have made some classes (I have not used any structs until now and I don't pretend), to describe the structs that I'll need to use.
SRect, SCoord, SColor. This classes are being used in all the standard classes until now.
My main class, is the PDevice:
PDevice:
private: PList<PWindow>* FWindows; PStack<PWindow>* FOpenWindows; MSG FMessage; int FActiveWindow; PWindow* FCurrentWindow; IVideoDriver* FVideoDriver; PMouseDriver* FMouseDriver; PKeyboardDriver* FKeyboardDriver; void RegisterInstance(LPCSTR AWindowName); void BuildWindow(const LPCTSTR AWindowName, SRect* ADimension, PWindow* ANewWindow); void PrepareWindowToDraw(PWindow* ANewWindow); static private LRESULT CALLBACK PDevice::WindowProcedure(HWND AHandle, UINT AMessage, WPARAM AWParam, LPARAM ALParam);public: PDevice(ENVideoDriver AVideoDriver); ~PDevice(void); PWindow* CreateNewWindow(std::string AWindowName, SRect* ABounds); PWindow* GetCurrentWindow(void); IVideoDriver* GetVideoDriver(void); bool Running(void); int ActiveWindows(void); void Show(std::string AWindowName); void Hide(std::string AWindowName); void Refresh(void); void InitializeMouse(void); void InitializeKeyboard(void);
This class, have a list of PWindows, that are the windows of application =P. The stack with OpenWindows serve to set the DeviceContext to the previous window when another window is about to be closed.
The video driver, contains the drawing functions (that aren't implemented yet, except the "prepare" and "refresh" routines).
Mouse and keyboard drivers will handle the respective messages.
Another methods are explained by itselves.
Tomorrow I will talk about the PWindow and PVideoDriver class.
Remember, I'm building this framework yet, neither the windows system are ready. I will appreciate any suggestions in how can I approach my system.
Tell me what you think.
Thanx!!!
See ya...