[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8.2.1,1.8.2.2 pgco
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8.2.1,1.8.2.2 pgcolumnitem.cpp,1.3.2.1,1.3.2.2 pgdropdown.cpp,1.8,1.8.2.1 pglayout.cpp,1.2.2.1,1.2.2.2 pglineedit.cpp,1.6.2.1,1.6.2.2 pglistbox.cpp,1.7,1.7.2.1 pglistboxbaseitem.cpp,1.5,1.5.2.1 pglistboxitem.cpp,1.6.2.1,1.6.2.2 pgpopupmenu.cpp,1.7.2.1,1.7.2.2 pgprogressbar.cpp,1.4.2.2,1.4.2.3 pgradiobutton.cpp,1.7,1.7.2.1 pgrichedit.cpp,1.4.2.1,1.4.2.2 pgscrollbar.cpp,1.6.2.1,1.6.2.2 pgtabbar.cpp,1.5,1.5.2.1 pgthemewidget.cpp,1.6.2.1,1.6.2.2 pgwidget.cpp,1.13.2.2,1.13.2.3 pgwidgetlist.cpp,1.11.2.1,1.11.2.2 pgwidgetlistex.cpp,1.4,1.4.2.1 pgwindow.cpp,1.10.2.1,1.10.2.2 |
Date: |
Sat, 31 Aug 2002 00:01:28 -0400 |
Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv4328/src/widgets
Modified Files:
Tag: devel-opengl
pgbutton.cpp pgcolumnitem.cpp pgdropdown.cpp pglayout.cpp
pglineedit.cpp pglistbox.cpp pglistboxbaseitem.cpp
pglistboxitem.cpp pgpopupmenu.cpp pgprogressbar.cpp
pgradiobutton.cpp pgrichedit.cpp pgscrollbar.cpp pgtabbar.cpp
pgthemewidget.cpp pgwidget.cpp pgwidgetlist.cpp
pgwidgetlistex.cpp pgwindow.cpp
Log Message:
massive changes - updates from main trunk and various bugfixes
Index: pgbutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgbutton.cpp,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C2 -r1.8.2.1 -r1.8.2.2
*** pgbutton.cpp 18 Jun 2002 22:40:39 -0000 1.8.2.1
--- pgbutton.cpp 31 Aug 2002 04:01:25 -0000 1.8.2.2
***************
*** 98,101 ****
--- 98,103 ----
FreeSurfaces();
FreeIcons();
+
+ delete my_internaldata;
}
***************
*** 152,155 ****
--- 154,158 ----
}
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SetIcon(
t->FindSurface(widgettype, objectname, iconup),
***************
*** 157,160 ****
--- 160,164 ----
t->FindSurface(widgettype, objectname, iconover)
);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Gradient* g;
***************
*** 174,177 ****
--- 178,182 ----
}
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SetBackground(
0,
***************
*** 179,182 ****
--- 184,188 ----
t->FindProperty(widgettype, objectname, "backmode0")
);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SetBackground(
***************
*** 185,188 ****
--- 191,195 ----
t->FindProperty(widgettype, objectname, "backmode1")
);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SetBackground(
***************
*** 191,194 ****
--- 198,202 ----
t->FindProperty(widgettype, objectname, "backmode2")
);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
b = t->FindProperty(widgettype, objectname, "blend0");
Index: pgcolumnitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgcolumnitem.cpp,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C2 -r1.3.2.1 -r1.3.2.2
*** pgcolumnitem.cpp 18 Jun 2002 22:40:39 -0000 1.3.2.1
--- pgcolumnitem.cpp 31 Aug 2002 04:01:25 -0000 1.3.2.2
***************
*** 30,34 ****
#include "pgdraw.h"
! PG_ColumnItem::PG_ColumnItem(Uint32 columns, Uint32 height, void* userdata) :
PG_ListBoxItem(height) {
SetUserData(userdata);
my_columncount = columns;
--- 30,34 ----
#include "pgdraw.h"
! PG_ColumnItem::PG_ColumnItem(PG_ListBox* parent, Uint32 columns, Uint32
height, void* userdata) : PG_ListBoxItem(parent, height) {
SetUserData(userdata);
my_columncount = columns;
Index: pgdropdown.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgdropdown.cpp,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -r1.8 -r1.8.2.1
*** pgdropdown.cpp 6 May 2002 10:40:50 -0000 1.8
--- pgdropdown.cpp 31 Aug 2002 04:01:25 -0000 1.8.2.1
***************
*** 65,70 ****
PG_FontEngine::GetTextSize(text, GetFont(), NULL, NULL, NULL, NULL, &h);
! PG_ListBoxItem* item = new PG_ListBoxItem(h+2, text, NULL, userdata);
! my_DropList->AddItem(item);
}
--- 65,69 ----
PG_FontEngine::GetTextSize(text, GetFont(), NULL, NULL, NULL, NULL, &h);
! PG_ListBoxItem* item = new PG_ListBoxItem(my_DropList, h+2, text, NULL,
userdata);
}
Index: pglayout.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglayout.cpp,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** pglayout.cpp 18 Jun 2002 22:40:39 -0000 1.2.2.1
--- pglayout.cpp 31 Aug 2002 04:01:25 -0000 1.2.2.2
***************
*** 863,868 ****
}
! PG_ListBoxItem *Widget = new PG_ListBoxItem(h,
PG_Layout::GetParamStr(atts, "ltext"));
! ((PG_ListBox *)XMLParser->ParentObject)->AddItem(Widget);
XMLParser->ParentObject = Widget;
--- 863,868 ----
}
! PG_ListBoxItem *Widget = new
PG_ListBoxItem((PG_ListBox*)(PG_ListBox *)XMLParser->ParentObject, h,
PG_Layout::GetParamStr(atts, "ltext"));
! //((PG_ListBox *)XMLParser->ParentObject)->AddChild(Widget);
XMLParser->ParentObject = Widget;
***************
*** 875,880 ****
XMLParser->Section = XML_SECTION_COLUMNITEM |
XML_SECTION_COMWIDPARAMS;
! PG_ColumnItem *Widget = new
PG_ColumnItem(PG_Layout::GetParamInt(atts,
"columns"),PG_Layout::GetParamInt(atts, "height"));
! ((PG_ListBox *)XMLParser->ParentObject)->AddItem(Widget);
XMLParser->ParentObject = Widget;
--- 875,880 ----
XMLParser->Section = XML_SECTION_COLUMNITEM |
XML_SECTION_COMWIDPARAMS;
! PG_ColumnItem *Widget = new PG_ColumnItem((PG_ListBox
*)XMLParser->ParentObject, PG_Layout::GetParamInt(atts,
"columns"),PG_Layout::GetParamInt(atts, "height"));
! //((PG_ListBox *)XMLParser->ParentObject)->AddChild(Widget);
XMLParser->ParentObject = Widget;
***************
*** 1110,1114 ****
if ((XMLParser->InhTagFlags & INHTAGFLAG_HIDE) == 0)
! XMLParser->ParentObject->Show();
else
XMLParser->ParentObject->Hide();
--- 1110,1116 ----
if ((XMLParser->InhTagFlags & INHTAGFLAG_HIDE) == 0)
! if(XMLParser->ParentObject->GetParent() == NULL) {
! XMLParser->ParentObject->Show();
! }
else
XMLParser->ParentObject->Hide();
***************
*** 1124,1128 ****
}
! ((PG_WidgetList *)(XMLParser->ParentObject))->AddWidget(WidgetToAdd);
}
--- 1126,1130 ----
}
! // ((PG_WidgetList *)(XMLParser->ParentObject))->AddChild(WidgetToAdd);
}
Index: pglineedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglineedit.cpp,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** pglineedit.cpp 18 Jun 2002 22:40:39 -0000 1.6.2.1
--- pglineedit.cpp 31 Aug 2002 04:01:25 -0000 1.6.2.2
***************
*** 501,504 ****
--- 501,505 ----
PG_Theme* t = PG_Application::GetTheme();
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
my_srfTextCursor = t->FindSurface(widgettype, objectname, "textcursor");
Index: pglistbox.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistbox.cpp,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** pglistbox.cpp 6 May 2002 06:24:29 -0000 1.7
--- pglistbox.cpp 31 Aug 2002 04:01:25 -0000 1.7.2.1
***************
*** 38,48 ****
}
! PG_ListBox::~PG_ListBox() {}
! void PG_ListBox::AddWidget(PG_Widget* w) {
PG_WidgetList::AddWidget(w);
! }
! void PG_ListBox::AddItem(PG_ListBoxItem* item) {
if (!item)
return;
--- 38,49 ----
}
! PG_ListBox::~PG_ListBox() {
! }
! /*void PG_ListBox::AddWidget(PG_Widget* w) {
PG_WidgetList::AddWidget(w);
! }*/
! void PG_ListBox::AddChild(PG_ListBoxBaseItem* item) {
if (!item)
return;
***************
*** 55,59 ****
item->SizeWidget(neww, item->Height());
item->SetIndent(my_indent);
! AddWidget(item);
}
--- 56,60 ----
item->SizeWidget(neww, item->Height());
item->SetIndent(my_indent);
! PG_WidgetList::AddChild(item);
}
***************
*** 115,118 ****
--- 116,122 ----
my_selectedItem = NULL;
PG_WidgetList::DeleteAll();
+ ScrollToX(0);
+ ScrollToY(0);
+ Update();
}
Index: pglistboxbaseitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistboxbaseitem.cpp,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** pglistboxbaseitem.cpp 30 Apr 2002 10:18:39 -0000 1.5
--- pglistboxbaseitem.cpp 31 Aug 2002 04:01:25 -0000 1.5.2.1
***************
*** 29,34 ****
#include "pglistboxbaseitem.h"
#include "pglistbox.h"
! PG_ListBoxBaseItem::PG_ListBoxBaseItem(int height, void* userdata) :
PG_Label(NULL, PG_Rect(0,0,100,20), NULL) {
my_userdata = userdata;
my_selected = false;
--- 29,35 ----
#include "pglistboxbaseitem.h"
#include "pglistbox.h"
+ #include "pglog.h"
! PG_ListBoxBaseItem::PG_ListBoxBaseItem(PG_ListBox* parent, int height, void*
userdata) : PG_Label(parent, PG_Rect(0,0,100,20), NULL) {
my_userdata = userdata;
my_selected = false;
***************
*** 37,43 ****
--- 38,52 ----
SetAlignment(PG_TA_LEFT);
+
+ if(parent != NULL) {
+ SizeWidget(parent->w, height);
+ }
}
PG_ListBoxBaseItem::~PG_ListBoxBaseItem() {
+ /* if(GetParent()->GetSelectedItem() == this) {
+ GetParent()->SelectItem(NULL);
+ GetParent()->RemoveWidget(this, true, true);
+ }*/
}
***************
*** 62,67 ****
}
}
!
! Update();
}
--- 71,75 ----
}
}
! /* Teunis? -- Update(); */
}
***************
*** 72,75 ****
--- 80,86 ----
void PG_ListBoxBaseItem::eventSizeWidget(Uint16 w, Uint16 h) {
my_itemheight = h;
+ if(GetParent() != NULL) {
+ PG_Label::eventSizeWidget(GetParent()->w, h);
+ }
}
Index: pglistboxitem.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistboxitem.cpp,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** pglistboxitem.cpp 18 Jun 2002 22:40:39 -0000 1.6.2.1
--- pglistboxitem.cpp 31 Aug 2002 04:01:25 -0000 1.6.2.2
***************
*** 30,36 ****
#include "pglistbox.h"
#include "pgtheme.h"
#include "pgdraw.h"
! PG_ListBoxItem::PG_ListBoxItem(int height, const char* text,
PG_Draw::PG_DrawableSurface* icon, void* userdata, const char* style) :
PG_ListBoxBaseItem(height, userdata) {
for(int i=0; i<3; i++) {
--- 30,39 ----
#include "pglistbox.h"
#include "pgtheme.h"
+ #include "pglog.h"
#include "pgdraw.h"
! PG_ListBoxItem::PG_ListBoxItem(PG_ListBox* parent, int height, const char*
text, PG_Draw::PG_DrawableSurface* icon, void* userdata, const char* style) :
PG_ListBoxBaseItem(parent, height, userdata) {
!
! PG_LogDBG("PG_ListBoxItem::PG_ListBoxItem(%08x)", parent);
for(int i=0; i<3; i++) {
***************
*** 38,41 ****
--- 41,45 ----
my_bkmode[i] = BKMODE_TILE;
my_blend[i] = 0;
+ my_gradient[i] = NULL;
}
***************
*** 114,117 ****
--- 118,122 ----
for(int i=0; i<3; i++) {
sprintf(prop, "background%i", i);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
my_background[i] = t->FindSurface(widgettype, objectname, prop);
Index: pgpopupmenu.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgpopupmenu.cpp,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -C2 -r1.7.2.1 -r1.7.2.2
*** pgpopupmenu.cpp 18 Jun 2002 22:40:39 -0000 1.7.2.1
--- pgpopupmenu.cpp 31 Aug 2002 04:01:25 -0000 1.7.2.2
***************
*** 758,761 ****
--- 758,763 ----
if (tracking)
SetCapture();
+
+ current = stop;
}
***************
*** 820,825 ****
--- 822,830 ----
miGradients[2] = theme->FindGradient(widgettype, "MenuItem",
"gradientDisabled");
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
miBackgrounds[0] = theme->FindSurface(widgettype, "MenuItem",
"backNormal");
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
miBackgrounds[1] = theme->FindSurface(widgettype, "MenuItem",
"backSelected");
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
miBackgrounds[2] = theme->FindSurface(widgettype, "MenuItem",
"backDisabled");
Index: pgprogressbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgprogressbar.cpp,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -C2 -r1.4.2.2 -r1.4.2.3
*** pgprogressbar.cpp 19 Jun 2002 08:27:24 -0000 1.4.2.2
--- pgprogressbar.cpp 31 Aug 2002 04:01:25 -0000 1.4.2.3
***************
*** 27,32 ****
*/
- #include <cmath>
-
#include "pgapplication.h"
#include "pgprogressbar.h"
--- 27,30 ----
***************
*** 34,37 ****
--- 32,37 ----
#include "pgtheme.h"
+ #include <cmath>
+
PG_ProgressBar::PG_ProgressBar(PG_Widget* parent, const PG_Rect& r, const
char* style) : PG_ThemeWidget(parent, r) {
***************
*** 84,88 ****
--- 84,90 ----
PG_ThemeWidget::LoadThemeStyle(widgettype, "Background");
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
my_pbBackground = t->FindSurface(widgettype, "Indicator", "background");
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Gradient* g = t->FindGradient(widgettype, "Indicator", "gradient");
Index: pgradiobutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgradiobutton.cpp,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** pgradiobutton.cpp 6 May 2002 10:40:50 -0000 1.7
--- pgradiobutton.cpp 31 Aug 2002 04:01:25 -0000 1.7.2.1
***************
*** 2,23 ****
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
--- 2,23 ----
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
***************
*** 180,182 ****
--- 180,186 ----
const char* PG_RadioButton::GetText() {
return my_widgetLabel->GetText();
+ }
+
+ void PG_RadioButton::SetAlignment(int a) {
+ my_widgetLabel->SetAlignment(a);
}
Index: pgrichedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgrichedit.cpp,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** pgrichedit.cpp 18 Jun 2002 22:40:39 -0000 1.4.2.1
--- pgrichedit.cpp 31 Aug 2002 04:01:25 -0000 1.4.2.2
***************
*** 2,23 ****
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
--- 2,23 ----
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
***************
*** 90,94 ****
void PG_RichEdit::AddWidget(PG_Widget* w) {
! PG_WidgetListEx::AddWidget(w);
CompleteLines();
}
--- 90,94 ----
void PG_RichEdit::AddWidget(PG_Widget* w) {
! PG_WidgetListEx::AddChild(w);
CompleteLines();
}
***************
*** 182,186 ****
increment = 0;
*word = my_text.substr(searchFrom, result - searchFrom +
increment);
!
if ((Uint32)my_text[result] ==
my_Marks[MARK_NONBREAKABLE_SPACE]) {
std::string newword;
--- 182,186 ----
increment = 0;
*word = my_text.substr(searchFrom, result - searchFrom +
increment);
!
if ((Uint32)my_text[result] ==
my_Marks[MARK_NONBREAKABLE_SPACE]) {
std::string newword;
***************
*** 551,554 ****
--- 551,571 ----
}
} */
+ return true;
+ }
+
+ bool PG_RichEdit::LoadText(const char* textfile) {
+ PG_DataContainer* text = PG_FileArchive::ReadFile(textfile);
+
+ if(text == NULL) {
+ return false;
+ }
+
+ // Hmm,...
+ // size() returns the number of loaded bytes. We have to terminate the
text with 0.
+ // Last character will be truncated by this (i love valgrind).
+ text->data()[text->size()-1] = 0;
+ SetText(text->data());
+
+ delete text;
return true;
}
Index: pgscrollbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgscrollbar.cpp,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** pgscrollbar.cpp 26 Jun 2002 08:47:51 -0000 1.6.2.1
--- pgscrollbar.cpp 31 Aug 2002 04:01:25 -0000 1.6.2.2
***************
*** 2,23 ****
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
--- 2,23 ----
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
***************
*** 59,64 ****
position[2].w = r.my_width;
position[2].h = r.my_height-(r.my_width*2+1);
! if ((Sint16)position[2].h < 0)
! position[2].h = 0;
position[3].x = 0;
--- 59,64 ----
position[2].w = r.my_width;
position[2].h = r.my_height-(r.my_width*2+1);
! if ((Sint16)position[2].h < 0)
! position[2].h = 0;
position[3].x = 0;
Index: pgtabbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgtabbar.cpp,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** pgtabbar.cpp 6 May 2002 10:40:50 -0000 1.5
--- pgtabbar.cpp 31 Aug 2002 04:01:25 -0000 1.5.2.1
***************
*** 36,44 ****
width += 8;
! PG_Button* b = new PG_Button(NULL, id,
PG_Rect(my_tabList->GetListWidth(), 0, width, my_height), text,
my_style.c_str());
b->SetToggle(true);
b->sigButtonClick.connect(slot(*this, &PG_TabBar::handleTabClick));
! my_tabList->AddWidget(b);
if(my_tabList->GetListWidth() > my_width) {
--- 36,44 ----
width += 8;
! PG_Button* b = new PG_Button(my_tabList, id,
PG_Rect(my_tabList->GetListWidth(), 0, width, my_height), text,
my_style.c_str());
b->SetToggle(true);
b->sigButtonClick.connect(slot(*this, &PG_TabBar::handleTabClick));
! //my_tabList->AddChild(b);
if(my_tabList->GetListWidth() > my_width) {
Index: pgthemewidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgthemewidget.cpp,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** pgthemewidget.cpp 18 Jun 2002 22:40:39 -0000 1.6.2.1
--- pgthemewidget.cpp 31 Aug 2002 04:01:25 -0000 1.6.2.2
***************
*** 109,113 ****
b = t->FindProperty(widgettype, objectname, "simplebackground");
! my_internaldata->simplebackground = (b != -1) ? b :
my_internaldata->simplebackground;
b = t->FindProperty(widgettype, objectname, "nocache");
--- 109,116 ----
b = t->FindProperty(widgettype, objectname, "simplebackground");
! if(b != -1) {
! SetSimpleBackground(b);
! }
! //my_internaldata->simplebackground = (b != -1) ? b :
my_internaldata->simplebackground;
b = t->FindProperty(widgettype, objectname, "nocache");
***************
*** 133,137 ****
--- 136,142 ----
SetFontStyle(fontstyle);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
SetBackground(t->FindSurface(widgettype, objectname, "background"));
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
b = t->FindProperty(widgettype, objectname, "blend");
***************
*** 156,160 ****
if(g) {
! my_gradient = *g;
my_has_gradient = true;
}
--- 161,165 ----
if(g) {
! SetGradient(*g);
my_has_gradient = true;
}
***************
*** 298,301 ****
--- 303,313 ----
my_gradient = grad;
my_has_gradient = true;
+ DeleteThemedSurface(my_internaldata->cachesurface);
+ my_internaldata->cachesurface = NULL;
+ Redraw();
+ }
+
+ PG_Gradient PG_ThemeWidget::GetGradient() {
+ return my_gradient;
}
***************
*** 454,458 ****
--- 466,472 ----
// lookup the surface in cache
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
cache_surface = my_SurfaceCache.FindSurface(key);
+ fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
// draw the cached surface :)
***************
*** 510,512 ****
--- 524,537 ----
}
my_SurfaceCache.DeleteSurface(surface);
+ }
+
+ void PG_ThemeWidget::SetSimpleBackground(bool simple) {
+ my_internaldata->simplebackground = simple;
+ DeleteThemedSurface(my_internaldata->cachesurface);
+ my_internaldata->cachesurface = NULL;
+ Redraw();
+ }
+
+ void PG_ThemeWidget::SetBackgroundColor(const SDL_Color& c) {
+ my_internaldata->backgroundcolor = c;
}
Index: pgwidget.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidget.cpp,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.3
diff -C2 -r1.13.2.2 -r1.13.2.3
*** pgwidget.cpp 26 Jun 2002 08:47:51 -0000 1.13.2.2
--- pgwidget.cpp 31 Aug 2002 04:01:25 -0000 1.13.2.3
***************
*** 2,23 ****
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
--- 2,23 ----
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
***************
*** 161,166 ****
my_xpos = my_parent->my_xpos + my_xpos;
my_ypos = my_parent->my_ypos + my_ypos;
my_parent->AddChild(this);
! }
my_internaldata->mouseInside = false;
--- 161,167 ----
my_xpos = my_parent->my_xpos + my_xpos;
my_ypos = my_parent->my_ypos + my_ypos;
+
my_parent->AddChild(this);
! }
my_internaldata->mouseInside = false;
***************
*** 246,250 ****
bool PG_Widget::AcceptEvent(const SDL_Event * event) {
! if (!IsVisible()) {
return false;
}
--- 247,251 ----
bool PG_Widget::AcceptEvent(const SDL_Event * event) {
! if (!IsVisible() || IsHidden()) {
return false;
}
***************
*** 331,338 ****
void PG_Widget::AddChild(PG_Widget * child) {
!
! if (!child)
return;
!
// remove our new child from previous lists
if(child->GetParent()) {
--- 332,339 ----
void PG_Widget::AddChild(PG_Widget * child) {
! if (!child) {
return;
! }
!
// remove our new child from previous lists
if(child->GetParent()) {
***************
*** 692,703 ****
ReleaseInputFocus();
! RestoreBackground();
if(!PG_Application::GetBulkMode()) {
UpdateRect(my_internaldata->rectClip);
}
- my_srfScreen->SetClipRect();
-
if(!PG_Application::GetBulkMode()) {
PG_Application::LockScreen();
--- 693,703 ----
ReleaseInputFocus();
! my_srfScreen->SetClipRect();
if(!PG_Application::GetBulkMode()) {
+ //RestoreBackground();
UpdateRect(my_internaldata->rectClip);
}
if(!PG_Application::GetBulkMode()) {
PG_Application::LockScreen();
***************
*** 776,780 ****
}
}
!
PG_Application::UnlockScreen();
}
--- 776,780 ----
}
}
!
PG_Application::UnlockScreen();
}
***************
*** 939,949 ****
if(font != NULL)
! SetFontName(font);
if (fontsize > 0)
! SetFontSize(fontsize);
if (fontstyle >= 0)
! SetFontStyle(fontstyle);
c = t->FindColor(widgettype, objectname, "textcolor");
--- 939,949 ----
if(font != NULL)
! SetFontName(font, true);
if (fontsize > 0)
! SetFontSize(fontsize, true);
if (fontstyle >= 0)
! SetFontStyle(fontstyle, true);
c = t->FindColor(widgettype, objectname, "textcolor");
***************
*** 1465,1469 ****
void PG_Widget::DrawText(int x, int y, const char* text) {
! DrawText(PG_Rect(x,y,0,0), text);
}
--- 1465,1469 ----
void PG_Widget::DrawText(int x, int y, const char* text) {
! DrawText(PG_Rect(x,y,w,h), text);
}
***************
*** 1482,1490 ****
void PG_Widget::DrawText(const PG_Rect& rect, const char* text, const
SDL_Color& c) {
SetFontColor(c);
! DrawText(PG_Rect(x,y,0,0), text);
}
void PG_Widget::DrawText(int x, int y, const char* text, const SDL_Color& c) {
! DrawText(PG_Rect(x,y,0,0), text, c);
}
--- 1482,1490 ----
void PG_Widget::DrawText(const PG_Rect& rect, const char* text, const
SDL_Color& c) {
SetFontColor(c);
! DrawText(PG_Rect(x,y,w,h), text);
}
void PG_Widget::DrawText(int x, int y, const char* text, const SDL_Color& c) {
! DrawText(PG_Rect(x,y,w,h), text, c);
}
***************
*** 1498,1507 ****
my_internaldata->quitModalLoop = false;
while(!my_internaldata->quitModalLoop) {
SDL_WaitEvent(&event);
! ProcessEvent(&event, true);
PG_Application::DrawCursor();
}
return 0;
}
--- 1498,1519 ----
my_internaldata->quitModalLoop = false;
+ // run while in modal mode
while(!my_internaldata->quitModalLoop) {
SDL_WaitEvent(&event);
! if(event.type == SDL_USEREVENT) {
!
PG_Application::GetInstance().PumpIntoEventQueue(&event);
! }
! else {
! ProcessEvent(&event, true);
! }
PG_Application::DrawCursor();
}
+ // poll all remaining events out of the eventloop
+ // there might be callback messages still in there
+
+ while(SDL_PollEvent(&event)) {
+ ProcessEvent(&event, true);
+ }
return 0;
}
***************
*** 1808,1811 ****
--- 1820,1828 ----
void PG_Widget::SetDirtyUpdate(bool bDirtyUpdate) {
+ if(PG_Application::GetDirtyUpdatesDisabled()) {
+ my_internaldata->dirtyUpdate = false;
+ return;
+ }
+
my_internaldata->dirtyUpdate = bDirtyUpdate;
}
***************
*** 1817,1820 ****
--- 1834,1846 ----
void PG_Widget::SetHidden(bool hidden) {
my_internaldata->hidden = hidden;
+ if(my_internaldata->childList == NULL) {
+ return;
+ }
+ PG_RectList::iterator list = my_internaldata->childList->begin();
+
+ while (list != my_internaldata->childList->end()) {
+ (*list)->SetHidden(hidden);
+ list++;
+ }
}
Index: pgwidgetlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlist.cpp,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C2 -r1.11.2.1 -r1.11.2.2
*** pgwidgetlist.cpp 18 Jun 2002 22:40:39 -0000 1.11.2.1
--- pgwidgetlist.cpp 31 Aug 2002 04:01:25 -0000 1.11.2.2
***************
*** 2,23 ****
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
--- 2,23 ----
ParaGUI - crossplatform widgetset
Copyright (C) 2000,2001,2002 Alexander Pipelka
!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
!
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
!
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
!
Alexander Pipelka
address@hidden
!
Last Update: $Author$
Update Date: $Date$
***************
*** 38,41 ****
--- 38,43 ----
PG_WidgetList::PG_WidgetList(PG_Widget* parent, const PG_Rect& r, const char*
style) : PG_ThemeWidget(parent, r, style) {
+ bInConstructor = true;
+
my_widgetCount = 0;
my_listheight = my_listwidth = 0;
***************
*** 96,99 ****
--- 98,103 ----
LoadThemeStyle(style);
+
+ bInConstructor = false;
}
***************
*** 193,220 ****
}
! void PG_WidgetList::AddWidget(PG_Widget* w) {
if(w == NULL) {
return;
}
! w->SetVisible(false);
! AddChild(w);
if(my_widgetList.empty()) {
! my_listheight = w->Height() + w->my_ypos;
} else {
! my_listheight += (w->Height() + + w->my_ypos);
}
! if (((w->Width() + w->my_xpos) > 0) && (Uint32(w->Width() + w->my_xpos)
> my_listwidth)) {
! my_listwidth = w->Width() + w->my_xpos;
}
if(my_widgetCount == 0) {
! w->MoveWidget(w->my_xpos + my_bordersize, my_listheight -
w->my_height + my_bordersize);
}
else {
PG_Widget* last = my_widgetList[my_widgetCount - 1];
! w->MoveWidget(w->my_xpos + my_bordersize, (last->y - my_ypos) +
last->h + w->my_ypos);
}
--- 197,230 ----
}
! void PG_WidgetList::AddChild(PG_Widget* w) {
! PG_LogDBG("PG_WidgetList::AddChild()");
!
if(w == NULL) {
return;
}
! PG_Widget::AddChild(w);
!
! if(bInConstructor) {
! return;
! }
+ w->SetVisible(false);
if(my_widgetList.empty()) {
! my_listheight = w->Height();
} else {
! my_listheight += w->Height();
}
! if ((w->Width() > 0) && (w->Width() > my_listwidth)) {
! my_listwidth = w->Width();
}
if(my_widgetCount == 0) {
! w->MoveWidget(my_bordersize, my_bordersize);
}
else {
PG_Widget* last = my_widgetList[my_widgetCount - 1];
! w->MoveWidget(my_bordersize, (last->y - my_ypos) + last->h);
}
***************
*** 245,250 ****
w = *list;
w->Hide();
delete w;
- //my_widgetList.erase(list);
list = my_widgetList.begin();
}
--- 255,260 ----
w = *list;
w->Hide();
+ my_widgetList.erase(list);
delete w;
list = my_widgetList.begin();
}
Index: pgwidgetlistex.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlistex.cpp,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -r1.4 -r1.4.2.1
*** pgwidgetlistex.cpp 28 Apr 2002 16:35:30 -0000 1.4
--- pgwidgetlistex.cpp 31 Aug 2002 04:01:25 -0000 1.4.2.1
***************
*** 33,37 ****
/** */
! void PG_WidgetListEx::AddWidget(PG_Widget* w) {
if(w == NULL) {
return;
--- 33,37 ----
/** */
! void PG_WidgetListEx::AddChild(PG_Widget* w) {
if(w == NULL) {
return;
***************
*** 39,43 ****
w->SetVisible(false);
! AddChild(w);
if (((w->Width() + w->my_xpos) > 0) && (Uint32(w->Height() +
w->my_ypos) > my_listheight)) {
--- 39,43 ----
w->SetVisible(false);
! PG_Widget::AddChild(w);
if (((w->Width() + w->my_xpos) > 0) && (Uint32(w->Height() +
w->my_ypos) > my_listheight)) {
Index: pgwindow.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwindow.cpp,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -r1.10.2.1 -r1.10.2.2
*** pgwindow.cpp 18 Jun 2002 22:40:39 -0000 1.10.2.1
--- pgwindow.cpp 31 Aug 2002 04:01:25 -0000 1.10.2.2
***************
*** 251,252 ****
--- 251,256 ----
return rc;
}
+
+ void PG_Window::SetTitle(const char* title) {
+ my_labelTitle->SetText(title);
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.8.2.1,1.8.2.2 pgcolumnitem.cpp,1.3.2.1,1.3.2.2 pgdropdown.cpp,1.8,1.8.2.1 pglayout.cpp,1.2.2.1,1.2.2.2 pglineedit.cpp,1.6.2.1,1.6.2.2 pglistbox.cpp,1.7,1.7.2.1 pglistboxbaseitem.cpp,1.5,1.5.2.1 pglistboxitem.cpp,1.6.2.1,1.6.2.2 pgpopupmenu.cpp,1.7.2.1,1.7.2.2 pgprogressbar.cpp,1.4.2.2,1.4.2.3 pgradiobutton.cpp,1.7,1.7.2.1 pgrichedit.cpp,1.4.2.1,1.4.2.2 pgscrollbar.cpp,1.6.2.1,1.6.2.2 pgtabbar.cpp,1.5,1.5.2.1 pgthemewidget.cpp,1.6.2.1,1.6.2.2 pgwidget.cpp,1.13.2.2,1.13.2.3 pgwidgetlist.cpp,1.11.2.1,1.11.2.2 pgwidgetlistex.cpp,1.4,1.4.2.1 pgwindow.cpp,1.10.2.1,1.10.2.2,
Teunis Peters <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/physfs/archivers Makefile.am,1.2,1.2.2.1 dir.c,1.2,1.2.2.1 grp.c,1.2,1.2.2.1 unzip.c,1.2,1.2.2.1 zip.c,1.2,1.2.2.1
- Next by Date:
[paragui-cvs] CVS: paragui/test factory.cpp,NONE,1.5.2.1 stress1.cpp,NONE,1.2.2.1 stress2.cpp,NONE,1.2.2.1 writefile.cpp,NONE,1.2.2.1 xmlloader.cpp,NONE,1.3.2.1 Makefile.am,1.6.2.3,1.6.2.4 animation.cpp,1.2.2.2,1.2.2.3 dblbuffer.cpp,1.4.2.3,1.4.2.4 dropdown.cpp,1.1.2.1,1.1.2.2 gltest.cpp,1.1.2.1,1.1.2.2 layouttest.cpp,1.1.1.1.2.1,1.1.1.1.2.2 list.cpp,1.1.2.1,1.1.2.2 paratest.cpp,1.9.2.3,1.9.2.4 pokus.xml,1.1.1.1,1.1.1.1.2.1 tabbar.cpp,1.4.2.1,1.4.2.2 windowtest.cpp,1.1.1.1.2.2,1.1.1.1.2.3
- Previous by thread:
[paragui-cvs] CVS: paragui/src/physfs/archivers Makefile.am,1.2,1.2.2.1 dir.c,1.2,1.2.2.1 grp.c,1.2,1.2.2.1 unzip.c,1.2,1.2.2.1 zip.c,1.2,1.2.2.1
- Next by thread:
[paragui-cvs] CVS: paragui/test factory.cpp,NONE,1.5.2.1 stress1.cpp,NONE,1.2.2.1 stress2.cpp,NONE,1.2.2.1 writefile.cpp,NONE,1.2.2.1 xmlloader.cpp,NONE,1.3.2.1 Makefile.am,1.6.2.3,1.6.2.4 animation.cpp,1.2.2.2,1.2.2.3 dblbuffer.cpp,1.4.2.3,1.4.2.4 dropdown.cpp,1.1.2.1,1.1.2.2 gltest.cpp,1.1.2.1,1.1.2.2 layouttest.cpp,1.1.1.1.2.1,1.1.1.1.2.2 list.cpp,1.1.2.1,1.1.2.2 paratest.cpp,1.9.2.3,1.9.2.4 pokus.xml,1.1.1.1,1.1.1.1.2.1 tabbar.cpp,1.4.2.1,1.4.2.2 windowtest.cpp,1.1.1.1.2.2,1.1.1.1.2.3
- Index(es):