[Plib-cvs] plib/src/puAux puAux.h,1.6,1.7 puAuxComboBox.cxx,1.4,1.5
Brought to you by:
sjbaker
From: John F. F. <fa...@us...> - 2005-05-06 19:04:45
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2489 Modified Files: puAux.h puAuxComboBox.cxx Log Message: Extensive changes to the \"puaComboBox\" widget to get it to work properly ... let me know if it doesn\'t do what you think it should. Index: puAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- puAux.h 6 May 2005 19:00:35 -0000 1.6 +++ puAux.h 6 May 2005 19:04:32 -0000 1.7 @@ -140,20 +140,20 @@ UL_TYPE_DATA protected: - int num_lines ; // Number of lines of text in the box - int lines_in_window ; // Number of lines showing in the window - int top_line_in_window ; // Number of the first line in the window - float max_width ; // Width of longest line of text in box, in pixels + int num_lines ; // Number of lines of text in the box + int lines_in_window ; // Number of lines showing in the window + int top_line_in_window ; // Number of the first line in the window + float max_width ; // Width of longest line of text in box, in pixels [...78 lines suppressed...] + delete [] list ; + } } ; @@ -836,6 +861,7 @@ static void menuCleanup ( puObject * ) ; } ; + /** * A scrolling list for PUI. * @@ -866,6 +892,5 @@ virtual int getListIntegerValue(); }; - #endif Index: puAuxComboBox.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxComboBox.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- puAuxComboBox.cxx 22 Sep 2004 21:09:35 -0000 1.4 +++ puAuxComboBox.cxx 6 May 2005 19:04:32 -0000 1.5 @@ -27,10 +27,33 @@ UL_RTTI_DEF1(puaComboBox,puGroup) +void puaComboBox::input_cb ( puObject *inp ) +{ + puaComboBox *cbox = (puaComboBox *) inp -> getUserData () ; + + if ( strcmp ( inp->getStringValue (), cbox->getStringValue () ) ) + { + cbox->update_current_item () ; + cbox->setCallbackSource ( PUACOMBOBOX_CALLBACK_INPUT ) ; [...175 lines suppressed...] /* Share 'string' value with input box */ input -> getValue ( &stringval ) ; - setValuator ( stringval ) ; +// setValuator ( stringval ) ; arrow_btn = new puArrowButton ( maxx-minx - arrow_width, 0, maxx-minx, maxy-miny, @@ -266,7 +341,12 @@ close () ; + list = NULL ; + curr_item = 0 ; + num_items = 0 ; + callback_source = PUACOMBOBOX_CALLBACK_NONE ; newList ( entries ) ; + update_widgets () ; } void puaComboBox::setSize ( int w, int h ) |