forked from FWGS/Paranoia2
vgui: remove old HLSDK 2.3 vgui
This commit is contained in:
parent
0752a867ec
commit
a3150e6d61
|
@ -1,107 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_H
|
||||
#define VGUI_H
|
||||
|
||||
//If you are going to add stuff to the vgui core...
|
||||
//
|
||||
//Keep it simple.
|
||||
//
|
||||
//Never put code in a header.
|
||||
//
|
||||
//The name of the class is the name of the the file
|
||||
//
|
||||
//Each class gets its own .cpp file for its definition and a .h for its header. Helper
|
||||
//classes can be used but only within the .cpp and not referenceable from anywhere else.
|
||||
//
|
||||
//Don't add unneeded files. Keep the API clean.
|
||||
//
|
||||
//No platform specific code in vgui\lib-src\vgui dir. Code in vgui\lib-src\vgui should
|
||||
//only include from vgui\include or standard C includes. ie, if I see windows.h included
|
||||
//anywhere but vgui\lib-src\win32 I will hunt you down and kill you. Don't give me any crap
|
||||
//that mfc is platform inspecific.
|
||||
//
|
||||
//Always use <> and not "" for includes
|
||||
//
|
||||
//Use minimum dependencies in headers. Don't include another header if you can get away
|
||||
//with forward declaring (which is usually the case)
|
||||
//
|
||||
//No macros in headers. They are tools of satan. This also means no use of DEFINEs, use enum
|
||||
//
|
||||
//Minimize global functions
|
||||
//
|
||||
//No global variables.
|
||||
//
|
||||
//Panel is getting pretty plump, try and avoid adding junk to it if you can
|
||||
|
||||
//TODO: Look and Feel support
|
||||
// add Panel::setPaintProxy, if _paintProxy exists, it calls _paintProxy->paint
|
||||
// instead of Panel::paint. Components should implement their painting in a seperate
|
||||
// plugin class. Perhaps to encourage this, Panel::paint should just go away completely
|
||||
// The other option is to have Panel have the interface Paintable
|
||||
// class Paintable
|
||||
// {
|
||||
// public:
|
||||
// virtual void paint()=0;
|
||||
// };
|
||||
// Then a component can implement its paint in the class itself and then call
|
||||
// setPaintProxy(this). If this is the case _paintProxy->paint should always be called
|
||||
// and never Panel::paint from within paintTraverse
|
||||
//TODO: Figure out the 'Valve' Look and Feel and implement that instead of a the Java one
|
||||
//TODO: Determine ownership policy for Borders, Layouts, etc..
|
||||
//TODO: tooltips support
|
||||
//TODO: ComboKey (hot key support)
|
||||
//TODO: add Background.cpp, remove paintBackground from all components
|
||||
// Panel implements setBackground, Panel::paintBackground calls _background->paintBackground
|
||||
// similiar to the way Border works.
|
||||
//TODO: Builtin components should never overide paintBackground, only paint
|
||||
//TODO: All protected members should be converted to private
|
||||
//TODO: All member variables should be moved to the top of the class prototype
|
||||
//TODO: All private methods should be prepended with private
|
||||
//TODO: Use of word internal in method names is not consistent and confusing
|
||||
//TODO: Cleanup so bullshit publics are properly named, maybe even figure out
|
||||
// a naming convention for them
|
||||
//TODO: Breakup InputSignal into logical pieces
|
||||
//TODO: Button is in a state of disarray, it should have ButtonModel support
|
||||
//TODO: get rid of all the stupid strdup laziness, convert to vgui_strdup
|
||||
//TODO: actually figure out policy on String and implement it consistently
|
||||
//TODO: implement createLayoutInfo for other Layouts than need it
|
||||
//TODO: BorderLayout should have option for a null LayoutInfo defaulting to center
|
||||
//TODO: SurfaceBase should go away, put it in Surface
|
||||
//TODO: ActionSignals and other Signals should just set a flag when they fire.
|
||||
// then App can come along later and fire all the signals
|
||||
//TODO: Change all method naming to starting with a capital letter.
|
||||
|
||||
#ifdef _WIN32
|
||||
# define VGUIAPI __declspec( dllexport )
|
||||
#else
|
||||
# define VGUIAPI
|
||||
#endif
|
||||
|
||||
#define null 0L
|
||||
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
VGUIAPI void vgui_setMalloc(void* (*malloc)(size_t size));
|
||||
VGUIAPI void vgui_setFree(void (*free)(void* memblock));
|
||||
VGUIAPI void vgui_strcpy(char* dst,int dstLen,const char* src);
|
||||
VGUIAPI char* vgui_strdup(const char* src);
|
||||
VGUIAPI int vgui_printf(const char* format,...);
|
||||
VGUIAPI int vgui_dprintf(const char* format,...);
|
||||
VGUIAPI int vgui_dprintf2(const char* format,...);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_ACTIONSIGNAL_H
|
||||
#define VGUI_ACTIONSIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
/*
|
||||
|
||||
TODO: maybe try something like this..
|
||||
|
||||
class VGUIAPI ActionSignal
|
||||
{
|
||||
};
|
||||
|
||||
class VGUIAPI ActionSignalSimple : public ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(Panel* panel)=0;
|
||||
};
|
||||
|
||||
class VGUIAPI ActionSignalInt : public ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(int value,Panel* panel)=0;
|
||||
};
|
||||
|
||||
|
||||
DefaultButtonModel would implement:
|
||||
|
||||
virtual void addActionSignal(ActionSignal* s)
|
||||
{
|
||||
if(s!=null)
|
||||
{
|
||||
_actionSignalDar.putElement(s);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void fireActionSignal()
|
||||
{
|
||||
for(int i=0;i<_actionSignalDar.getCount();i++)
|
||||
{
|
||||
ActionSignal* signal=_actionSignalDar[i];
|
||||
|
||||
ActionSignalSimple* ss=dynamic_cast<ActionSignalSimple*>(signal);
|
||||
if(ss!=null)
|
||||
{
|
||||
ss->actionPerformed(this);
|
||||
}
|
||||
|
||||
ActionSignalCommand* si=dynamic_cast<ActionSignalInt*>(signal);
|
||||
if(si!=null)
|
||||
{
|
||||
si->actionPerformed(_intValue,this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_APP_H
|
||||
#define VGUI_APP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_MouseCode.h>
|
||||
#include<VGUI_KeyCode.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Cursor.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
enum KeyCode;
|
||||
class Panel;
|
||||
class TickSignal;
|
||||
class Scheme;
|
||||
class TickSignal;
|
||||
class SurfaceBase;
|
||||
|
||||
class VGUIAPI App
|
||||
{
|
||||
public:
|
||||
App();
|
||||
App(bool externalMain);
|
||||
public:
|
||||
static App* getInstance();
|
||||
//TODO: the public and public bullshit are all messed up, need to organize
|
||||
//TODO: actually all of the access needs to be properly thought out while you are at it
|
||||
public:
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual void externalTick();
|
||||
virtual bool wasMousePressed(MouseCode code,Panel* panel);
|
||||
virtual bool wasMouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual bool isMouseDown(MouseCode code,Panel* panel);
|
||||
virtual bool wasMouseReleased(MouseCode code,Panel* panel);
|
||||
virtual bool wasKeyPressed(KeyCode code,Panel* panel);
|
||||
virtual bool isKeyDown(KeyCode code,Panel* panel);
|
||||
virtual bool wasKeyTyped(KeyCode code,Panel* panel);
|
||||
virtual bool wasKeyReleased(KeyCode code,Panel* panel);
|
||||
virtual void addTickSignal(TickSignal* s);
|
||||
virtual void setCursorPos(int x,int y);
|
||||
virtual void getCursorPos(int& x,int& y);
|
||||
virtual void setMouseCapture(Panel* panel);
|
||||
virtual void setMouseArena(int x0,int y0,int x1,int y1,bool enabled);
|
||||
virtual void setMouseArena(Panel* panel);
|
||||
virtual void requestFocus(Panel* panel);
|
||||
virtual Panel* getFocus();
|
||||
virtual void repaintAll();
|
||||
virtual void setScheme(Scheme* scheme);
|
||||
virtual Scheme* getScheme();
|
||||
virtual void enableBuildMode();
|
||||
virtual long getTimeMillis();
|
||||
virtual char getKeyCodeChar(KeyCode code,bool shifted);
|
||||
virtual void getKeyCodeText(KeyCode code,char* buf,int buflen);
|
||||
virtual int getClipboardTextCount();
|
||||
virtual void setClipboardText(const char* text,int textLen);
|
||||
virtual int getClipboardText(int offset,char* buf,int bufLen);
|
||||
virtual void reset();
|
||||
virtual void internalSetMouseArena(int x0,int y0,int x1,int y1,bool enabled);
|
||||
virtual bool setRegistryString(const char* key,const char* value);
|
||||
virtual bool getRegistryString(const char* key,char* value,int valueLen);
|
||||
virtual bool setRegistryInteger(const char* key,int value);
|
||||
virtual bool getRegistryInteger(const char* key,int& value);
|
||||
virtual void setCursorOveride(Cursor* cursor);
|
||||
virtual Cursor* getCursorOveride();
|
||||
virtual void setMinimumTickMillisInterval(int interval);
|
||||
public: //bullshit public stuff
|
||||
virtual void main(int argc,char* argv[])=0;
|
||||
virtual void run();
|
||||
virtual void internalCursorMoved(int x,int y,SurfaceBase* surfaceBase); //expects input in surface space
|
||||
virtual void internalMousePressed(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseDoublePressed(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseReleased(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseWheeled(int delta,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyPressed(KeyCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyTyped(KeyCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyReleased(KeyCode code,SurfaceBase* surfaceBase);
|
||||
private:
|
||||
virtual void init();
|
||||
virtual void updateMouseFocus(int x,int y,SurfaceBase* surfaceBase);
|
||||
virtual void setMouseFocus(Panel* newMouseFocus);
|
||||
protected:
|
||||
virtual void surfaceBaseCreated(SurfaceBase* surfaceBase);
|
||||
virtual void surfaceBaseDeleted(SurfaceBase* surfaceBase);
|
||||
virtual void platTick();
|
||||
virtual void internalTick();
|
||||
protected:
|
||||
static App* _instance;
|
||||
protected:
|
||||
bool _running;
|
||||
bool _externalMain;
|
||||
Dar<SurfaceBase*> _surfaceBaseDar;
|
||||
Panel* _keyFocus;
|
||||
Panel* _oldMouseFocus;
|
||||
Panel* _mouseFocus;
|
||||
Panel* _mouseCapture;
|
||||
Panel* _wantedKeyFocus;
|
||||
bool _mousePressed[MOUSE_LAST];
|
||||
bool _mouseDoublePressed[MOUSE_LAST];
|
||||
bool _mouseDown[MOUSE_LAST];
|
||||
bool _mouseReleased[MOUSE_LAST];
|
||||
bool _keyPressed[KEY_LAST];
|
||||
bool _keyTyped[KEY_LAST];
|
||||
bool _keyDown[KEY_LAST];
|
||||
bool _keyReleased[KEY_LAST];
|
||||
Dar<TickSignal*> _tickSignalDar;
|
||||
Scheme* _scheme;
|
||||
bool _buildMode;
|
||||
bool _wantedBuildMode;
|
||||
Panel* _mouseArenaPanel;
|
||||
Cursor* _cursor[Cursor::DefaultCursor::dc_last];
|
||||
Cursor* _cursorOveride;
|
||||
private:
|
||||
long _nextTickMillis;
|
||||
long _minimumTickMillisInterval;
|
||||
friend class SurfaceBase;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BITMAP_H
|
||||
#define VGUI_BITMAP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Image.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Bitmap : public Image
|
||||
{
|
||||
private:
|
||||
int _id;
|
||||
bool _uploaded;
|
||||
public:
|
||||
Bitmap();
|
||||
protected:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void setRGBA(int x,int y,uchar r,uchar g,uchar b,uchar a);
|
||||
public:
|
||||
virtual void paint(Panel* panel);
|
||||
protected:
|
||||
uchar* _rgba;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BITMAPTGA_H
|
||||
#define VGUI_BITMAPTGA_H
|
||||
|
||||
#include<VGUI_Bitmap.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class InputStream;
|
||||
|
||||
class VGUIAPI BitmapTGA : public Bitmap
|
||||
{
|
||||
public:
|
||||
BitmapTGA(InputStream* is,bool invertAlpha);
|
||||
private:
|
||||
virtual bool loadTGA(InputStream* is,bool invertAlpha);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDER_H
|
||||
#define VGUI_BORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Image.h>
|
||||
|
||||
//TODO: all borders should be titled
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Border : public Image
|
||||
{
|
||||
public:
|
||||
Border();
|
||||
Border(int left,int top,int right,int bottom);
|
||||
public:
|
||||
virtual void setInset(int left,int top,int right,int bottom);
|
||||
virtual void getInset(int& left,int& top,int& right,int& bottom);
|
||||
protected:
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
protected:
|
||||
int _inset[4];
|
||||
private:
|
||||
Panel* _panel;
|
||||
friend class Panel;
|
||||
friend class BorderPair;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,46 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDERLAYOUT_H
|
||||
#define VGUI_BORDERLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class LayoutInfo;
|
||||
|
||||
class VGUIAPI BorderLayout : public Layout
|
||||
{
|
||||
public:
|
||||
enum Alignment
|
||||
{
|
||||
a_center=0,
|
||||
a_north,
|
||||
a_south,
|
||||
a_east,
|
||||
a_west,
|
||||
};
|
||||
private:
|
||||
int _inset;
|
||||
public:
|
||||
BorderLayout(int inset);
|
||||
public:
|
||||
virtual void performLayout(Panel* panel);
|
||||
virtual LayoutInfo* createLayoutInfo(Alignment alignment);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDERPAIR_H
|
||||
#define VGUI_BORDERPAIR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI BorderPair : public Border
|
||||
{
|
||||
public:
|
||||
BorderPair(Border* border0,Border* border1);
|
||||
public:
|
||||
virtual void doPaint(Panel* panel);
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
protected:
|
||||
Border* _border[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,67 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUILDGROUP_H
|
||||
#define VGUI_BUILDGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
enum MouseCode;
|
||||
class Panel;
|
||||
class Cursor;
|
||||
class ChangeSignal;
|
||||
|
||||
class VGUIAPI BuildGroup
|
||||
{
|
||||
private:
|
||||
bool _enabled;
|
||||
int _snapX;
|
||||
int _snapY;
|
||||
Cursor* _cursor_sizenwse;
|
||||
Cursor* _cursor_sizenesw;
|
||||
Cursor* _cursor_sizewe;
|
||||
Cursor* _cursor_sizens;
|
||||
Cursor* _cursor_sizeall;
|
||||
bool _dragging;
|
||||
MouseCode _dragMouseCode;
|
||||
int _dragStartPanelPos[2];
|
||||
int _dragStartCursorPos[2];
|
||||
Panel* _currentPanel;
|
||||
Dar<ChangeSignal*> _currentPanelChangeSignalDar;
|
||||
Dar<Panel*> _panelDar;
|
||||
Dar<char*> _panelNameDar;
|
||||
public:
|
||||
BuildGroup();
|
||||
public:
|
||||
virtual void setEnabled(bool state);
|
||||
virtual bool isEnabled();
|
||||
virtual void addCurrentPanelChangeSignal(ChangeSignal* s);
|
||||
virtual Panel* getCurrentPanel();
|
||||
virtual void copyPropertiesToClipboard();
|
||||
private:
|
||||
virtual void applySnap(Panel* panel);
|
||||
virtual void fireCurrentPanelChangeSignal();
|
||||
protected:
|
||||
friend class Panel;
|
||||
virtual void panelAdded(Panel* panel,const char* panelName);
|
||||
virtual void cursorMoved(int x,int y,Panel* panel);
|
||||
virtual void mousePressed(MouseCode code,Panel* panel);
|
||||
virtual void mouseReleased(MouseCode code,Panel* panel);
|
||||
virtual void mouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual void keyTyped(KeyCode code,Panel* panel);
|
||||
virtual Cursor* getCursor(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,61 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTON_H
|
||||
#define VGUI_BUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
class ButtonController;
|
||||
class ButtonGroup;
|
||||
class ActionSignal;
|
||||
|
||||
//TODO: Button should be derived from an AbstractButton
|
||||
class VGUIAPI Button : public Label
|
||||
{
|
||||
public:
|
||||
Button(const char* text,int x,int y,int wide,int tall);
|
||||
Button(const char* text,int x,int y);
|
||||
private:
|
||||
void init();
|
||||
public:
|
||||
virtual void setSelected(bool state);
|
||||
virtual void setSelectedDirect(bool state);
|
||||
virtual void setArmed(bool state);
|
||||
virtual bool isSelected();
|
||||
virtual void doClick();
|
||||
virtual void addActionSignal(ActionSignal* s);
|
||||
virtual void setButtonGroup(ButtonGroup* buttonGroup);
|
||||
virtual bool isArmed();
|
||||
virtual void setButtonBorderEnabled(bool state);
|
||||
virtual void setMouseClickEnabled(MouseCode code,bool state);
|
||||
virtual bool isMouseClickEnabled(MouseCode code);
|
||||
virtual void fireActionSignal();
|
||||
virtual Panel* createPropertyPanel();
|
||||
protected:
|
||||
virtual void setButtonController(ButtonController* _buttonController);
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
char* _text;
|
||||
bool _armed;
|
||||
bool _selected;
|
||||
bool _buttonBorderEnabled;
|
||||
Dar<ActionSignal*> _actionSignalDar;
|
||||
int _mouseClickMask;
|
||||
ButtonGroup* _buttonGroup;
|
||||
ButtonController* _buttonController;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTONCONTROLLER_H
|
||||
#define VGUI_BUTTONCONTROLLER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ButtonController
|
||||
{
|
||||
public:
|
||||
virtual void addSignals(Button* button)=0;
|
||||
virtual void removeSignals(Button* button)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTONGROUP_H
|
||||
#define VGUI_BUTTONGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ButtonGroup
|
||||
{
|
||||
public:
|
||||
virtual void addButton(Button* button);
|
||||
virtual void setSelected(Button* button);
|
||||
protected:
|
||||
Dar<Button*> _buttonDar;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CHANGESIGNAL_H
|
||||
#define VGUI_CHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI ChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void valueChanged(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,28 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CHECKBUTTON_H
|
||||
#define VGUI_CHECKBUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_ToggleButton.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI CheckButton : public ToggleButton
|
||||
{
|
||||
public:
|
||||
CheckButton(const char* text,int x,int y,int wide,int tall);
|
||||
CheckButton(const char* text,int x,int y);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,44 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_COLOR_H
|
||||
#define VGUI_COLOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
|
||||
//TODO: rename getColor(r,g,b,a) to getRGBA(r,g,b,a)
|
||||
//TODO: rename setColor(r,g,b,a) to setRGBA(r,g,b,a)
|
||||
//TODO: rename getColor(sc) to getSchemeColor(sc)
|
||||
//TODO: rename setColor(sc) to setSchemeColor(sc)
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI Color
|
||||
{
|
||||
private:
|
||||
uchar _color[4];
|
||||
Scheme::SchemeColor _schemeColor;
|
||||
public:
|
||||
Color();
|
||||
Color(int r,int g,int b,int a);
|
||||
Color(Scheme::SchemeColor sc);
|
||||
private:
|
||||
virtual void init();
|
||||
public:
|
||||
virtual void setColor(int r,int g,int b,int a);
|
||||
virtual void setColor(Scheme::SchemeColor sc);
|
||||
virtual void getColor(int& r,int& g,int& b,int& a);
|
||||
virtual void getColor(Scheme::SchemeColor& sc);
|
||||
virtual int operator[](int index);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -1,34 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_COMBOKEY_H
|
||||
#define VGUI_COMBOKEY_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
|
||||
class ComboKey
|
||||
{
|
||||
public:
|
||||
ComboKey(KeyCode code,KeyCode modifier);
|
||||
public:
|
||||
bool isTwoCombo(KeyCode code,KeyCode modifier);
|
||||
protected:
|
||||
bool check(KeyCode code);
|
||||
protected:
|
||||
KeyCode _keyCode[2];
|
||||
friend class Panel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -1,40 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CONFIGWIZARD_H
|
||||
#define VGUI_CONFIGWIZARD_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class TreeFolder;
|
||||
class Panel;
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ConfigWizard : public Panel
|
||||
{
|
||||
public:
|
||||
ConfigWizard(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual Panel* getClient();
|
||||
virtual TreeFolder* getFolder();
|
||||
protected:
|
||||
TreeFolder* _treeFolder;
|
||||
Panel* _client;
|
||||
Button* _okButton;
|
||||
Button* _cancelButton;
|
||||
Button* _applyButton;
|
||||
Button* _helpButton;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,57 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CURSOR_H
|
||||
#define VGUI_CURSOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Bitmap;
|
||||
|
||||
class VGUIAPI Cursor
|
||||
{
|
||||
public:
|
||||
enum DefaultCursor
|
||||
{
|
||||
dc_user,
|
||||
dc_none,
|
||||
dc_arrow,
|
||||
dc_ibeam,
|
||||
dc_hourglass,
|
||||
dc_crosshair,
|
||||
dc_up,
|
||||
dc_sizenwse,
|
||||
dc_sizenesw,
|
||||
dc_sizewe,
|
||||
dc_sizens,
|
||||
dc_sizeall,
|
||||
dc_no,
|
||||
dc_hand,
|
||||
dc_last,
|
||||
};
|
||||
private:
|
||||
int _hotspot[2];
|
||||
Bitmap* _bitmap;
|
||||
DefaultCursor _dc;
|
||||
public:
|
||||
Cursor(DefaultCursor dc);
|
||||
Cursor(Bitmap* bitmap,int hotspotX,int hotspotY);
|
||||
public:
|
||||
virtual void getHotspot(int& x,int& y);
|
||||
private:
|
||||
virtual void privateInit(Bitmap* bitmap,int hotspotX,int hotspotY);
|
||||
public:
|
||||
virtual Bitmap* getBitmap();
|
||||
virtual DefaultCursor getDefaultCursor();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,193 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DAR_H
|
||||
#define VGUI_DAR_H
|
||||
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include<VGUI.h>
|
||||
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
//Simple lightweight dynamic array implementation
|
||||
template<class ELEMTYPE> class VGUIAPI Dar
|
||||
{
|
||||
public:
|
||||
Dar()
|
||||
{
|
||||
_count=0;
|
||||
_capacity=0;
|
||||
_data=null;
|
||||
ensureCapacity(4);
|
||||
}
|
||||
Dar(int initialCapacity)
|
||||
{
|
||||
_count=0;
|
||||
_capacity=0;
|
||||
_data=null;
|
||||
ensureCapacity(initialCapacity);
|
||||
}
|
||||
public:
|
||||
void ensureCapacity(int wantedCapacity)
|
||||
{
|
||||
if(wantedCapacity<=_capacity){return;}
|
||||
|
||||
//double capacity until it is >= wantedCapacity
|
||||
//this could be done with math, but iterative is just so much more fun
|
||||
int newCapacity=_capacity;
|
||||
if(newCapacity==0){newCapacity=1;}
|
||||
while(newCapacity<wantedCapacity){newCapacity*=2;}
|
||||
|
||||
//allocate and zero newData
|
||||
ELEMTYPE* newData=new ELEMTYPE[newCapacity];
|
||||
if(newData==null){exit(0);return;}
|
||||
memset(newData,0,sizeof(ELEMTYPE)*newCapacity);
|
||||
_capacity=newCapacity;
|
||||
|
||||
//copy data into newData
|
||||
for(int i=0;i<_count;i++){newData[i]=_data[i];}
|
||||
|
||||
delete[] _data;
|
||||
_data=newData;
|
||||
}
|
||||
void setCount(int count)
|
||||
{
|
||||
if((count<0)||(count>_capacity))
|
||||
{
|
||||
return;
|
||||
}
|
||||
_count=count;
|
||||
}
|
||||
int getCount()
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
void addElement(ELEMTYPE elem)
|
||||
{
|
||||
ensureCapacity(_count+1);
|
||||
_data[_count]=elem;
|
||||
_count++;
|
||||
}
|
||||
bool hasElement(ELEMTYPE elem)
|
||||
{
|
||||
for(int i=0;i<_count;i++)
|
||||
{
|
||||
if(_data[i]==elem)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void putElement(ELEMTYPE elem)
|
||||
{
|
||||
if(hasElement(elem))
|
||||
{
|
||||
return;
|
||||
}
|
||||
addElement(elem);
|
||||
}
|
||||
void insertElementAt(ELEMTYPE elem,int index)
|
||||
{
|
||||
if((index<0)||(index>_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if((index==_count)||(_count==0))
|
||||
{
|
||||
addElement(elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
addElement(elem); //just to make sure it is big enough
|
||||
for(int i=_count-1;i>index;i--)
|
||||
{
|
||||
_data[i]=_data[i-1];
|
||||
}
|
||||
_data[index]=elem;
|
||||
}
|
||||
}
|
||||
void setElementAt(ELEMTYPE elem,int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
_data[index]=elem;
|
||||
}
|
||||
void removeElementAt(int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//slide everything to the right of index, left one.
|
||||
for(int i=index;i<(_count-1);i++)
|
||||
{
|
||||
_data[i]=_data[i+1];
|
||||
}
|
||||
_count--;
|
||||
}
|
||||
void removeElement(ELEMTYPE elem)
|
||||
{
|
||||
for(int i=0;i<_count;i++)
|
||||
{
|
||||
if(_data[i]==elem)
|
||||
{
|
||||
removeElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void removeAll()
|
||||
{
|
||||
_count=0;
|
||||
}
|
||||
ELEMTYPE operator[](int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _data[index];
|
||||
}
|
||||
protected:
|
||||
int _count;
|
||||
int _capacity;
|
||||
ELEMTYPE* _data;
|
||||
};
|
||||
|
||||
//forward referencing all the template types used so they get exported
|
||||
template class VGUIAPI Dar<char>;
|
||||
template class VGUIAPI Dar<char*>;
|
||||
template class VGUIAPI Dar<int>;
|
||||
template class VGUIAPI Dar<class Button*>;
|
||||
template class VGUIAPI Dar<class SurfaceBase*>;
|
||||
template class VGUIAPI Dar<class InputSignal*>;
|
||||
template class VGUIAPI Dar<class FocusChangeSignal*>;
|
||||
template class VGUIAPI Dar<class FrameSignal*>;
|
||||
template class VGUIAPI Dar<class ActionSignal*>;
|
||||
template class VGUIAPI Dar<class IntChangeSignal*>;
|
||||
template class VGUIAPI Dar<class TickSignal*>;
|
||||
template class VGUIAPI Dar<class Dar<char>*>;
|
||||
template class VGUIAPI Dar<class Frame*>;
|
||||
template class VGUIAPI Dar<class DesktopIcon*>;
|
||||
template class VGUIAPI Dar<class ChangeSignal*>;
|
||||
template class VGUIAPI Dar<class Panel*>;
|
||||
template class VGUIAPI Dar<class Label*>;
|
||||
template class VGUIAPI Dar<class RepaintSignal*>;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -1,49 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DATAINPUTSTREAM_H
|
||||
#define VGUI_DATAINPUTSTREAM_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_InputStream.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI DataInputStream : virtual public InputStream
|
||||
{
|
||||
private:
|
||||
InputStream* _is;
|
||||
public:
|
||||
DataInputStream(InputStream* is);
|
||||
public:
|
||||
virtual void seekStart(bool& success);
|
||||
virtual void seekRelative(int count,bool& success);
|
||||
virtual void seekEnd(bool& success);
|
||||
virtual int getAvailable(bool& success);
|
||||
//virtual uchar readUChar(bool& success);
|
||||
virtual void readUChar(uchar* buf,int count,bool& success);
|
||||
virtual void close(bool& success);
|
||||
virtual void close();
|
||||
public:
|
||||
virtual bool readBool(bool& success);
|
||||
virtual char readChar(bool& success);
|
||||
virtual uchar readUChar(bool& success);
|
||||
virtual short readShort(bool& success);
|
||||
virtual ushort readUShort(bool& success);
|
||||
virtual int readInt(bool& success);
|
||||
virtual uint readUInt(bool& success);
|
||||
virtual long readLong(bool& success);
|
||||
virtual ulong readULong(bool& success);
|
||||
virtual float readFloat(bool& success);
|
||||
virtual double readDouble(bool& success);
|
||||
virtual void readLine(char* buf,int bufLen,bool& success);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,42 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DESKTOP_H
|
||||
#define VGUI_DESKTOP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class DesktopIcon;
|
||||
class TaskBar;
|
||||
|
||||
class VGUIAPI Desktop : public Panel
|
||||
{
|
||||
public:
|
||||
Desktop(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void iconActivated(DesktopIcon* icon);
|
||||
virtual void addIcon(DesktopIcon* icon);
|
||||
virtual void arrangeIcons();
|
||||
virtual Panel* getBackground();
|
||||
virtual Panel* getForeground();
|
||||
protected:
|
||||
Panel* _background;
|
||||
Panel* _foreground;
|
||||
TaskBar* _taskBar;
|
||||
Dar<DesktopIcon*> _desktopIconDar;
|
||||
int _cascade[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,41 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DESKTOPICON_H
|
||||
#define VGUI_DESKTOPICON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class MiniApp;
|
||||
class Image;
|
||||
class Desktop;
|
||||
|
||||
class VGUIAPI DesktopIcon : public Panel
|
||||
{
|
||||
public:
|
||||
DesktopIcon(MiniApp* miniApp,Image* image);
|
||||
public:
|
||||
virtual void doActivate();
|
||||
virtual void setImage(Image* image);
|
||||
public: //bullshit public
|
||||
virtual void setDesktop(Desktop* desktop);
|
||||
virtual MiniApp* getMiniApp();
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Desktop* _desktop;
|
||||
MiniApp* _miniApp;
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,65 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_EDITPANEL_H
|
||||
#define VGUI_EDITPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Font;
|
||||
|
||||
class VGUIAPI EditPanel : public Panel
|
||||
{
|
||||
public:
|
||||
EditPanel(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void doCursorUp();
|
||||
virtual void doCursorDown();
|
||||
virtual void doCursorLeft();
|
||||
virtual void doCursorRight();
|
||||
virtual void doCursorToStartOfLine();
|
||||
virtual void doCursorToEndOfLine();
|
||||
virtual void doCursorInsertChar(char ch);
|
||||
virtual void doCursorBackspace();
|
||||
virtual void doCursorNewLine();
|
||||
virtual void doCursorDelete();
|
||||
virtual void doCursorPrintf(char* format,...);
|
||||
virtual int getLineCount();
|
||||
virtual int getVisibleLineCount();
|
||||
virtual void setCursorBlink(bool state);
|
||||
virtual void setFont(Font* font);
|
||||
virtual void getText(int lineIndex, int offset,char* buf,int bufLen);
|
||||
|
||||
public: //bullshit public
|
||||
void getCursorBlink(bool& blink,int& nextBlinkTime);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
virtual void paint();
|
||||
virtual void addLine();
|
||||
virtual Dar<char>* getLine(int lineIndex);
|
||||
virtual void setChar(Dar<char>* lineDar,int x,char ch,char fill);
|
||||
virtual void setChar(Dar<char>* lineDar,int x,char ch);
|
||||
virtual void shiftLineLeft(Dar<char>* lineDar,int x,int count);
|
||||
virtual void shiftLineRight(Dar<char>* lineDar,int x,int count);
|
||||
private:
|
||||
virtual int spatialCharOffsetBetweenTwoLines(Dar<char>* srcDar,Dar<char>* dstDar,int x);
|
||||
protected:
|
||||
Dar<Dar<char>*> _lineDarDar;
|
||||
int _cursor[2];
|
||||
bool _cursorBlink;
|
||||
int _cursorNextBlinkTime;
|
||||
Font* _font;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_ETCHEDBORDER_H
|
||||
#define VGUI_ETCHEDBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI EtchedBorder : public Border
|
||||
{
|
||||
public:
|
||||
EtchedBorder();
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,38 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FILEINPUTSTREAM_H
|
||||
#define VGUI_FILEINPUTSTREAM_H
|
||||
|
||||
//TODO : figure out how to get stdio out of here, I think std namespace is broken for FILE for forward declaring does not work in vc6
|
||||
|
||||
#include<stdio.h>
|
||||
#include<VGUI_InputStream.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI FileInputStream : public InputStream
|
||||
{
|
||||
private:
|
||||
FILE* _fp;
|
||||
public:
|
||||
FileInputStream(const char* fileName,bool textMode);
|
||||
public:
|
||||
virtual void seekStart(bool& success);
|
||||
virtual void seekRelative(int count,bool& success);
|
||||
virtual void seekEnd(bool& success);
|
||||
virtual int getAvailable(bool& success);
|
||||
virtual uchar readUChar(bool& success);
|
||||
virtual void readUChar(uchar* buf,int count,bool& success);
|
||||
virtual void close(bool& success);
|
||||
virtual void close();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FLOWLAYOUT_H
|
||||
#define VGUI_FLOWLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI FlowLayout : public Layout
|
||||
{
|
||||
private:
|
||||
int _hgap;
|
||||
public:
|
||||
FlowLayout(int hgap);
|
||||
public:
|
||||
virtual void performLayout(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FOCUSCHANGESIGNAL_H
|
||||
#define VGUI_FOCUSCHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI FocusChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void focusChanged(bool lost,Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,35 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FOCUSNAVGROUP_H
|
||||
#define VGUI_FOCUSNAVGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI FocusNavGroup
|
||||
{
|
||||
public:
|
||||
FocusNavGroup();
|
||||
protected:
|
||||
virtual void addPanel(Panel* panel);
|
||||
virtual void requestFocusPrev();
|
||||
virtual void requestFocusNext();
|
||||
virtual void setCurrentPanel(Panel* panel);
|
||||
protected:
|
||||
Dar<Panel*> _panelDar;
|
||||
int _currentIndex;
|
||||
friend class Panel;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,48 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FONT_H
|
||||
#define VGUI_FONT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class BaseFontPlat;
|
||||
|
||||
//TODO: cursors and fonts should work like gl binds
|
||||
class VGUIAPI Font
|
||||
{
|
||||
public:
|
||||
Font(const char* name,int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
// If pFileData is non-NULL, then it will try to load the 32-bit (RLE) TGA file. If that fails,
|
||||
// it will create the font using the specified parameters.
|
||||
// pUniqueName should be set if pFileData and fileDataLen are set so it can determine if a font is already loaded.
|
||||
Font(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
private:
|
||||
virtual void init(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
public:
|
||||
BaseFontPlat* getPlat();
|
||||
virtual void getCharRGBA(int ch,int rgbaX,int rgbaY,int rgbaWide,int rgbaTall,uchar* rgba);
|
||||
virtual void getCharABCwide(int ch,int& a,int& b,int& c);
|
||||
virtual void getTextSize(const char* text,int& wide,int& tall);
|
||||
virtual int getTall();
|
||||
virtual int getId();
|
||||
protected:
|
||||
char* _name;
|
||||
BaseFontPlat* _plat;
|
||||
int _id;
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
|
||||
void Font_Reset();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,73 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FRAME_H
|
||||
#define VGUI_FRAME_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
class FrameSignal;
|
||||
|
||||
class VGUIAPI Frame : public Panel
|
||||
{
|
||||
public:
|
||||
Frame(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void setInternal(bool state);
|
||||
virtual void paintBackground();
|
||||
virtual bool isInternal();
|
||||
virtual Panel* getClient();
|
||||
virtual void setTitle(const char* title);
|
||||
virtual void getTitle(char* buf,int bufLen);
|
||||
virtual void setMoveable(bool state);
|
||||
virtual void setSizeable(bool state);
|
||||
virtual bool isMoveable();
|
||||
virtual bool isSizeable();
|
||||
virtual void addFrameSignal(FrameSignal* s);
|
||||
virtual void setVisible(bool state);
|
||||
virtual void setMenuButtonVisible(bool state);
|
||||
virtual void setTrayButtonVisible(bool state);
|
||||
virtual void setMinimizeButtonVisible(bool state);
|
||||
virtual void setMaximizeButtonVisible(bool state);
|
||||
virtual void setCloseButtonVisible(bool state);
|
||||
public: //bullshit public
|
||||
virtual void fireClosingSignal();
|
||||
virtual void fireMinimizingSignal();
|
||||
protected:
|
||||
char* _title;
|
||||
bool _internal;
|
||||
bool _sizeable;
|
||||
bool _moveable;
|
||||
Panel* _topGrip;
|
||||
Panel* _bottomGrip;
|
||||
Panel* _leftGrip;
|
||||
Panel* _rightGrip;
|
||||
Panel* _topLeftGrip;
|
||||
Panel* _topRightGrip;
|
||||
Panel* _bottomLeftGrip;
|
||||
Panel* _bottomRightGrip;
|
||||
Panel* _captionGrip;
|
||||
Panel* _client;
|
||||
Button* _trayButton;
|
||||
Button* _minimizeButton;
|
||||
Button* _maximizeButton;
|
||||
Button* _closeButton;
|
||||
Button* _menuButton;
|
||||
Dar<FrameSignal*> _frameSignalDar;
|
||||
Frame* _resizeable;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FRAMESIGNAL_H
|
||||
#define VGUI_FRAMESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Frame;
|
||||
|
||||
class VGUIAPI FrameSignal
|
||||
{
|
||||
public:
|
||||
virtual void closing(Frame* frame)=0;
|
||||
virtual void minimizing(Frame* frame,bool toTray)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_GRIDLAYOUT_H
|
||||
#define VGUI_GRIDLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
/*
|
||||
class VGUIAPI GridLayout : public Layout
|
||||
{
|
||||
public:
|
||||
GridLayout(int rows,int cols,int hgap,int vgap);
|
||||
protected:
|
||||
int _rows;
|
||||
int _cols;
|
||||
};
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,65 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_HEADERPANEL_H
|
||||
#define VGUI_HEADERPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Cursor.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
class ChangeSignal;
|
||||
|
||||
class VGUIAPI HeaderPanel : public Panel
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
Dar<Panel*> _sliderPanelDar;
|
||||
Dar<Panel*> _sectionPanelDar;
|
||||
Dar<ChangeSignal*> _changeSignalDar;
|
||||
Panel* _sectionLayer;
|
||||
int _sliderWide;
|
||||
bool _dragging;
|
||||
int _dragSliderIndex;
|
||||
int _dragSliderStartPos;
|
||||
int _dragSliderStartX;
|
||||
|
||||
public:
|
||||
|
||||
HeaderPanel(int x,int y,int wide,int tall);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void performLayout();
|
||||
|
||||
public:
|
||||
|
||||
virtual void addSectionPanel(Panel* panel);
|
||||
virtual void setSliderPos(int sliderIndex,int pos);
|
||||
virtual int getSectionCount();
|
||||
virtual void getSectionExtents(int sectionIndex,int& x0,int& x1);
|
||||
virtual void addChangeSignal(ChangeSignal* s);
|
||||
|
||||
public: //bullshit public
|
||||
|
||||
virtual void fireChangeSignal();
|
||||
virtual void privateCursorMoved(int x,int y,Panel* panel);
|
||||
virtual void privateMousePressed(MouseCode code,Panel* panel);
|
||||
virtual void privateMouseReleased(MouseCode code,Panel* panel);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_IMAGE_H
|
||||
#define VGUI_IMAGE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
#include<VGUI_Color.h>
|
||||
|
||||
//TODO:: needs concept of insets
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Image
|
||||
{
|
||||
friend class Panel;
|
||||
private:
|
||||
int _pos[2];
|
||||
int _size[2];
|
||||
Panel* _panel;
|
||||
Color _color;
|
||||
public:
|
||||
Image();
|
||||
public:
|
||||
virtual void setPos(int x,int y);
|
||||
virtual void getPos(int& x,int& y);
|
||||
virtual void getSize(int& wide,int& tall);
|
||||
virtual void setColor(Color color);
|
||||
virtual void getColor(Color& color);
|
||||
protected:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void drawSetColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetColor(int r,int g,int b,int a);
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextFont(Scheme::SchemeFont sf);
|
||||
virtual void drawSetTextFont(Font* font);
|
||||
virtual void drawSetTextColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(const char* str,int strlen);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(char ch);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void drawSetTexture(int id);
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void paint(Panel* panel);
|
||||
public:
|
||||
virtual void doPaint(Panel* panel);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,38 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_IMAGEPANEL_H
|
||||
#define VGUI_IMAGEPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Image;
|
||||
|
||||
class VGUIAPI ImagePanel : public Panel
|
||||
{
|
||||
public:
|
||||
inline ImagePanel()
|
||||
{
|
||||
_image=null;
|
||||
}
|
||||
|
||||
ImagePanel(Image* image);
|
||||
public:
|
||||
virtual void setImage(Image* image);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INPUTSIGNAL_H
|
||||
#define VGUI_INPUTSIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
enum KeyCode;
|
||||
class Panel;
|
||||
|
||||
//these are lumped into one for simplicity sake right now
|
||||
class VGUIAPI InputSignal
|
||||
{
|
||||
public:
|
||||
virtual void cursorMoved(int x,int y,Panel* panel)=0;
|
||||
virtual void cursorEntered(Panel* panel)=0;
|
||||
virtual void cursorExited(Panel* panel)=0;
|
||||
virtual void mousePressed(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseDoublePressed(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseReleased(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseWheeled(int delta,Panel* panel)=0;
|
||||
virtual void keyPressed(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyTyped(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyReleased(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyFocusTicked(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FILE_H
|
||||
#define VGUI_FILE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI InputStream
|
||||
{
|
||||
public:
|
||||
virtual void seekStart(bool& success)=0;
|
||||
virtual void seekRelative(int count,bool& success)=0;
|
||||
virtual void seekEnd(bool& success)=0;
|
||||
virtual int getAvailable(bool& success)=0;
|
||||
virtual uchar readUChar(bool& success)=0;
|
||||
virtual void readUChar(uchar* buf,int count,bool& success)=0;
|
||||
virtual void close(bool& success)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INTCHANGESIGNAL_H
|
||||
#define VGUI_INTCHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI IntChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void intChanged(int value,Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,35 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INTLABEL_H
|
||||
#define VGUI_INTLABEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
#include<VGUI_IntChangeSignal.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI IntLabel : public Label , public IntChangeSignal
|
||||
{
|
||||
public:
|
||||
IntLabel(int value,int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setValue(int value);
|
||||
virtual void intChanged(int value,Panel* panel);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
int _value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,126 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_KEYCODE_H
|
||||
#define VGUI_KEYCODE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
enum VGUIAPI KeyCode
|
||||
{
|
||||
KEY_0=0,
|
||||
KEY_1,
|
||||
KEY_2,
|
||||
KEY_3,
|
||||
KEY_4,
|
||||
KEY_5,
|
||||
KEY_6,
|
||||
KEY_7,
|
||||
KEY_8,
|
||||
KEY_9,
|
||||
KEY_A,
|
||||
KEY_B,
|
||||
KEY_C,
|
||||
KEY_D,
|
||||
KEY_E,
|
||||
KEY_F,
|
||||
KEY_G,
|
||||
KEY_H,
|
||||
KEY_I,
|
||||
KEY_J,
|
||||
KEY_K,
|
||||
KEY_L,
|
||||
KEY_M,
|
||||
KEY_N,
|
||||
KEY_O,
|
||||
KEY_P,
|
||||
KEY_Q,
|
||||
KEY_R,
|
||||
KEY_S,
|
||||
KEY_T,
|
||||
KEY_U,
|
||||
KEY_V,
|
||||
KEY_W,
|
||||
KEY_X,
|
||||
KEY_Y,
|
||||
KEY_Z,
|
||||
KEY_PAD_0,
|
||||
KEY_PAD_1,
|
||||
KEY_PAD_2,
|
||||
KEY_PAD_3,
|
||||
KEY_PAD_4,
|
||||
KEY_PAD_5,
|
||||
KEY_PAD_6,
|
||||
KEY_PAD_7,
|
||||
KEY_PAD_8,
|
||||
KEY_PAD_9,
|
||||
KEY_PAD_DIVIDE,
|
||||
KEY_PAD_MULTIPLY,
|
||||
KEY_PAD_MINUS,
|
||||
KEY_PAD_PLUS,
|
||||
KEY_PAD_ENTER,
|
||||
KEY_PAD_DECIMAL,
|
||||
KEY_LBRACKET,
|
||||
KEY_RBRACKET,
|
||||
KEY_SEMICOLON,
|
||||
KEY_APOSTROPHE,
|
||||
KEY_BACKQUOTE,
|
||||
KEY_COMMA,
|
||||
KEY_PERIOD,
|
||||
KEY_SLASH,
|
||||
KEY_BACKSLASH,
|
||||
KEY_MINUS,
|
||||
KEY_EQUAL,
|
||||
KEY_ENTER,
|
||||
KEY_SPACE,
|
||||
KEY_BACKSPACE,
|
||||
KEY_TAB,
|
||||
KEY_CAPSLOCK,
|
||||
KEY_NUMLOCK,
|
||||
KEY_ESCAPE,
|
||||
KEY_SCROLLLOCK,
|
||||
KEY_INSERT,
|
||||
KEY_DELETE,
|
||||
KEY_HOME,
|
||||
KEY_END,
|
||||
KEY_PAGEUP,
|
||||
KEY_PAGEDOWN,
|
||||
KEY_BREAK,
|
||||
KEY_LSHIFT,
|
||||
KEY_RSHIFT,
|
||||
KEY_LALT,
|
||||
KEY_RALT,
|
||||
KEY_LCONTROL,
|
||||
KEY_RCONTROL,
|
||||
KEY_LWIN,
|
||||
KEY_RWIN,
|
||||
KEY_APP,
|
||||
KEY_UP,
|
||||
KEY_LEFT,
|
||||
KEY_DOWN,
|
||||
KEY_RIGHT,
|
||||
KEY_F1,
|
||||
KEY_F2,
|
||||
KEY_F3,
|
||||
KEY_F4,
|
||||
KEY_F5,
|
||||
KEY_F6,
|
||||
KEY_F7,
|
||||
KEY_F8,
|
||||
KEY_F9,
|
||||
KEY_F10,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_LAST,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LABEL_H
|
||||
#define VGUI_LABEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
|
||||
//TODO: this should use a TextImage for the text
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class TextImage;
|
||||
|
||||
class VGUIAPI Label : public Panel
|
||||
{
|
||||
public:
|
||||
enum Alignment
|
||||
{
|
||||
a_northwest=0,
|
||||
a_north,
|
||||
a_northeast,
|
||||
a_west,
|
||||
a_center,
|
||||
a_east,
|
||||
a_southwest,
|
||||
a_south,
|
||||
a_southeast,
|
||||
};
|
||||
public:
|
||||
Label(int textBufferLen,const char* text,int x,int y,int wide,int tall);
|
||||
Label(const char* text,int x,int y,int wide,int tall);
|
||||
Label(const char* text,int x,int y);
|
||||
Label(const char* text);
|
||||
|
||||
inline Label() : Panel(0,0,10,10)
|
||||
{
|
||||
init(1,"",true);
|
||||
}
|
||||
private:
|
||||
void init(int textBufferLen,const char* text,bool textFitted);
|
||||
public:
|
||||
virtual void setImage(Image* image);
|
||||
virtual void setText(int textBufferLen,const char* text);
|
||||
virtual void setText(const char* format,...);
|
||||
virtual void setFont(Scheme::SchemeFont schemeFont);
|
||||
virtual void setFont(Font* font);
|
||||
virtual void getTextSize(int& wide,int& tall);
|
||||
virtual void getContentSize(int& wide,int& tall);
|
||||
virtual void setTextAlignment(Alignment alignment);
|
||||
virtual void setContentAlignment(Alignment alignment);
|
||||
virtual Panel* createPropertyPanel();
|
||||
virtual void setFgColor(int r,int g,int b,int a);
|
||||
virtual void setFgColor(vgui::Scheme::SchemeColor sc);
|
||||
virtual void setContentFitted(bool state);
|
||||
protected:
|
||||
virtual void computeAlignment(int& tx0,int& ty0,int& tx1,int& ty1,int& ix0,int& iy0,int& ix1,int& iy1,int& minX,int& minY,int& maxX,int& maxY);
|
||||
virtual void paint();
|
||||
virtual void recomputeMinimumSize();
|
||||
protected:
|
||||
bool _textEnabled;
|
||||
bool _imageEnabled;
|
||||
bool _contentFitted;
|
||||
Alignment _textAlignment;
|
||||
Alignment _contentAlignment;
|
||||
TextImage* _textImage;
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LAYOUT_H
|
||||
#define VGUI_LAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Layout
|
||||
{
|
||||
//private:
|
||||
// Panel* _panel;
|
||||
public:
|
||||
Layout();
|
||||
public:
|
||||
//virtual void setPanel(Panel* panel); //called by Panel::setLayout
|
||||
virtual void performLayout(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,21 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LAYOUTINFO_H
|
||||
#define VGUI_LAYOUTINFO_H
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI LayoutInfo
|
||||
{
|
||||
virtual LayoutInfo* getThis()=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LINEBORDER_H
|
||||
#define VGUI_LINEBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
#include<VGUI_Color.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI LineBorder : public Border
|
||||
{
|
||||
private:
|
||||
Color _color;
|
||||
public:
|
||||
LineBorder();
|
||||
LineBorder(int thickness);
|
||||
LineBorder(Color color);
|
||||
LineBorder(int thickness,Color color);
|
||||
|
||||
inline void setLineColor(int r, int g, int b, int a) {_color = Color(r,g,b,a);}
|
||||
private:
|
||||
virtual void init(int thickness,Color color);
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,40 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LISTPANEL_H
|
||||
#define VGUI_LISTPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class ScrollBar;
|
||||
|
||||
//TODO: make a ScrollPanel and use a constrained one for _vpanel in ListPanel
|
||||
class VGUIAPI ListPanel : public Panel
|
||||
{
|
||||
public:
|
||||
ListPanel(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void addString(const char* str);
|
||||
virtual void addItem(Panel* panel);
|
||||
virtual void setPixelScroll(int value);
|
||||
virtual void translatePixelScroll(int delta);
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Panel* _vpanel;
|
||||
ScrollBar* _scroll;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LOWEREDBORDER_H
|
||||
#define VGUI_LOWEREDBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI LoweredBorder : public Border
|
||||
{
|
||||
public:
|
||||
LoweredBorder();
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENU_H
|
||||
#define VGUI_MENU_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Menu : public Panel
|
||||
{
|
||||
public:
|
||||
Menu(int x,int y,int wide,int tall);
|
||||
Menu(int wide,int tall);
|
||||
public:
|
||||
virtual void addMenuItem(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENUITEM_H
|
||||
#define VGUI_MENUITEM_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Button.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Menu;
|
||||
|
||||
class VGUIAPI MenuItem : public Button
|
||||
{
|
||||
public:
|
||||
MenuItem(const char* text);
|
||||
MenuItem(const char* text,Menu* subMenu);
|
||||
protected:
|
||||
Menu* _subMenu;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENUSEPARATOR_H
|
||||
#define VGUI_MENUSEPARATOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI MenuSeparator : public Label
|
||||
{
|
||||
public:
|
||||
MenuSeparator(const char* text);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,53 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MESSAGEBOX_H
|
||||
#define VGUI_MESSAGEBOX_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Frame.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Label;
|
||||
class Button;
|
||||
class ActionSignal;
|
||||
|
||||
class VGUIAPI MessageBox : public Frame
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
Label* _messageLabel;
|
||||
Button* _okButton;
|
||||
Dar<ActionSignal*> _actionSignalDar;
|
||||
|
||||
public:
|
||||
|
||||
MessageBox(const char* title,const char* text,int x,int y);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void performLayout();
|
||||
|
||||
public:
|
||||
|
||||
virtual void addActionSignal(ActionSignal* s);
|
||||
virtual void fireActionSignal();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MINIAPP_H
|
||||
#define VGUI_MINIAPP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Frame;
|
||||
|
||||
class VGUIAPI MiniApp
|
||||
{
|
||||
public:
|
||||
MiniApp();
|
||||
public:
|
||||
virtual void getName(char* buf,int bufLen);
|
||||
virtual Frame* createInstance()=0;
|
||||
protected:
|
||||
virtual void setName(const char* name);
|
||||
protected:
|
||||
char* _name;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MOUSECODE_H
|
||||
#define VGUI_MOUSECODE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
enum VGUIAPI MouseCode
|
||||
{
|
||||
MOUSE_LEFT=0,
|
||||
MOUSE_RIGHT,
|
||||
MOUSE_MIDDLE,
|
||||
MOUSE_LAST,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,224 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_PANEL_H
|
||||
#define VGUI_PANEL_H
|
||||
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
Maybe have the border know who they are added to.
|
||||
A border can only be added to 1 thing, and will be
|
||||
removed from the other. That way they can actually
|
||||
be memory managed. Also do Layout's this way too.
|
||||
|
||||
TODO:
|
||||
outlinedRect should have a thickness arg
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
#include<VGUI_Color.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
enum MouseCode;
|
||||
class SurfaceBase;
|
||||
class FocusChangeSignal;
|
||||
class InputSignal;
|
||||
class Cursor;
|
||||
class Layout;
|
||||
class FocusNavGroup;
|
||||
class Border;
|
||||
class Font;
|
||||
class BuildGroup;
|
||||
class App;
|
||||
class LayoutInfo;
|
||||
|
||||
class VGUIAPI Panel
|
||||
{
|
||||
public:
|
||||
Panel();
|
||||
Panel(int x,int y,int wide,int tall);
|
||||
private:
|
||||
void init(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setPos(int x,int y);
|
||||
virtual void getPos(int& x,int& y);
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void getSize(int& wide,int& tall);
|
||||
virtual void setBounds(int x,int y,int wide,int tall);
|
||||
virtual void getBounds(int& x,int& y,int& wide,int& tall);
|
||||
virtual int getWide();
|
||||
virtual int getTall();
|
||||
virtual Panel* getParent();
|
||||
virtual void setVisible(bool state);
|
||||
virtual bool isVisible();
|
||||
virtual bool isVisibleUp();
|
||||
virtual void repaint();
|
||||
virtual void repaintAll();
|
||||
virtual void getAbsExtents(int& x0,int& y0,int& x1,int& y1);
|
||||
virtual void getClipRect(int& x0,int& y0,int& x1,int& y1);
|
||||
virtual void setParent(Panel* newParent);
|
||||
virtual void addChild(Panel* child);
|
||||
virtual void insertChildAt(Panel* child,int index);
|
||||
virtual void removeChild(Panel* child);
|
||||
virtual bool wasMousePressed(MouseCode code);
|
||||
virtual bool wasMouseDoublePressed(MouseCode code);
|
||||
virtual bool isMouseDown(MouseCode code);
|
||||
virtual bool wasMouseReleased(MouseCode code);
|
||||
virtual bool wasKeyPressed(KeyCode code);
|
||||
virtual bool isKeyDown(KeyCode code);
|
||||
virtual bool wasKeyTyped(KeyCode code);
|
||||
virtual bool wasKeyReleased(KeyCode code);
|
||||
virtual void addInputSignal(InputSignal* s);
|
||||
virtual void removeInputSignal(InputSignal* s);
|
||||
virtual void addRepaintSignal(RepaintSignal* s);
|
||||
virtual void removeRepaintSignal(RepaintSignal* s);
|
||||
virtual bool isWithin(int x,int y); //in screen space
|
||||
virtual Panel* isWithinTraverse(int x,int y);
|
||||
virtual void localToScreen(int& x,int& y);
|
||||
virtual void screenToLocal(int& x,int& y);
|
||||
virtual void setCursor(Cursor* cursor);
|
||||
virtual void setCursor(Scheme::SchemeCursor scu);
|
||||
virtual Cursor* getCursor();
|
||||
virtual void setMinimumSize(int wide,int tall);
|
||||
virtual void getMinimumSize(int& wide,int& tall);
|
||||
virtual void requestFocus();
|
||||
virtual bool hasFocus();
|
||||
virtual int getChildCount();
|
||||
virtual Panel* getChild(int index);
|
||||
virtual void setLayout(Layout* layout);
|
||||
virtual void invalidateLayout(bool layoutNow);
|
||||
virtual void setFocusNavGroup(FocusNavGroup* focusNavGroup);
|
||||
virtual void requestFocusPrev();
|
||||
virtual void requestFocusNext();
|
||||
virtual void addFocusChangeSignal(FocusChangeSignal* s);
|
||||
virtual bool isAutoFocusNavEnabled();
|
||||
virtual void setAutoFocusNavEnabled(bool state);
|
||||
virtual void setBorder(Border* border);
|
||||
virtual void setPaintBorderEnabled(bool state);
|
||||
virtual void setPaintBackgroundEnabled(bool state);
|
||||
virtual void setPaintEnabled(bool state);
|
||||
virtual void getInset(int& left,int& top,int& right,int& bottom);
|
||||
virtual void getPaintSize(int& wide,int& tall);
|
||||
virtual void setPreferredSize(int wide,int tall);
|
||||
virtual void getPreferredSize(int& wide,int& tall);
|
||||
virtual SurfaceBase* getSurfaceBase();
|
||||
virtual bool isEnabled();
|
||||
virtual void setEnabled(bool state);
|
||||
virtual void setBuildGroup(BuildGroup* buildGroup,const char* panelPersistanceName);
|
||||
virtual bool isBuildGroupEnabled();
|
||||
virtual void removeAllChildren();
|
||||
virtual void repaintParent();
|
||||
virtual Panel* createPropertyPanel();
|
||||
virtual void getPersistanceText(char* buf,int bufLen);
|
||||
virtual void applyPersistanceText(const char* buf);
|
||||
virtual void setFgColor(Scheme::SchemeColor sc);
|
||||
virtual void setBgColor(Scheme::SchemeColor sc);
|
||||
virtual void setFgColor(int r,int g,int b,int a);
|
||||
virtual void setBgColor(int r,int g,int b,int a);
|
||||
virtual void getFgColor(int& r,int& g,int& b,int& a);
|
||||
virtual void getBgColor(int& r,int& g,int& b,int& a);
|
||||
virtual void setBgColor(Color color);
|
||||
virtual void setFgColor(Color color);
|
||||
virtual void getBgColor(Color& color);
|
||||
virtual void getFgColor(Color& color);
|
||||
virtual void setAsMouseCapture(bool state);
|
||||
virtual void setAsMouseArena(bool state);
|
||||
virtual App* getApp();
|
||||
virtual void getVirtualSize(int& wide,int& tall);
|
||||
virtual void setLayoutInfo(LayoutInfo* layoutInfo);
|
||||
virtual LayoutInfo* getLayoutInfo();
|
||||
virtual bool isCursorNone();
|
||||
public: //bullshit public
|
||||
virtual void solveTraverse();
|
||||
virtual void paintTraverse();
|
||||
virtual void setSurfaceBaseTraverse(SurfaceBase* surfaceBase);
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
virtual void internalPerformLayout();
|
||||
virtual void drawSetColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetColor(int r,int g,int b,int a);
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextFont(Scheme::SchemeFont sf);
|
||||
virtual void drawSetTextFont(Font* font);
|
||||
virtual void drawSetTextColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(const char* str,int strlen);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(char ch);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void drawSetTexture(int id);
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void solve();
|
||||
virtual void paintTraverse(bool repaint);
|
||||
virtual void paintBackground();
|
||||
virtual void paint();
|
||||
virtual void paintBuildOverlay();
|
||||
virtual void internalCursorMoved(int x,int y);
|
||||
virtual void internalCursorEntered();
|
||||
virtual void internalCursorExited();
|
||||
virtual void internalMousePressed(MouseCode code);
|
||||
virtual void internalMouseDoublePressed(MouseCode code);
|
||||
virtual void internalMouseReleased(MouseCode code);
|
||||
virtual void internalMouseWheeled(int delta);
|
||||
virtual void internalKeyPressed(KeyCode code);
|
||||
virtual void internalKeyTyped(KeyCode code);
|
||||
virtual void internalKeyReleased(KeyCode code);
|
||||
virtual void internalKeyFocusTicked();
|
||||
virtual void internalFocusChanged(bool lost);
|
||||
virtual void internalSetCursor();
|
||||
protected:
|
||||
int _pos[2];
|
||||
int _size[2];
|
||||
int _loc[2];
|
||||
int _minimumSize[2];
|
||||
int _preferredSize[2];
|
||||
Dar<Panel*> _childDar;
|
||||
Panel* _parent;
|
||||
SurfaceBase* _surfaceBase;
|
||||
Dar<InputSignal*> _inputSignalDar;
|
||||
Dar<RepaintSignal*> _repaintSignalDar;
|
||||
int _clipRect[4];
|
||||
Cursor* _cursor;
|
||||
Scheme::SchemeCursor _schemeCursor;
|
||||
bool _visible;
|
||||
Layout* _layout;
|
||||
bool _needsLayout;
|
||||
FocusNavGroup* _focusNavGroup;
|
||||
Dar<FocusChangeSignal*> _focusChangeSignalDar;
|
||||
bool _autoFocusNavEnabled;
|
||||
Border* _border;
|
||||
private:
|
||||
bool _needsRepaint;
|
||||
bool _enabled;
|
||||
BuildGroup* _buildGroup;
|
||||
Color _fgColor;
|
||||
Color _bgColor;
|
||||
LayoutInfo* _layoutInfo;
|
||||
bool _paintBorderEnabled;
|
||||
bool _paintBackgroundEnabled;
|
||||
bool _paintEnabled;
|
||||
friend class Panel;
|
||||
friend class App;
|
||||
friend class SurfaceBase;
|
||||
friend class Image;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_POPUPMENU_H
|
||||
#define VGUI_POPUPMENU_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Menu.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI PopupMenu : public Menu
|
||||
{
|
||||
public:
|
||||
PopupMenu(int x,int y,int wide,int tall);
|
||||
PopupMenu(int wide,int tall);
|
||||
public:
|
||||
virtual void showModal(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_PROGRESSBAR_H
|
||||
#define VGUI_PROGRESSBAR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI ProgressBar : public Panel
|
||||
{
|
||||
private:
|
||||
int _segmentCount;
|
||||
float _progress;
|
||||
public:
|
||||
ProgressBar(int segmentCount);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
public:
|
||||
virtual void setProgress(float progress);
|
||||
virtual int getSegmentCount();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_RADIOBUTTON_H
|
||||
#define VGUI_RADIOBUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_ToggleButton.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI RadioButton : public ToggleButton
|
||||
{
|
||||
public:
|
||||
RadioButton(const char* text,int x,int y,int wide,int tall);
|
||||
RadioButton(const char* text,int x,int y);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_RAISEDBORDER_H
|
||||
#define VGUI_RAISEDBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI RaisedBorder : public Border
|
||||
{
|
||||
public:
|
||||
RaisedBorder();
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,25 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_REPAINTSIGNAL_H
|
||||
#define VGUI_REPAINTSIGNAL_H
|
||||
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class RepaintSignal
|
||||
{
|
||||
public:
|
||||
virtual void panelRepainted(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -1,82 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SCHEME_H
|
||||
#define VGUI_SCHEME_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Font;
|
||||
class Cursor;
|
||||
|
||||
class VGUIAPI Scheme
|
||||
{
|
||||
public:
|
||||
enum SchemeColor
|
||||
{
|
||||
sc_user=0,
|
||||
sc_black,
|
||||
sc_white,
|
||||
sc_primary1,
|
||||
sc_primary2,
|
||||
sc_primary3,
|
||||
sc_secondary1,
|
||||
sc_secondary2,
|
||||
sc_secondary3,
|
||||
sc_last,
|
||||
};
|
||||
enum SchemeFont
|
||||
{
|
||||
sf_user=0,
|
||||
sf_primary1,
|
||||
sf_primary2,
|
||||
sf_primary3,
|
||||
sf_secondary1,
|
||||
sf_last,
|
||||
};
|
||||
enum SchemeCursor
|
||||
{
|
||||
scu_user=0,
|
||||
scu_none,
|
||||
scu_arrow,
|
||||
scu_ibeam,
|
||||
scu_hourglass,
|
||||
scu_crosshair,
|
||||
scu_up,
|
||||
scu_sizenwse,
|
||||
scu_sizenesw,
|
||||
scu_sizewe,
|
||||
scu_sizens,
|
||||
scu_sizeall,
|
||||
scu_no,
|
||||
scu_hand,
|
||||
scu_last,
|
||||
};
|
||||
public:
|
||||
Scheme();
|
||||
public:
|
||||
virtual void setColor(SchemeColor sc,int r,int g,int b,int a);
|
||||
virtual void getColor(SchemeColor sc,int& r,int& g,int& b,int& a);
|
||||
virtual void setFont(SchemeFont sf,Font* font);
|
||||
virtual Font* getFont(SchemeFont sf);
|
||||
virtual void setCursor(SchemeCursor sc,Cursor* cursor);
|
||||
virtual Cursor* getCursor(SchemeCursor sc);
|
||||
protected:
|
||||
int _color[sc_last][4];
|
||||
Font* _font[sf_last];
|
||||
Cursor* _cursor[scu_last];
|
||||
friend class Panel;
|
||||
friend class Canvas;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,56 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SCROLLBAR_H
|
||||
#define VGUI_SCROLLBAR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class IntChangeSignal;
|
||||
class Button;
|
||||
class Slider;
|
||||
|
||||
class VGUIAPI ScrollBar : public Panel
|
||||
{
|
||||
public:
|
||||
ScrollBar(int x,int y,int wide,int tall,bool vertical);
|
||||
public:
|
||||
virtual void setValue(int value);
|
||||
virtual int getValue();
|
||||
virtual void addIntChangeSignal(IntChangeSignal* s);
|
||||
virtual void setRange(int min,int max);
|
||||
virtual void setRangeWindow(int rangeWindow);
|
||||
virtual void setRangeWindowEnabled(bool state);
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual bool isVertical();
|
||||
virtual bool hasFullRange();
|
||||
virtual void setButton(Button* button,int index);
|
||||
virtual Button* getButton(int index);
|
||||
virtual void setSlider(Slider* slider);
|
||||
virtual Slider* getSlider();
|
||||
virtual void doButtonPressed(int buttonIndex);
|
||||
virtual void setButtonPressedScrollValue(int value);
|
||||
virtual void validate();
|
||||
public: //bullshit public
|
||||
virtual void fireIntChangeSignal();
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
protected:
|
||||
Button* _button[2];
|
||||
Slider* _slider;
|
||||
Dar<IntChangeSignal*> _intChangeSignalDar;
|
||||
int _buttonPressedScrollValue;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,55 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SCROLLPANEL_H
|
||||
#define VGUI_SCROLLPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
//NOTE: You need to call validate anytime you change a scrollbar
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class ScrollBar;
|
||||
|
||||
class VGUIAPI ScrollPanel : public Panel
|
||||
{
|
||||
private:
|
||||
Panel* _clientClip;
|
||||
Panel* _client;
|
||||
ScrollBar* _horizontalScrollBar;
|
||||
ScrollBar* _verticalScrollBar;
|
||||
bool _autoVisible[2];
|
||||
public:
|
||||
ScrollPanel(int x,int y,int wide,int tall);
|
||||
protected:
|
||||
virtual void setSize(int wide,int tall);
|
||||
public:
|
||||
virtual void setScrollBarVisible(bool horizontal,bool vertical);
|
||||
virtual void setScrollBarAutoVisible(bool horizontal,bool vertical);
|
||||
virtual Panel* getClient();
|
||||
virtual Panel* getClientClip();
|
||||
virtual void setScrollValue(int horizontal,int vertical);
|
||||
virtual void getScrollValue(int& horizontal,int& vertical);
|
||||
virtual void recomputeClientSize();
|
||||
virtual ScrollBar* getHorizontalScrollBar();
|
||||
virtual ScrollBar* getVerticalScrollBar();
|
||||
virtual void validate();
|
||||
public: //bullshit public
|
||||
virtual void recomputeScroll();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -1,69 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SLIDER_H
|
||||
#define VGUI_SLIDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
class IntChangeSignal;
|
||||
|
||||
class VGUIAPI Slider : public Panel
|
||||
{
|
||||
private:
|
||||
bool _vertical;
|
||||
bool _dragging;
|
||||
int _nobPos[2];
|
||||
int _nobDragStartPos[2];
|
||||
int _dragStartPos[2];
|
||||
Dar<IntChangeSignal*> _intChangeSignalDar;
|
||||
int _range[2];
|
||||
int _value;
|
||||
int _rangeWindow;
|
||||
bool _rangeWindowEnabled;
|
||||
int _buttonOffset;
|
||||
public:
|
||||
Slider(int x,int y,int wide,int tall,bool vertical);
|
||||
public:
|
||||
virtual void setValue(int value);
|
||||
virtual int getValue();
|
||||
virtual bool isVertical();
|
||||
virtual void addIntChangeSignal(IntChangeSignal* s);
|
||||
virtual void setRange(int min,int max);
|
||||
virtual void getRange(int& min,int& max);
|
||||
virtual void setRangeWindow(int rangeWindow);
|
||||
virtual void setRangeWindowEnabled(bool state);
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void getNobPos(int& min, int& max);
|
||||
virtual bool hasFullRange();
|
||||
virtual void setButtonOffset(int buttonOffset);
|
||||
private:
|
||||
virtual void recomputeNobPosFromValue();
|
||||
virtual void recomputeValueFromNobPos();
|
||||
public: //bullshit public
|
||||
virtual void privateCursorMoved(int x,int y,Panel* panel);
|
||||
virtual void privateMousePressed(MouseCode code,Panel* panel);
|
||||
virtual void privateMouseReleased(MouseCode code,Panel* panel);
|
||||
protected:
|
||||
virtual void fireIntChangeSignal();
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_STACKLAYOUT_H
|
||||
#define VGUI_STACKLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI StackLayout : public Layout
|
||||
{
|
||||
private:
|
||||
int _vgap;
|
||||
bool _fitWide;
|
||||
public:
|
||||
StackLayout(int vgap,bool fitWide);
|
||||
public:
|
||||
virtual void performLayout(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,61 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_STRING_H
|
||||
#define VGUI_STRING_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI String
|
||||
{
|
||||
|
||||
friend class String;
|
||||
|
||||
private:
|
||||
|
||||
char* _text;
|
||||
|
||||
public:
|
||||
|
||||
String();
|
||||
String(const char* text);
|
||||
String(const String& src);
|
||||
|
||||
public:
|
||||
|
||||
~String();
|
||||
|
||||
private:
|
||||
|
||||
int getCount(const char* text);
|
||||
|
||||
public:
|
||||
|
||||
int getCount();
|
||||
String operator+(String text);
|
||||
String operator+(const char* text);
|
||||
bool operator==(String text);
|
||||
bool operator==(const char* text);
|
||||
char operator[](int index);
|
||||
const char* getChars();
|
||||
|
||||
public:
|
||||
|
||||
static void test();
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SURFACE_H
|
||||
#define VGUI_SURFACE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_SurfaceBase.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class Cursor;
|
||||
|
||||
class VGUIAPI Surface : public SurfaceBase
|
||||
{
|
||||
public:
|
||||
Surface(Panel* embeddedPanel);
|
||||
public:
|
||||
virtual void setTitle(const char* title);
|
||||
virtual bool setFullscreenMode(int wide,int tall,int bpp);
|
||||
virtual void setWindowedMode();
|
||||
virtual void setAsTopMost(bool state);
|
||||
virtual int getModeInfoCount();
|
||||
virtual void createPopup(Panel* embeddedPanel);
|
||||
virtual bool hasFocus();
|
||||
virtual bool isWithin(int x,int y);
|
||||
protected:
|
||||
virtual int createNewTextureID(void);
|
||||
virtual void drawSetColor(int r,int g,int b,int a);
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextFont(Font* font);
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(const char* text,int textLen);
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void drawSetTexture(int id);
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void invalidate(Panel *panel);
|
||||
virtual bool createPlat();
|
||||
virtual bool recreateContext();
|
||||
virtual void enableMouseCapture(bool state);
|
||||
virtual void setCursor(Cursor* cursor);
|
||||
virtual void swapBuffers();
|
||||
virtual void pushMakeCurrent(Panel* panel,bool useInsets);
|
||||
virtual void popMakeCurrent(Panel* panel);
|
||||
virtual void applyChanges();
|
||||
protected:
|
||||
class SurfacePlat* _plat;
|
||||
bool _needsSwap;
|
||||
Panel* _embeddedPanel;
|
||||
Dar<char*> _modeInfoDar;
|
||||
friend class App;
|
||||
friend class Panel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SURFACEBASE_H
|
||||
#define VGUI_SURFACEBASE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class Cursor;
|
||||
class Font;
|
||||
class App;
|
||||
class ImagePanel;
|
||||
|
||||
class VGUIAPI SurfaceBase
|
||||
{
|
||||
public:
|
||||
SurfaceBase(Panel* embeddedPanel);
|
||||
protected:
|
||||
~SurfaceBase();
|
||||
public:
|
||||
virtual Panel* getPanel();
|
||||
virtual void requestSwap();
|
||||
virtual void resetModeInfo();
|
||||
virtual int getModeInfoCount();
|
||||
virtual bool getModeInfo(int mode,int& wide,int& tall,int& bpp);
|
||||
virtual App* getApp();
|
||||
virtual void setEmulatedCursorVisible(bool state);
|
||||
virtual void setEmulatedCursorPos(int x,int y);
|
||||
public:
|
||||
virtual void setTitle(const char* title)=0;
|
||||
virtual bool setFullscreenMode(int wide,int tall,int bpp)=0;
|
||||
virtual void setWindowedMode()=0;
|
||||
virtual void setAsTopMost(bool state)=0;
|
||||
virtual void createPopup(Panel* embeddedPanel)=0;
|
||||
virtual bool hasFocus()=0;
|
||||
virtual bool isWithin(int x,int y)=0;
|
||||
virtual int createNewTextureID(void)=0;
|
||||
protected:
|
||||
virtual void addModeInfo(int wide,int tall,int bpp);
|
||||
protected:
|
||||
virtual void drawSetColor(int r,int g,int b,int a)=0;
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1)=0;
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1)=0;
|
||||
virtual void drawSetTextFont(Font* font)=0;
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a)=0;
|
||||
virtual void drawSetTextPos(int x,int y)=0;
|
||||
virtual void drawPrintText(const char* text,int textLen)=0;
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall)=0;
|
||||
virtual void drawSetTexture(int id)=0;
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1)=0;
|
||||
virtual void invalidate(Panel *panel)=0;
|
||||
virtual void enableMouseCapture(bool state)=0;
|
||||
virtual void setCursor(Cursor* cursor)=0;
|
||||
virtual void swapBuffers()=0;
|
||||
virtual void pushMakeCurrent(Panel* panel,bool useInsets)=0;
|
||||
virtual void popMakeCurrent(Panel* panel)=0;
|
||||
virtual void applyChanges()=0;
|
||||
protected:
|
||||
bool _needsSwap;
|
||||
App* _app;
|
||||
Panel* _embeddedPanel;
|
||||
Dar<char*> _modeInfoDar;
|
||||
ImagePanel* _emulatedCursor;
|
||||
Cursor* _currentCursor;
|
||||
friend class App;
|
||||
friend class Panel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_SURFACEGL_H
|
||||
#define VGUI_SURFACEGL_H
|
||||
|
||||
//macros borrowed from GLUT to get rid of win32 dependent junk in gl headers
|
||||
#ifdef _WIN32
|
||||
# ifndef APIENTRY
|
||||
# define VGUI_APIENTRY_DEFINED
|
||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
# endif
|
||||
# endif
|
||||
# ifndef CALLBACK
|
||||
# define VGUI_CALLBACK_DEFINED
|
||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
|
||||
# define CALLBACK __stdcall
|
||||
# else
|
||||
# define CALLBACK
|
||||
# endif
|
||||
# endif
|
||||
# ifndef WINGDIAPI
|
||||
# define VGUI_WINGDIAPI_DEFINED
|
||||
# define WINGDIAPI __declspec(dllimport)
|
||||
# endif
|
||||
# ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
# define _WCHAR_T_DEFINED
|
||||
# endif
|
||||
# pragma comment(lib,"opengl32.lib")
|
||||
#endif
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#ifdef VGUI_APIENTRY_DEFINED
|
||||
# undef VGUI_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef VGUI_CALLBACK_DEFINED
|
||||
# undef VGUI_CALLBACK_DEFINED
|
||||
# undef CALLBACK
|
||||
#endif
|
||||
|
||||
#ifdef VGUI_WINGDIAPI_DEFINED
|
||||
# undef VGUI_WINGDIAPI_DEFINED
|
||||
# undef WINGDIAPI
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Surface.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI SurfaceGL : public Surface
|
||||
{
|
||||
public:
|
||||
SurfaceGL(Panel* embeddedPanel);
|
||||
public:
|
||||
virtual void createPopup(Panel* embeddedPanel);
|
||||
protected:
|
||||
virtual bool recreateContext();
|
||||
virtual void pushMakeCurrent(Panel* panel,bool useInsets);
|
||||
virtual void popMakeCurrent(Panel* panel);
|
||||
virtual void makeCurrent();
|
||||
virtual void swapBuffers();
|
||||
virtual void setColor(int r,int g,int b);
|
||||
virtual void filledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void outlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void setTextFont(Font* font);
|
||||
virtual void setTextColor(int r,int g,int b);
|
||||
virtual void setDrawPos(int x,int y);
|
||||
virtual void printText(const char* str,int strlen);
|
||||
virtual void setTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void setTexture(int id);
|
||||
virtual void texturedRect(int x0,int y0,int x1,int y1);
|
||||
protected:
|
||||
int _drawPos[2];
|
||||
uchar _drawColor[3];
|
||||
uchar _drawTextColor[3];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TABPANEL_H
|
||||
#define VGUI_TABPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class ButtonGroup;
|
||||
|
||||
class VGUIAPI TabPanel : public Panel
|
||||
{
|
||||
public:
|
||||
enum TabPlacement
|
||||
{
|
||||
tp_top=0,
|
||||
tp_bottom,
|
||||
tp_left,
|
||||
tp_right,
|
||||
};
|
||||
public:
|
||||
TabPanel(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual Panel* addTab(const char* text);
|
||||
virtual void setSelectedTab(Panel* tab);
|
||||
virtual void setSize(int wide,int tall);
|
||||
protected:
|
||||
virtual void recomputeLayoutTop();
|
||||
virtual void recomputeLayout();
|
||||
protected:
|
||||
TabPlacement _tabPlacement;
|
||||
Panel* _tabArea;
|
||||
Panel* _clientArea;
|
||||
Panel* _selectedTab;
|
||||
Panel* _selectedPanel;
|
||||
ButtonGroup* _buttonGroup;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,71 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TABLEPANEL_H
|
||||
#define VGUI_TABLEPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class HeaderPanel;
|
||||
|
||||
class VGUIAPI TablePanel : public Panel
|
||||
{
|
||||
friend class FooVGuiTablePanelHandler;
|
||||
private:
|
||||
vgui::Dar<int> _columnDar;
|
||||
bool _gridVisible[2];
|
||||
int _gridWide;
|
||||
int _gridTall;
|
||||
int _selectedCell[2];
|
||||
int _mouseOverCell[2];
|
||||
int _editableCell[2];
|
||||
Panel* _fakeInputPanel;
|
||||
bool _columnSelectionEnabled;
|
||||
bool _rowSelectionEnabled;
|
||||
bool _cellSelectionEnabled;
|
||||
Panel* _editableCellPanel;
|
||||
int _virtualSize[2];
|
||||
bool _cellEditingEnabled;
|
||||
public:
|
||||
TablePanel(int x,int y,int wide,int tall,int columnCount);
|
||||
public:
|
||||
virtual void setCellEditingEnabled(bool state);
|
||||
virtual void setColumnCount(int columnCount);
|
||||
virtual void setGridVisible(bool horizontal,bool vertical);
|
||||
virtual void setGridSize(int gridWide,int gridTall);
|
||||
virtual int getColumnCount();
|
||||
virtual void setColumnExtents(int column,int x0,int x1);
|
||||
virtual void setSelectedCell(int column,int row);
|
||||
virtual void getSelectedCell(int& column,int& row);
|
||||
virtual void setHeaderPanel(HeaderPanel* header);
|
||||
virtual void setColumnSelectionEnabled(bool state);
|
||||
virtual void setRowSelectionEnabled(bool state);
|
||||
virtual void setCellSectionEnabled(bool state);
|
||||
virtual void setEditableCell(int column,int row);
|
||||
virtual void stopCellEditing();
|
||||
virtual void getVirtualSize(int& wide,int& tall);
|
||||
virtual int getRowCount()=0;
|
||||
virtual int getCellTall(int row)=0;
|
||||
virtual Panel* getCellRenderer(int column,int row,bool columnSelected,bool rowSelected,bool cellSelected)=0;
|
||||
virtual Panel* startCellEditing(int column,int row)=0;
|
||||
protected:
|
||||
virtual void paint();
|
||||
virtual Panel* isWithinTraverse(int x,int y);
|
||||
private:
|
||||
virtual void privateMousePressed(MouseCode code,Panel* panel);
|
||||
virtual void privateMouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual void privateKeyTyped(KeyCode code,Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TASKBAR_H
|
||||
#define VGUI_TASKBAR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Frame;
|
||||
class Button;
|
||||
|
||||
class VGUIAPI TaskBar : public Panel
|
||||
{
|
||||
public:
|
||||
TaskBar(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void addFrame(Frame* frame);
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
protected:
|
||||
Dar<Frame*> _frameDar;
|
||||
Dar<Button*> _taskButtonDar;
|
||||
Panel* _tray;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,80 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TEXTENTRY_H
|
||||
#define VGUI_TEXTENTRY_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_InputSignal.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
enum KeyCode;
|
||||
class ActionSignal;
|
||||
|
||||
class VGUIAPI TextEntry : public Panel , public InputSignal
|
||||
{
|
||||
public:
|
||||
TextEntry(const char* text,int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setText(const char* text,int textLen);
|
||||
virtual void getText(int offset,char* buf,int bufLen);
|
||||
virtual void resetCursorBlink();
|
||||
virtual void doGotoLeft();
|
||||
virtual void doGotoRight();
|
||||
virtual void doGotoFirstOfLine();
|
||||
virtual void doGotoEndOfLine();
|
||||
virtual void doInsertChar(char ch);
|
||||
virtual void doBackspace();
|
||||
virtual void doDelete();
|
||||
virtual void doSelectNone();
|
||||
virtual void doCopySelected();
|
||||
virtual void doPaste();
|
||||
virtual void doPasteSelected();
|
||||
virtual void doDeleteSelected();
|
||||
virtual void addActionSignal(ActionSignal* s);
|
||||
virtual void setFont(Font* font);
|
||||
virtual void setTextHidden(bool bHideText);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
virtual void setCharAt(char ch,int index);
|
||||
protected:
|
||||
virtual void fireActionSignal();
|
||||
virtual bool getSelectedRange(int& cx0,int& cx1);
|
||||
virtual bool getSelectedPixelRange(int& cx0,int& cx1);
|
||||
virtual int cursorToPixelSpace(int cursorPos);
|
||||
virtual void selectCheck();
|
||||
protected: //InputSignal
|
||||
virtual void cursorMoved(int x,int y,Panel* panel);
|
||||
virtual void cursorEntered(Panel* panel);
|
||||
virtual void cursorExited(Panel* panel);
|
||||
virtual void mousePressed(MouseCode code,Panel* panel);
|
||||
virtual void mouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual void mouseReleased(MouseCode code,Panel* panel);
|
||||
virtual void mouseWheeled(int delta,Panel* panel);
|
||||
virtual void keyPressed(KeyCode code,Panel* panel);
|
||||
virtual void keyTyped(KeyCode code,Panel* panel);
|
||||
virtual void keyReleased(KeyCode code,Panel* panel);
|
||||
virtual void keyFocusTicked(Panel* panel);
|
||||
protected:
|
||||
Dar<char> _lineDar;
|
||||
int _cursorPos;
|
||||
bool _cursorBlink;
|
||||
bool _hideText;
|
||||
long _cursorNextBlinkTime;
|
||||
int _cursorBlinkRate;
|
||||
int _select[2];
|
||||
Dar<ActionSignal*> _actionSignalDar;
|
||||
Font* _font;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,42 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TEXTGRID_H
|
||||
#define VGUI_TEXTGRID_H
|
||||
|
||||
#include<stdarg.h>
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI TextGrid : public Panel
|
||||
{
|
||||
public:
|
||||
TextGrid(int gridWide,int gridTall,int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setGridSize(int wide,int tall);
|
||||
virtual void newLine();
|
||||
virtual void setXY(int x,int y);
|
||||
//virtual void setBgColor(int r,int g,int b);
|
||||
//virtual void setFgColor(int r,int g,int b);
|
||||
virtual int vprintf(const char* format,va_list argList);
|
||||
virtual int printf(const char* format,...);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
int _xy[2];
|
||||
int _bgColor[3];
|
||||
int _fgColor[3];
|
||||
char* _grid; //[_gridSize[0]*_gridSize[1]*7] ch,br,bg,bb,fr,fg,fb
|
||||
int _gridSize[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,58 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TEXTIMAGE_H
|
||||
#define VGUI_TEXTIMAGE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Image.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
|
||||
|
||||
//TODO: need to add wrapping flag instead of being arbitrary about when wrapping and auto-resizing actually happens
|
||||
// This is probably why you are having problems if you had text in a constructor and then changed the font
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class Font;
|
||||
class App;
|
||||
|
||||
class VGUIAPI TextImage : public Image
|
||||
{
|
||||
private:
|
||||
char* _text;
|
||||
int _textBufferLen;
|
||||
vgui::Scheme::SchemeFont _schemeFont;
|
||||
vgui::Font* _font;
|
||||
int _textColor[4];
|
||||
vgui::Scheme::SchemeColor _textSchemeColor;
|
||||
public:
|
||||
TextImage(int textBufferLen,const char* text);
|
||||
TextImage(const char* text);
|
||||
private:
|
||||
virtual void init(int textBufferLen,const char* text);
|
||||
public:
|
||||
virtual void getTextSize(int& wide,int& tall);
|
||||
virtual void getTextSizeWrapped(int& wide,int& tall);
|
||||
virtual Font* getFont();
|
||||
virtual void setText(int textBufferLen,const char* text);
|
||||
virtual void setText(const char* text);
|
||||
virtual void setFont(vgui::Scheme::SchemeFont schemeFont);
|
||||
virtual void setFont(vgui::Font* font);
|
||||
virtual void setSize(int wide,int tall);
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TEXTPANEL_H
|
||||
#define VGUI_TEXTPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
|
||||
//NOTE : If you are having trouble with this class, your problem is probably in TextImage
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class TextImage;
|
||||
class Font;
|
||||
|
||||
class VGUIAPI TextPanel : public Panel
|
||||
{
|
||||
private:
|
||||
TextImage* _textImage;
|
||||
public:
|
||||
TextPanel(const char* text,int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setText(const char* text);
|
||||
virtual void setFont(vgui::Scheme::SchemeFont schemeFont);
|
||||
virtual void setFont(vgui::Font* font);
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void setFgColor(int r,int g,int b,int a);
|
||||
virtual void setFgColor(Scheme::SchemeColor sc);
|
||||
virtual TextImage* getTextImage();
|
||||
protected:
|
||||
virtual void paint();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TICKSIGNAL_H
|
||||
#define VGUI_TICKSIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
class VGUIAPI TickSignal
|
||||
{
|
||||
public:
|
||||
virtual void ticked()=0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,26 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TOGGLEBUTTON_H
|
||||
#define VGUI_TOGGLEBUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Button.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI ToggleButton : public Button
|
||||
{
|
||||
public:
|
||||
ToggleButton(const char* text,int x,int y,int wide,int tall);
|
||||
ToggleButton(const char* text,int x,int y);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,36 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_TREEFOLDER_H
|
||||
#define VGUI_TREEFOLDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI TreeFolder : public Panel
|
||||
{
|
||||
public:
|
||||
TreeFolder(const char* name);
|
||||
TreeFolder(const char* name,int x,int y);
|
||||
protected:
|
||||
virtual void init(const char* name);
|
||||
public:
|
||||
virtual void setOpenedTraverse(bool state);
|
||||
virtual void setOpened(bool state);
|
||||
virtual bool isOpened();
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
bool _opened;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,146 +0,0 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_WIZARDPANEL_H
|
||||
#define VGUI_WIZARDPANEL_H
|
||||
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class ActionSignal;
|
||||
|
||||
class VGUIAPI WizardPanel : public Panel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
class VGUIAPI WizardPage : public Panel
|
||||
{
|
||||
|
||||
friend class WizardPanel;
|
||||
|
||||
private:
|
||||
|
||||
WizardPage* _backWizardPage;
|
||||
WizardPage* _nextWizardPage;
|
||||
bool _backButtonEnabled;
|
||||
bool _nextButtonEnabled;
|
||||
bool _finishedButtonEnabled;
|
||||
bool _cancelButtonEnabled;
|
||||
bool _backButtonVisible;
|
||||
bool _nextButtonVisible;
|
||||
bool _finishedButtonVisible;
|
||||
bool _cancelButtonVisible;
|
||||
char* _backButtonText;
|
||||
char* _nextButtonText;
|
||||
char* _finishedButtonText;
|
||||
char* _cancelButtonText;
|
||||
Dar<ActionSignal*> _switchingToBackPageSignalDar;
|
||||
Dar<ActionSignal*> _switchingToNextPageSignalDar;
|
||||
char* _title;
|
||||
Panel* _wantedFocus;
|
||||
|
||||
private:
|
||||
|
||||
virtual void fireSwitchingToBackPageSignals();
|
||||
virtual void fireSwitchingToNextPageSignals();
|
||||
virtual void init();
|
||||
|
||||
public:
|
||||
|
||||
WizardPage();
|
||||
WizardPage(int wide,int tall);
|
||||
|
||||
public:
|
||||
|
||||
virtual void setBackWizardPage(WizardPage* backWizardPage);
|
||||
virtual void setNextWizardPage(WizardPage* nextWizardPage);
|
||||
virtual WizardPage* getBackWizardPage();
|
||||
virtual WizardPage* getNextWizardPage();
|
||||
|
||||
virtual bool isBackButtonEnabled();
|
||||
virtual bool isNextButtonEnabled();
|
||||
virtual bool isFinishedButtonEnabled();
|
||||
virtual bool isCancelButtonEnabled();
|
||||
virtual void setBackButtonEnabled(bool state);
|
||||
virtual void setNextButtonEnabled(bool state);
|
||||
virtual void setFinishedButtonEnabled(bool state);
|
||||
virtual void setCancelButtonEnabled(bool state);
|
||||
|
||||
virtual bool isBackButtonVisible();
|
||||
virtual bool isNextButtonVisible();
|
||||
virtual bool isFinishedButtonVisible();
|
||||
virtual bool isCancelButtonVisible();
|
||||
virtual void setBackButtonVisible(bool state);
|
||||
virtual void setNextButtonVisible(bool state);
|
||||
virtual void setFinishedButtonVisible(bool state);
|
||||
virtual void setCancelButtonVisible(bool state);
|
||||
|
||||
virtual void getBackButtonText(char* text,int textLen);
|
||||
virtual void getNextButtonText(char* text,int textLen);
|
||||
virtual void getFinishedButtonText(char* text,int textLen);
|
||||
virtual void getCancelButtonText(char* text,int textLen);
|
||||
virtual void setBackButtonText(const char* text);
|
||||
virtual void setNextButtonText(const char* text);
|
||||
virtual void setFinishedButtonText(const char* text);
|
||||
virtual void setCancelButtonText(const char* text);
|
||||
|
||||
virtual void setWantedFocus(Panel* panel);
|
||||
virtual Panel* getWantedFocus();
|
||||
|
||||
virtual void addSwitchingToBackPageSignal(ActionSignal* s);
|
||||
virtual void addSwitchingToNextPageSignal(ActionSignal* s);
|
||||
|
||||
virtual void setTitle(const char* title);
|
||||
virtual void getTitle(char* buf,int bufLen);
|
||||
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
Button* _backButton;
|
||||
Button* _nextButton;
|
||||
Button* _finishedButton;
|
||||
Button* _cancelButton;
|
||||
WizardPage* _currentWizardPage;
|
||||
Dar<ActionSignal*> _pageChangedActionSignalDar;
|
||||
|
||||
private:
|
||||
|
||||
virtual void fireFinishedActionSignal();
|
||||
virtual void fireCancelledActionSignal();
|
||||
virtual void firePageChangedActionSignal();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void performLayout();
|
||||
|
||||
public:
|
||||
|
||||
WizardPanel(int x,int y,int wide,int tall);
|
||||
|
||||
public:
|
||||
|
||||
virtual void setCurrentWizardPage(WizardPage* currentWizardPage);
|
||||
virtual void addFinishedActionSignal(ActionSignal* s);
|
||||
virtual void addCancelledActionSignal(ActionSignal* s);
|
||||
virtual void addPageChangedActionSignal(ActionSignal* s);
|
||||
virtual void doBack();
|
||||
virtual void doNext();
|
||||
virtual void getCurrentWizardPageTitle(char* buf,int bufLen);
|
||||
virtual WizardPage* getCurrentWizardPage();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue