[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.3.6.2,1.3.6.3 pgla
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.3.6.2,1.3.6.3 pglabel.cpp,1.3,1.3.6.1 pglistbox.cpp,1.3.6.3,1.3.6.4 pgradiobutton.cpp,1.3.6.3,1.3.6.4 pgrichedit.cpp,1.3.6.6,1.3.6.7 pgwidgetlist.cpp,1.3.6.8,1.3.6.9 pgwindow.cpp,1.3.6.8,1.3.6.9 |
Date: |
Sun, 29 Jun 2003 13:09:51 -0400 |
Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv31054/src/widgets
Modified Files:
Tag: devel-1-0
pgbutton.cpp pglabel.cpp pglistbox.cpp pgradiobutton.cpp
pgrichedit.cpp pgwidgetlist.cpp pgwindow.cpp
Log Message:
applied patches from H. C. <address@hidden>:
- fixed a thing that would hide a PG_Window's icon when one selected to use
the minimize button (this problem was introduced by me, sorry)
- added GetListWidth() and GetListHeight() to PG_WidgetList
- added GetIcon(Uint8 num) to PG_Button (num has to be either 0, 1 or 2 - it
represents the different images for iconup, icondown and iconover)
- added GetIcon() to PG_Label
- added GetSelectedIndex() and GetSelectedItems(...) to PG_ListBox
- modified SetSizeByText(...) in PG_RadioButton to make it work properly
- added reference to namespace "std" in PG_RectList to fix a VC7 build error
- added SetTabSize(...) to PG_RichEdit
Index: pgbutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgbutton.cpp,v
retrieving revision 1.3.6.2
retrieving revision 1.3.6.3
diff -C2 -r1.3.6.2 -r1.3.6.3
*** pgbutton.cpp 25 Jan 2003 16:32:12 -0000 1.3.6.2
--- pgbutton.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.3
***************
*** 455,458 ****
--- 455,465 ----
}
+ SDL_Surface* PG_Button::GetIcon(Uint8 num) {
+ if (num > 2)
+ return 0;
+
+ return my_internaldata->srf_icon[num];
+ }
+
/** */
void PG_Button::SetBorderSize(int norm, int pressed, int high) {
Index: pglabel.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglabel.cpp,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -C2 -r1.3 -r1.3.6.1
*** pglabel.cpp 15 Apr 2002 13:35:36 -0000 1.3
--- pglabel.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.1
***************
*** 153,156 ****
--- 153,160 ----
}
+ SDL_Surface* PG_Label::GetIcon() {
+ return my_srfIcon;
+ }
+
void PG_Label::SetIndent(int indent) {
my_indent = indent;
Index: pglistbox.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pglistbox.cpp,v
retrieving revision 1.3.6.3
retrieving revision 1.3.6.4
diff -C2 -r1.3.6.3 -r1.3.6.4
*** pglistbox.cpp 10 Jun 2002 16:44:06 -0000 1.3.6.3
--- pglistbox.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.4
***************
*** 160,161 ****
--- 160,170 ----
item->Select();
}
+
+ int PG_ListBox::GetSelectedIndex() {
+ return my_selectindex;
+ }
+
+ void PG_ListBox::GetSelectedItems(std::vector<PG_ListBoxBaseItem*>& items) {
+ for (Uint16 i = 0; i < GetWidgetCount(); ++i)
+ items.push_back((PG_ListBoxBaseItem*)FindWidget(i));
+ }
Index: pgradiobutton.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgradiobutton.cpp,v
retrieving revision 1.3.6.3
retrieving revision 1.3.6.4
diff -C2 -r1.3.6.3 -r1.3.6.4
*** pgradiobutton.cpp 7 Apr 2003 22:28:18 -0000 1.3.6.3
--- pgradiobutton.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.4
***************
*** 188,189 ****
--- 188,207 ----
my_widgetLabel->SetFontColor(Color);
}
+
+ void PG_RadioButton::SetSizeByText(int Width, int Height, const char *Text) {
+ Uint16 w,h;
+ int baselineY;
+
+ if (Text == NULL) {
+ Text = my_widgetLabel->GetText();
+ }
+
+ if (my_width == 0 && Width == 0 && Height == 0)
+ {
+ if (!PG_FontEngine::GetTextSize(Text, GetFont(), &w, &h,
&baselineY)) {
+ return;
+ }
+
+ my_width = my_widgetButton->my_width + w;
+ }
+ }
Index: pgrichedit.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgrichedit.cpp,v
retrieving revision 1.3.6.6
retrieving revision 1.3.6.7
diff -C2 -r1.3.6.6 -r1.3.6.7
*** pgrichedit.cpp 5 Apr 2003 14:48:33 -0000 1.3.6.6
--- pgrichedit.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.7
***************
*** 597,598 ****
--- 597,602 ----
return true;
}
+
+ void PG_RichEdit::SetTabSize(Uint32 tabSize) {
+ my_TabSize = tabSize;
+ }
Index: pgwidgetlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlist.cpp,v
retrieving revision 1.3.6.8
retrieving revision 1.3.6.9
diff -C2 -r1.3.6.8 -r1.3.6.9
*** pgwidgetlist.cpp 23 May 2003 08:17:52 -0000 1.3.6.8
--- pgwidgetlist.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.9
***************
*** 599,600 ****
--- 599,608 ----
ScrollToY(my_internaldata->my_scrolldeltay + my_height );
}
+
+ Uint32 PG_WidgetList::GetListWidth() {
+ return my_listwidth;
+ }
+
+ Uint32 PG_WidgetList::GetListHeight() {
+ return my_listheight;
+ }
Index: pgwindow.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwindow.cpp,v
retrieving revision 1.3.6.8
retrieving revision 1.3.6.9
diff -C2 -r1.3.6.8 -r1.3.6.9
*** pgwindow.cpp 17 Apr 2003 08:28:50 -0000 1.3.6.8
--- pgwindow.cpp 29 Jun 2003 17:09:49 -0000 1.3.6.9
***************
*** 250,260 ****
}
! void PG_Window::SetIcon(const char* filename)
! {
my_labelTitle->SetIcon(filename);
}
! void PG_Window::SetIcon(SDL_Surface* icon)
! {
my_labelTitle->SetIcon(icon);
}
--- 250,262 ----
}
! void PG_Window::SetIcon(const char* filename) {
! if (my_buttonMinimize)
! my_labelTitle->SetIndent(my_buttonMinimize->my_width);
my_labelTitle->SetIcon(filename);
}
! void PG_Window::SetIcon(SDL_Surface* icon) {
! if (my_buttonMinimize)
! my_labelTitle->SetIndent(my_buttonMinimize->my_width);
my_labelTitle->SetIcon(icon);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/widgets pgbutton.cpp,1.3.6.2,1.3.6.3 pglabel.cpp,1.3,1.3.6.1 pglistbox.cpp,1.3.6.3,1.3.6.4 pgradiobutton.cpp,1.3.6.3,1.3.6.4 pgrichedit.cpp,1.3.6.6,1.3.6.7 pgwidgetlist.cpp,1.3.6.8,1.3.6.9 pgwindow.cpp,1.3.6.8,1.3.6.9,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/test windowresize.cpp,1.1,1.1.6.1
- Next by Date:
[paragui-cvs] CVS: paragui/include pgbutton.h,1.3.6.1,1.3.6.2 pglabel.h,1.3.6.1,1.3.6.2 pglistbox.h,1.3.6.1,1.3.6.2 pgradiobutton.h,1.3.6.2,1.3.6.3 pgrectlist.h,1.3.6.2,1.3.6.3 pgrichedit.h,1.3.6.3,1.3.6.4 pgwidgetlist.h,1.3.6.2,1.3.6.3
- Previous by thread:
[paragui-cvs] CVS: paragui/test windowresize.cpp,1.1,1.1.6.1
- Next by thread:
[paragui-cvs] CVS: paragui/include pgbutton.h,1.3.6.1,1.3.6.2 pglabel.h,1.3.6.1,1.3.6.2 pglistbox.h,1.3.6.1,1.3.6.2 pgradiobutton.h,1.3.6.2,1.3.6.3 pgrectlist.h,1.3.6.2,1.3.6.3 pgrichedit.h,1.3.6.3,1.3.6.4 pgwidgetlist.h,1.3.6.2,1.3.6.3
- Index(es):