paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/src/widgets pgwidgetlist.cpp,1.3.6.2,1.3.6.3


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/widgets pgwidgetlist.cpp,1.3.6.2,1.3.6.3
Date: Tue, 21 Jan 2003 10:54:38 -0500

Update of /cvsroot/paragui/paragui/src/widgets
In directory subversions:/tmp/cvs-serv2371/src/widgets

Modified Files:
      Tag: devel-1-0
        pgwidgetlist.cpp 
Log Message:
added PG_WidgetList helper functions:
- int FindIndex(PG_Widget*)
- void PageUp()
- void PageDown()



Index: pgwidgetlist.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/widgets/pgwidgetlist.cpp,v
retrieving revision 1.3.6.2
retrieving revision 1.3.6.3
diff -C2 -r1.3.6.2 -r1.3.6.3
*** pgwidgetlist.cpp    4 Jan 2003 21:13:41 -0000       1.3.6.2
--- pgwidgetlist.cpp    21 Jan 2003 15:54:36 -0000      1.3.6.3
***************
*** 440,443 ****
--- 440,458 ----
  }
  
+ int PG_WidgetList::FindIndex(PG_Widget* w) {
+       int index = 0;
+ 
+       vector < PG_Widget* >::iterator i;
+ 
+       for(i = my_widgetList.begin(); i != my_widgetList.end(); i++) {
+               if((*i) == w) {
+                       return index;
+               }
+               index++;
+       }
+ 
+       return -1;
+ }
+ 
  int PG_WidgetList::GetWidgetCount() {
        return my_widgetCount;
***************
*** 544,546 ****
--- 559,569 ----
  
        ScrollTo(w, direction);
+ }
+ 
+ void PG_WidgetList::PageUp() {
+       ScrollToY(my_internaldata->my_scrolldeltay - my_height );
+ }
+ 
+ void PG_WidgetList::PageDown() {
+       ScrollToY(my_internaldata->my_scrolldeltay + my_height );
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]