28 #include <sigc++/sigc++.h>
31 #include <pgapplication.h>
32 #include <pgmessagebox.h>
33 #include <pgdropdown.h>
37 #include "pgwidgetlist.h"
40 #include "pgscrollbar.h"
41 #include "pgradiobutton.h"
42 #include "pgthemewidget.h"
43 #include "pgcheckbutton.h"
45 #include "pglistbox.h"
47 #include "pgpropertyeditor.h"
58 vector<PG_Label*> infoLabels;
59 PG_Label* versionLabel;
60 PG_ThemeWidget* background;
77 typedef list<PG_MessageObject*> DeletionQueue;
78 DeletionQueue deletionQueue;
80 bool removeFromDeletionQueue(
const PG_MessageObject* obj );
83 bool eventQuit(
int id, PG_MessageObject* widget,
unsigned long data);
91 bool InitScreen (
int w,
int h,
int depth = 0, Uint32 flags = SDL_SWSURFACE|SDL_HWPALETTE );
118 static int windowNum;
121 static int num() {
return windowNum; };
135 virtual bool eventKeyDown(
const SDL_KeyboardEvent *key);
137 ASC_PG_Dialog ( PG_Widget *parent,
const PG_Rect &r,
const ASCString& windowtext, WindowFlags flags=DEFAULT,
const ASCString& style=
"Window",
int heightTitlebar=25);
151 ASC_PropertyEditor( PG_Widget *parent,
const PG_Rect &r,
const std::string &style=
"PropertyEditor",
int labelWidthPercentage = 50 ) : PG_PropertyEditor( parent, r, style, labelWidthPercentage ) {};
153 if ( widgetName ==
"DropDownSelectorProperty" )
156 if ( widgetName ==
"BoolProperty" )
157 return "CheckButton";
159 return PG_PropertyEditor::GetStyleName( widgetName );
167 ColoredBar( PG_Color col, PG_Widget *parent,
const PG_Rect &r ) : PG_ThemeWidget( parent, r )
169 SetGradient ( PG_Gradient( col,col,col,col ));
171 SetBackgroundBlend ( 255 );
180 typedef sigc::signal<void,const PG_Rect&, const ASCString&, const PG_Rect&>
DisplayHook;
189 void eventBlit (SDL_Surface *surface,
const PG_Rect &src,
const PG_Rect &dst) {
190 display( src, GetName(), dst );
205 SpecialInputWidget (PG_Widget *parent,
const PG_Rect &rect ) : PG_Widget( parent, rect, false ) { SetTransparency(255); };
206 void eventBlit (SDL_Surface *surface,
const PG_Rect &src,
const PG_Rect &dst) { };
213 Emboss (PG_Widget *parent,
const PG_Rect &rect,
bool inverted =
false ) : PG_Widget( parent, rect, false ), inv(inverted)
217 void eventBlit (SDL_Surface *surface,
const PG_Rect &src,
const PG_Rect &dst);
236 extern pair<int,int>
new_chooseString (
const ASCString& title,
const vector<ASCString>& entries,
const vector<ASCString>& buttons,
int defaultEntry = -1 );
StartupScreen(const ASCString &filename, sigc::signal< void > &ticker)
void eventBlit(SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
void setIcon(const ASCString &filename)
bool quitModalLoopW(PG_Button *button, int value)
PG_StatusWindowData(const ASCString &msg)
bool MultiLineEditor(const ASCString &title, ASCString &textToEdit)
Functions to evaluate the parsed *.asctxt files.
void StandardButtonDirection(StandardButtonDirectonType dir)
virtual bool eventKeyDown(const SDL_KeyboardEvent *key)
StandardButtonDirectonType
void SetNewScreenSurface(SDL_Surface *surface)
std::string GetStyleName(const std::string &widgetName)
PG_MessageObject * caller
Emboss(PG_Widget *parent, const PG_Rect &rect, bool inverted=false)
bool InitScreen(int w, int h, int depth=0, Uint32 flags=SDL_SWSURFACE|SDL_HWPALETTE)
Global platform dependant definitions. This file just branches to the platform specific files in thei...
ASC_PropertyEditor(PG_Widget *parent, const PG_Rect &r, const std::string &style="PropertyEditor", int labelWidthPercentage=50)
ASC_PG_Dialog(PG_Widget *parent, const PG_Rect &r, const ASCString &windowtext, WindowFlags flags=DEFAULT, const ASCString &style="Window", int heightTitlebar=25)
The ASCString class provides an abstract way to manipulate strings.
ASC_PG_App(const ASCString &themeName)
bool enableLegacyEventHandling(bool use)
bool quitModalLoop(int value)
Adapter class for using Paragui Dialogs in ASC. This class transfers the event control from ASC to Pa...
ColoredBar(PG_Color col, PG_Widget *parent, const PG_Rect &r)
virtual bool closeWindow()
pair< int, int > new_chooseString(const ASCString &title, const vector< ASCString > &entries, const vector< ASCString > &buttons, int defaultEntry=-1)
bool eventQuit(int id, PG_MessageObject *widget, unsigned long data)
static PG_Rect centerRectangle(const PG_Rect &rect)
static const int mapDisplayID
ASCString editString2(const ASCString &title, const ASCString &defaultValue="")
uses the new dialog engine
int choiceDialog(const ASCString &text, const ASCString &button1, const ASCString &button2, const ASCString &shortLabel)
bool queueWidgetForDeletion(PG_Widget *widget)
PG_Button * AddStandardButton(const ASCString &name)
void SetText(const ASCString &text)
ASC_PG_App & getPGApplication()
static const int mainScreenID
BulkGraphicUpdates(PG_Widget *parent=NULL)
void line(int x1, int y1, int x2, int y2, Uint8 actcol)
draws a simple line on the screen. Not very fast...