[Plib-cvs] plib/src/puAux puAux.h,1.2,1.3 puAuxComboBox.cxx,1.3,1.4
Brought to you by:
sjbaker
From: Eric L. <smo...@us...> - 2004-09-22 21:09:48
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4602 Modified Files: puAux.h puAuxComboBox.cxx Log Message: John Fay's changes to puAux.h and puAuxComboBox.cxx. Added method puaComboBox::setSize. puaChooser destructor is now virtual. Index: puAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- puAux.h 5 Aug 2004 01:03:49 -0000 1.2 +++ puAux.h 22 Sep 2004 21:09:35 -0000 1.3 @@ -242,6 +242,7 @@ invokeCallback () ; } } + void setCurrentItem ( const char *item_ptr ) ; void setPosition ( int x, int y ) @@ -252,6 +253,8 @@ newList ( list ) ; } + void setSize ( int w, int h ) ; + void draw ( int dx, int dy ) ; int checkHit ( int button, int updown, int x, int y ) ; int checkKey ( int key, int updown ) ; @@ -810,7 +813,7 @@ public: - ~puaChooser () + virtual ~puaChooser () { delete chooser_button ; delete popup_menu ; Index: puAuxComboBox.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxComboBox.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- puAuxComboBox.cxx 21 Mar 2004 19:03:23 -0000 1.3 +++ puAuxComboBox.cxx 22 Sep 2004 21:09:35 -0000 1.4 @@ -269,3 +269,11 @@ newList ( entries ) ; } +void puaComboBox::setSize ( int w, int h ) +{ + int arrow_width = (int) ( float(h) / 1.5f ) ; + input->setSize ( w - arrow_width, h ) ; + arrow_btn->setPosition ( w - arrow_width, 0 ) ; + arrow_btn->setSize ( arrow_width, h ) ; +} + |