Initial
This commit is contained in:
101
proto/source/DISPLAY.HPP
Normal file
101
proto/source/DISPLAY.HPP
Normal file
@@ -0,0 +1,101 @@
|
||||
#ifndef _PROTO_DISPLAYMANAGER_HPP_
|
||||
#define _PROTO_DISPLAYMANAGER_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_CALLBACK_HPP_
|
||||
#include <common/callback.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_PUREPALETTE_HPP_
|
||||
#include <common/purepal.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BITMAP_HPP_
|
||||
#include <common/bitmap.hpp>
|
||||
#endif
|
||||
#ifndef _ENGINE_DIB3D_HPP_
|
||||
#include <engine/dib3d.hpp>
|
||||
#endif
|
||||
#ifndef _PROTO_PROCESSTHREAD_HPP_
|
||||
#include <proto/pthread.hpp>
|
||||
#endif
|
||||
#ifndef _THREAD_MUTEX_HPP_
|
||||
#include <thread/mutex.hpp>
|
||||
#endif
|
||||
|
||||
class GUIWindow;
|
||||
class PureObject;
|
||||
class Device3D;
|
||||
class Point3D;
|
||||
class Vector3D;
|
||||
class KeyData;
|
||||
|
||||
class DisplayManager : public ProcessThread
|
||||
{
|
||||
public:
|
||||
typedef SmartPointer<PureObject> PointerPureObject;
|
||||
typedef Block<PointerPureObject> PointerPureObjectBlock;
|
||||
typedef SmartPointer<Device3D> PointerDevice3D;
|
||||
typedef SmartPointer<DIB3D> PointerBitmap;
|
||||
DisplayManager(GUIWindow &displayWindow,const PurePalette &systemPalette);
|
||||
virtual ~DisplayManager();
|
||||
void insert(const SmartPointer<PureObject> &simpleObject);
|
||||
void shutdown(void);
|
||||
ViewSystem &getViewSystem(void);
|
||||
PointerPureObjectBlock &getObjects(void);
|
||||
PointerBitmap &getBitmap(void);
|
||||
protected:
|
||||
virtual bool initializeHandler(PointerPureObjectBlock &pureObjects);
|
||||
virtual bool preprocessHandler(PointerPureObject &pureObject);
|
||||
virtual bool scopeHandler(PointerPureObject &pureObject);
|
||||
virtual void keyDownHandler(const KeyData &keyData);
|
||||
private:
|
||||
virtual void processHandler(void);
|
||||
DisplayManager(const DisplayManager &someDisplayManager);
|
||||
DisplayManager &operator=(const DisplayManager &someDisplayManager);
|
||||
CallbackData::ReturnType sizeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType keyDownHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType keyUpHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType dialogCodeHandler(CallbackData &someCallbackData);
|
||||
void setBackground(void);
|
||||
void cancel(void);
|
||||
bool isCancelled(void)const;
|
||||
|
||||
Callback<DisplayManager> mSizeHandler;
|
||||
Callback<DisplayManager> mKeyDownHandler;
|
||||
Callback<DisplayManager> mDialogCodeHandler;
|
||||
PointerPureObjectBlock mPureObjects;
|
||||
PointerBitmap mDIB3D;
|
||||
Bitmap mBitmapBkGnd;
|
||||
PurePalette mSystemPalette;
|
||||
GUIWindow &mDisplayWindow;
|
||||
Mutex mMutex;
|
||||
bool mIsCancelled;
|
||||
};
|
||||
|
||||
inline
|
||||
void DisplayManager::insert(const SmartPointer<PureObject> &pureObject)
|
||||
{
|
||||
mPureObjects.insert(&pureObject);
|
||||
}
|
||||
|
||||
inline
|
||||
ViewSystem &DisplayManager::getViewSystem(void)
|
||||
{
|
||||
return static_cast<ViewSystem&>(*mDIB3D);
|
||||
}
|
||||
|
||||
inline
|
||||
DisplayManager::PointerPureObjectBlock &DisplayManager::getObjects(void)
|
||||
{
|
||||
return mPureObjects;
|
||||
}
|
||||
|
||||
inline
|
||||
DisplayManager::PointerBitmap &DisplayManager::getBitmap(void)
|
||||
{
|
||||
return mDIB3D;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user