#include "paragui.h"#include "pglayout.h"#include "pgwidget.h"#include "pgbutton.h"#include "pgdropdown.h"#include "pglabel.h"#include "pgthemewidget.h"#include "pgmaskedit.h"#include "pgprogressbar.h"#include "pgspinnerbox.h"#include "pgwindow.h"#include "pgwidgetlist.h"#include "pglistbox.h"#include "pglistboxitem.h"#include "pgcolumnitem.h"#include "pgmessagebox.h"#include "pgradiobutton.h"#include "pgcheckbutton.h"#include "pgscrollbar.h"#include "pgslider.h"#include "pgimage.h"#include "pgrichedit.h"#include "pglog.h"#include "pgpopupmenu.h"#include "pgmenubar.h"#include "pgscrollwidget.h"#include <cstring>#include <stdarg.h>#include <sys/stat.h>#include <expat.h>Include dependency graph for pglayout.cpp:

Go to the source code of this file.
Defines | |
| #define | T(x) x |
| #define | tcscmp strcmp |
| #define | IsTag(lx, sx, y) (((tcscmp(T(lx),T(name))==0)||(tcscmp(T(sx),T(name))==0))&&((XMLParser->Section & (y))!=0)) |
| #define | XML_BUFF_SIZE 1024 |
| #define | XML_SECTION_NONPAIR 0x00000000 |
| #define | XML_SECTION_DOC 0x00000001 |
| #define | XML_SECTION_LAYOUT 0x00000002 |
| #define | XML_SECTION_HEAD 0x00000004 |
| #define | XML_SECTION_BODY 0x00000008 |
| #define | XML_SECTION_BUTTON 0x00000010 |
| #define | XML_SECTION_COMWIDPARAMS 0x00000020 |
| #define | XML_SECTION_DROPDOWN 0x00000040 |
| #define | XML_SECTION_WIDGET 0x00000080 |
| #define | XML_SECTION_LABEL 0x00000100 |
| #define | XML_SECTION_GWIDGET 0x00000200 |
| #define | XML_SECTION_SFRAME 0x00000400 |
| #define | XML_SECTION_LINEEDIT 0x00000800 |
| #define | XML_SECTION_MASKEDIT 0x00001000 |
| #define | XML_SECTION_PROGRESSBAR 0x00002000 |
| #define | XML_SECTION_SPINNERBOX 0x00004000 |
| #define | XML_SECTION_WINDOW 0x00008000 |
| #define | XML_SECTION_WIDGETLIST 0x00010000 |
| #define | XML_SECTION_LISTBOX 0x00020000 |
| #define | XML_SECTION_LISTBOXITEM 0x00040000 |
| #define | XML_SECTION_COLUMNITEM 0x00080000 |
| #define | XML_SECTION_MESSAGEBOX 0x00100000 |
| #define | XML_SECTION_RADIOBUTTON 0x00200000 |
| #define | XML_SECTION_CHECKBUTTON 0x00400000 |
| #define | XML_SECTION_SCROLLBAR 0x00800000 |
| #define | XML_SECTION_IMAGE 0x01000000 |
| #define | XML_SECTION_RICHEDIT 0x02000000 |
| #define | XML_SECTION_WIDGETLISTEX 0x04000000 |
| #define | XML_SECTION_FONT 0x08000000 |
| #define | XML_SECTION_POPUPMENU 0x10000000 |
| #define | XML_SECTION_MENUBAR 0x20000000 |
| #define | XML_SECTION_POPUPMENUITEM 0x40000000 |
| #define | ENDTAGFLAG_OBJECT 1 |
| #define | ENDTAGFLAG_WIDGETLIST 2 |
| #define | ENDTAGFLAG_SETSIZE 4 |
| #define | INHTAGFLAG_HIDE 1 |
| #define | INHTAGFLAG_ADDWIDGET 2 |
Functions | |
| char * | PG_Layout::GetParamStr (const char **Source, const char *What) |
| void | PG_Layout::GetParamRect (const char **Source, const char *What, PG_Rect &Rect, PG_Widget *parent) |
| int | PG_Layout::GetParamInt (const char **Source, const char *What) |
| PG_ScrollBar::ScrollDirection | PG_Layout::GetParamScrollDirection (const char **Source, const char *What) |
| PG_Label::TextAlign | PG_Layout::GetParamAlign (const char **Source, const char *What) |
| PG_Draw::BkMode | PG_Layout::GetParamIMode (const char **Source, const char *What) |
| int | PG_Layout::GetParamGrad (const char **Source, const char *What, PG_Gradient *grad) |
| static void | SaveUserData (ParseUserData_t *XMLParser) |
| static void | RestoreUserData (ParseUserData_t *XMLParser) |
| static int | SetWidgetAtts (PG_Widget *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetDropDownAtts (PG_DropDown *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetThemeWidgetAtts (PG_ThemeWidget *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetLabelAtts (PG_Label *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetUserButtonAtts (PG_Button *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetButtonAtts (PG_Button *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetPopupMenuAtts (PG_PopupMenu *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetLineEditAtts (PG_LineEdit *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetMaskEditAtts (PG_MaskEdit *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetWindowAtts (PG_Window *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetProgressBarAtts (PG_ProgressBar *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetSpinnerBoxAtts (PG_SpinnerBox *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetWidgetListAtts (PG_WidgetList *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetScrollWidgetAtts (PG_ScrollWidget *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetListBoxAtts (PG_ListBox *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetListBoxItemAtts (PG_ListBoxItem *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetRadioButtonAtts (PG_RadioButton *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static int | SetScrollBarAtts (PG_ScrollBar *Widget, const char **atts, ParseUserData_t *XMLParser) |
| static void | XMLStartDoc (void *userData, const char *name, const char **atts) |
| static void | XMLEndDoc (void *userData, const char *name) |
| static void | XMLTextDoc (void *userData, const XML_Char *s, int len) |
| static void | XMLProcInstr (void *userData, const XML_Char *target, const XML_Char *data) |
| bool | PG_Layout::Load (PG_Widget *parent, const std::string &filename, void(*WorkCallback)(int now, int max), void *UserSpace) |
Variables | |
| static char | Empty = 0 |
| void(* | PG_LayoutWidgetParams )(PG_Widget *Widget, const char **atts) = NULL |
| void(* | PG_LayoutProcessingInstruction )(const char *target, const char *data, const std::string &FileName, void *UserSpace) = NULL |
|
|
Definition at line 101 of file pglayout.cpp. Referenced by SetWidgetAtts(), and XMLEndDoc(). |
|
|
Definition at line 103 of file pglayout.cpp. Referenced by SetWidgetAtts(), and XMLEndDoc(). |
|
|
Definition at line 102 of file pglayout.cpp. Referenced by SetScrollWidgetAtts(), SetWidgetListAtts(), and XMLEndDoc(). |
|
|
Definition at line 106 of file pglayout.cpp. Referenced by SetScrollWidgetAtts(), SetWidgetAtts(), SetWidgetListAtts(), XMLEndDoc(), and XMLStartDoc(). |
|
|
Definition at line 105 of file pglayout.cpp. Referenced by SetWidgetAtts(), XMLEndDoc(), and XMLStartDoc(). |
|
|
Definition at line 46 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 42 of file pglayout.cpp. |
|
|
Definition at line 43 of file pglayout.cpp. |
|
|
Definition at line 48 of file pglayout.cpp. Referenced by PG_Layout::Load(). |
|
|
Definition at line 54 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 55 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 73 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 70 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 56 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 51 of file pglayout.cpp. Referenced by PG_Layout::Load(), and XMLStartDoc(). |
|
|
Definition at line 57 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 78 of file pglayout.cpp. |
|
|
Definition at line 60 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 53 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 75 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 59 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 52 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 62 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 68 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 69 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 63 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 80 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 71 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 50 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 79 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 81 of file pglayout.cpp. |
|
|
Definition at line 64 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 72 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 76 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 74 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 61 of file pglayout.cpp. |
|
|
Definition at line 65 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 58 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 67 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
|
Definition at line 77 of file pglayout.cpp. |
|
|
Definition at line 66 of file pglayout.cpp. Referenced by XMLStartDoc(). |
|
||||||||||||
|
Definition at line 186 of file pglayout.cpp. References PG_Label::CENTER, PG_Layout::GetParamStr(), PG_Label::LEFT, PG_Label::RIGHT, T, and tcscmp. |
|
||||||||||||||||
|
Definition at line 221 of file pglayout.cpp. References PG_Gradient::colors, PG_Layout::GetParamStr(), r1, r2, r3, and r4. |
|
||||||||||||
|
Definition at line 203 of file pglayout.cpp. References PG_Layout::GetParamStr(), PG_Draw::STRETCH, T, tcscmp, PG_Draw::TILE, PG_Draw::TILE3H, PG_Draw::TILE3V, and PG_Draw::TILE9. |
|
||||||||||||
|
Definition at line 160 of file pglayout.cpp. References atoi(), and PG_Layout::GetParamStr(). |
|
||||||||||||||||||||
|
Definition at line 119 of file pglayout.cpp. References PG_Layout::GetParamStr(), PG_Application::GetScreen(), screen, PG_Rect::SetRect(), and strdup(). |
|
||||||||||||
|
Definition at line 170 of file pglayout.cpp. References atoi(), PG_Layout::GetParamStr(), PG_ScrollBar::HORIZONTAL, and PG_ScrollBar::VERTICAL. |
|
||||||||||||
|
Definition at line 110 of file pglayout.cpp. |
|
||||||||||||||||||||
|
|
Definition at line 261 of file pglayout.cpp. References ParseUserData_t::PrevUserData. Referenced by PG_Layout::Load(), and XMLEndDoc(). |
|
|
Definition at line 249 of file pglayout.cpp. References ParseUserData_t::EndTagFlags, malloc(), and ParseUserData_t::PrevUserData. Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 470 of file pglayout.cpp. References PG_Layout::GetParamGrad(), PG_Button::HIGHLITED, PG_Button::PRESSED, PG_Button::SetGradient(), SetUserButtonAtts(), and PG_Button::UNPRESSED. Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 353 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_DropDown::SetEditable(), PG_DropDown::SetIndent(), and SetWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 397 of file pglayout.cpp. References PG_Layout::GetParamAlign(), PG_Layout::GetParamInt(), PG_Layout::GetParamStr(), PG_Label::SetAlignment(), PG_Label::SetIcon(), PG_Label::SetIndent(), and SetWidgetAtts(). Referenced by SetListBoxItemAtts(), and XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 490 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_Layout::GetParamStr(), PG_LineEdit::SetEditable(), PG_LineEdit::SetPassHidden(), SetThemeWidgetAtts(), and PG_LineEdit::SetValidKeys(). Referenced by SetMaskEditAtts(), and XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 585 of file pglayout.cpp. References PG_Layout::GetParamInt(), and SetWidgetListAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 591 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_ListBoxBaseItem::Select(), and SetLabelAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 507 of file pglayout.cpp. References PG_Layout::GetParamStr(), SetLineEditAtts(), PG_MaskEdit::SetMask(), and PG_MaskEdit::SetSpacer(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 485 of file pglayout.cpp. References SetThemeWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 531 of file pglayout.cpp. References atof(), PG_Layout::GetParamStr(), PG_ProgressBar::SetProgress(), and SetThemeWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 598 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_RadioButton::SetPressed(), and SetThemeWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 606 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_ScrollBar::SetLineSize(), PG_ScrollBar::SetPageSize(), PG_ScrollBar::SetPosition(), PG_ScrollBar::SetRange(), and SetThemeWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 577 of file pglayout.cpp. References ENDTAGFLAG_WIDGETLIST, ParseUserData_t::EndTagFlags, PG_Layout::GetParamInt(), INHTAGFLAG_ADDWIDGET, and SetThemeWidgetAtts(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 544 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_Layout::GetParamStr(), PG_SpinnerBox::SetMask(), PG_SpinnerBox::SetMaxValue(), PG_SpinnerBox::SetMinValue(), SetThemeWidgetAtts(), and PG_SpinnerBox::SetValue(). Referenced by XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 366 of file pglayout.cpp. References PG_Layout::GetParamGrad(), PG_Layout::GetParamIMode(), PG_Layout::GetParamInt(), PG_Layout::GetParamStr(), and SetWidgetAtts(). Referenced by SetLineEditAtts(), SetPopupMenuAtts(), SetProgressBarAtts(), SetRadioButtonAtts(), SetScrollBarAtts(), SetScrollWidgetAtts(), SetSpinnerBoxAtts(), SetWidgetListAtts(), SetWindowAtts(), and XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 418 of file pglayout.cpp. References PG_Layout::GetParamInt(), PG_Layout::GetParamStr(), PG_Button::SetBorderSize(), PG_Button::SetIcon(), PG_Button::SetPressed(), PG_Button::SetShift(), PG_Button::SetToggle(), PG_Button::SetTransparency(), and SetWidgetAtts(). Referenced by SetButtonAtts(). |
|
||||||||||||||||
|
||||||||||||||||
|
Definition at line 569 of file pglayout.cpp. References PG_ScrollWidget::EnableScrollBar(), ENDTAGFLAG_WIDGETLIST, ParseUserData_t::EndTagFlags, PG_Layout::GetParamInt(), INHTAGFLAG_ADDWIDGET, and SetThemeWidgetAtts(). Referenced by SetListBoxAtts(), and XMLStartDoc(). |
|
||||||||||||||||
|
Definition at line 518 of file pglayout.cpp. References PG_Layout::GetParamStr(), SetThemeWidgetAtts(), and PG_Window::SetTitlebarColor(). Referenced by XMLStartDoc(). |
|
||||||||||||
|
Definition at line 1121 of file pglayout.cpp. References ENDTAGFLAG_OBJECT, ENDTAGFLAG_SETSIZE, ENDTAGFLAG_WIDGETLIST, ParseUserData_t::EndTagFlags, PG_Widget::GetParent(), ParseUserData_t::Height, PG_Widget::Hide(), INHTAGFLAG_ADDWIDGET, INHTAGFLAG_HIDE, ParseUserData_t::InhTagFlags, ParseUserData_t::ParentObject, RestoreUserData(), PG_Widget::SetSizeByText(), PG_Widget::Show(), and ParseUserData_t::Width. Referenced by PG_Layout::Load(). |
|
||||||||||||||||
|
Definition at line 1173 of file pglayout.cpp. References ParseUserData_t::FileName, PG_LayoutProcessingInstruction, and ParseUserData_t::UserSpace. Referenced by PG_Layout::Load(). |
|
||||||||||||||||
|