paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/test tabbar.cpp,1.3,1.4


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test tabbar.cpp,1.3,1.4
Date: Sun, 28 Apr 2002 12:35:33 -0400

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv2171/test

Modified Files:
        tabbar.cpp 
Log Message:
more work on PG_TabBar, PG_NoteBook
PG_WidgetList fixes
added simple theme gfx



Index: tabbar.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/tabbar.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** tabbar.cpp  28 Apr 2002 09:28:03 -0000      1.3
--- tabbar.cpp  28 Apr 2002 16:35:30 -0000      1.4
***************
*** 6,9 ****
--- 6,11 ----
  #include "pglistbox.h"
  #include "pglistboxitem.h"
+ #include "pgcheckbutton.h"
+ #include "pgwindow.h"
  #include "pglog.h"
  
***************
*** 16,29 ****
--- 18,47 ----
  bool handlePageSelect(PG_NoteBook* notebook, PG_Widget* page) {
        PG_LogMSG("Page with ID '%i' selected.", page->GetID());
+       return true;
  }
  
  bool handlePageButton(PG_Widget* page) {
        PG_LogMSG("handlePageButton()");
+       return true;
  }
  
  bool handlePageCustom(PG_Widget* page) {
        PG_LogMSG("handlePageCustom()");
+       PG_LogMSG("ObjectSurface: %08x", page->GetWidgetSurface());
+       return true;
+ }
+ 
+ bool handleBigFatButton(PG_Button* b) {
+       PG_Window wnd(NULL, PG_Rect(200,200,350,100), "Message");
+       PG_Label l(&wnd, PG_Rect(5,40,340,25), "You pressed the 'Big Fat 
Button'");
+       l.SetAlignment(PG_TA_CENTER);
+       
+       wnd.Show(true);
+       wnd.RunModal();
+       
+       return true;
  }
  
+ 
  int main( int argc, char **argv )
  {
***************
*** 38,42 ****
        l.Show();
        
!       PG_TabBar bar( NULL, PG_Rect(10, 10, 300, 25) );
        bar.sigTabSelect.connect(slot(handleTab), &l);
        bar.Show();
--- 56,60 ----
        l.Show();
        
!       PG_TabBar bar( NULL, PG_Rect(10, 10, 300, 33) );
        bar.sigTabSelect.connect(slot(handleTab), &l);
        bar.Show();
***************
*** 48,52 ****
        bar.AddTab("MoreTab2");
        bar.AddTab("MoreTab3");
!       bar.AddTab("EvelLongerTab1");
        bar.AddTab("Tab4");
        
--- 66,70 ----
        bar.AddTab("MoreTab2");
        bar.AddTab("MoreTab3");
!       bar.AddTab("EvenLongerTab1");
        bar.AddTab("Tab4");
        
***************
*** 55,63 ****
        notebook.sigPageSelect.connect(slot(handlePageSelect));
        
!       notebook.AddPage("button", new PG_Button(NULL, 1, PG_Rect(0,0,10,10), 
"Big fat button"), slot(handlePageButton));
        
        PG_Widget* custom = notebook.CreatePage("custom", 
slot(handlePageCustom));
        custom->SetID(2);
        PG_Label label(custom, PG_Rect(5,5,100,25), "My Page");
        
        PG_ListBox listpage(NULL, PG_Rect(0,0,300,100));
--- 73,85 ----
        notebook.sigPageSelect.connect(slot(handlePageSelect));
        
!       PG_Button b(NULL, 1, PG_Rect(0,0,10,10), "Big fat button");
!       b.sigButtonClick.connect(slot(handleBigFatButton));
!       
!       notebook.AddPage("button", &b, slot(handlePageButton));
        
        PG_Widget* custom = notebook.CreatePage("custom", 
slot(handlePageCustom));
        custom->SetID(2);
        PG_Label label(custom, PG_Rect(5,5,100,25), "My Page");
+       PG_CheckButton check(custom, -1, PG_Rect(5,35,150,25), "Check me");
        
        PG_ListBox listpage(NULL, PG_Rect(0,0,300,100));
***************
*** 75,78 ****
--- 97,109 ----
        
        notebook.AddPage("list", &listpage);
+ 
+       PG_NoteBook subnotebook(NULL, PG_Rect(0,0,100,100));
+       
+       PG_Widget* complex = subnotebook.CreatePage("custom2");
+       PG_Button b2(complex, -1, PG_Rect(10,10,100,25), "Button");
+       
+       subnotebook.AddPage("button2", new PG_Button(NULL, -1,  
PG_Rect(0,0,10,10), "Not so big button"));
+       
+       notebook.AddPage("complex", &subnotebook);
        
        notebook.Show();




reply via email to

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