[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.3,1.4 pgxmllay
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.3,1.4 pgxmllayoutloader.cpp,1.4,1.5 |
Date: |
Fri, 28 Jun 2002 06:33:53 -0400 |
Update of /cvsroot/paragui/paragui/src/layout
In directory subversions:/tmp/cvs-serv25668/src/layout
Modified Files:
layoutparsers.cpp pgxmllayoutloader.cpp
Log Message:
layout loader work
Index: layoutparsers.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/layout/layoutparsers.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** layoutparsers.cpp 28 Jun 2002 09:29:56 -0000 1.3
--- layoutparsers.cpp 28 Jun 2002 10:33:50 -0000 1.4
***************
*** 13,17 ****
PG_Rect pos = xmltag.GetRect("pos", GetParent());
MoveWidget(pos);
- Show();
}
--- 13,16 ----
Index: pgxmllayoutloader.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/layout/pgxmllayoutloader.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** pgxmllayoutloader.cpp 28 Jun 2002 09:29:56 -0000 1.4
--- pgxmllayoutloader.cpp 28 Jun 2002 10:33:50 -0000 1.5
***************
*** 17,20 ****
--- 17,21 ----
PG_XML_SECTION section;
PG_Widget* parent;
+ PG_Widget* currentwidget;
PG_XMLLayoutLoader* caller;
***************
*** 23,30 ****
--- 24,33 ----
section = DOC;
parent = NULL;
+ currentwidget = NULL;
}
void push() {
stack_parent.push(parent);
+ stack_widget.push(currentwidget);
stack_section.push(section);
}
***************
*** 32,37 ****
--- 35,42 ----
void pop() {
parent = stack_parent.top();
+ currentwidget = stack_widget.top();
section = stack_section.top();
stack_parent.pop();
+ stack_widget.pop();
stack_section.pop();
}
***************
*** 39,42 ****
--- 44,48 ----
private:
std::stack<PG_Widget*> stack_parent;
+ std::stack<PG_Widget*> stack_widget;
std::stack<PG_XML_SECTION> stack_section;
***************
*** 127,133 ****
int PG_XMLTag::GetAlignment(const char* name) {
! int result = -1;
std::string value = taglist[name];
if (value == "left")
result = PG_TA_LEFT;
--- 133,143 ----
int PG_XMLTag::GetAlignment(const char* name) {
! int result = PG_TA_LEFT;
std::string value = taglist[name];
+ if(value.empty()) {
+ return result;
+ }
+
if (value == "left")
result = PG_TA_LEFT;
***************
*** 273,281 ****
// fac-to-ry
if(xmltag.section == BODY || xmltag.section == WIDGET) {
! PG_Widget* widget = PG_Factory::CreateObject(xmltag.name,
parser->parent);
! if(widget != NULL) {
! widget->ParseXMLAttributes(xmltag);
! parser->parent = widget;
}
else {
--- 283,291 ----
// fac-to-ry
if(xmltag.section == BODY || xmltag.section == WIDGET) {
! parser->currentwidget = PG_Factory::CreateObject(xmltag.name,
parser->parent);
! if(parser->currentwidget != NULL) {
! parser->currentwidget->ParseXMLAttributes(xmltag);
! parser->parent = parser->currentwidget;
}
else {
***************
*** 297,301 ****
--- 307,319 ----
parser->caller->sigEndTag(xmltag);
+ if(parser->section == WIDGET) {
+ if(parser->currentwidget != NULL) {
+ parser->currentwidget->Show();
+ }
+ }
+
// get our status from the stack
parser->pop();
+
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/layout layoutparsers.cpp,1.3,1.4 pgxmllayoutloader.cpp,1.4,1.5,
Alexander Pipelka <address@hidden> <=