From: Andrew C. <ac...@us...> - 2003-07-03 19:11:51
|
Update of /cvsroot/planeshift/planeshift/src/client/paws In directory sc8-pr-cvs1:/tmp/cvs-serv29748/src/client/paws Modified Files: pawslistbox.h pawsradio.cpp pawsradio.h pawstextbox.h pawswidget.h Log Message: Some clean up of some widgets Index: pawslistbox.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/paws/pawslistbox.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pawslistbox.h 3 Jul 2003 00:17:31 -0000 1.2 --- pawslistbox.h 3 Jul 2003 19:11:48 -0000 1.3 *************** *** 28,36 **** class pawsScrollBar; ! /** Defines the structure of the list box table. */ struct ColumnDef { ! csString factory; int width; int height; --- 28,40 ---- class pawsScrollBar; ! //--------------------------------------------------------------------------- ! ! /** Defines the structure of the list box table. ! * This describes how a column is defined. The height should be constant across ! * all the columns for a particular table. */ struct ColumnDef { ! csString factory; int width; int height; *************** *** 38,41 **** --- 42,49 ---- }; + + //--------------------------------------------------------------------------- + + /** A List Box Row. * This is just a container of widgets that represent a list box record. *************** *** 55,58 **** --- 63,67 ---- private: + /// Store a list of columns for easy access. csPArray<pawsWidget> columns; *************** *** 76,79 **** --- 85,90 ---- pawsListBoxRow* GetSelectedRow(); + /** Get a particular row. + */ pawsListBoxRow* GetRow( int x ); Index: pawsradio.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/paws/pawsradio.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pawsradio.cpp 22 Jun 2003 23:32:33 -0000 1.1 --- pawsradio.cpp 3 Jul 2003 19:11:48 -0000 1.2 *************** *** 1,2 **** --- 1,20 ---- + /* + * pawsradio.cpp - Author: Andrew Craig + * + * Copyright (C) 2003 PlaneShift Team (in...@pl..., + * http://www.planeshift.it) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation (version 2 of the License) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ #include <config.h> *************** *** 39,42 **** --- 57,80 ---- } + //-------------------------------------------------------- + + void pawsRadioButtonGroup::SetActive( const char* widgetName ) + { + pawsWidget* widget = FindWidget( widgetName ); + + for ( int x=0; x<children.Length(); x++ ) + { + csString factory = csString(children[x]->GetType()); + if ( factory == "pawsRadioButton" ) + { + pawsRadioButton* radButton = (pawsRadioButton*)children[x]; + + if ( radButton == widget ) + radButton->SetState( true ); + else + radButton->SetState( false ); + } + } + } Index: pawsradio.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/paws/pawsradio.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pawsradio.h 22 Jun 2003 23:32:33 -0000 1.1 --- pawsradio.h 3 Jul 2003 19:11:48 -0000 1.2 *************** *** 1,7 **** --- 1,29 ---- + /* + * pawsradio.h - Author: Andrew Craig + * + * Copyright (C) 2003 PlaneShift Team (in...@pl..., + * http://www.planeshift.it) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation (version 2 of the License) + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ #ifndef PAWS_RADIOBUTTON_HEADER #define PAWS_RADIOBUTTON_HEADER + #include "pawsbutton.h" + + /** A simple PAWS radio button. + */ class pawsRadioButton : public pawsButton { *************** *** 14,17 **** --- 36,40 ---- }; + class pawsRadioButtonFactory : public pawsWidgetFactory { *************** *** 29,33 **** --- 52,59 ---- }; + //--------------------------------------------------------------------------- + /** This is a set of radio buttons and is used to control them. + */ class pawsRadioButtonGroup : public pawsWidget { *************** *** 37,43 **** bool OnButtonPressed(int mouseButton, pawsWidget* widget ); ! }; - --- 63,68 ---- bool OnButtonPressed(int mouseButton, pawsWidget* widget ); ! void SetActive( const char* widgetName ); }; Index: pawstextbox.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/paws/pawstextbox.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pawstextbox.h 9 Jun 2003 21:55:43 -0000 1.6 --- pawstextbox.h 3 Jul 2003 19:11:48 -0000 1.7 *************** *** 48,51 **** --- 48,52 ---- void SetText( const char* text ); + const char* GetText() { return text; } void Adjust ( Adjust value ) { adjust = value; } Index: pawswidget.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/paws/pawswidget.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pawswidget.h 2 Jul 2003 23:00:23 -0000 1.14 --- pawswidget.h 3 Jul 2003 19:11:48 -0000 1.15 *************** *** 306,309 **** --- 306,311 ---- //------------------------------------------------------------ + + class pawsWidgetFactory { *************** *** 322,325 **** --- 324,329 ---- psPawsManager* mainManager; }; + + //--------------------------------------------------------------------------- class pawsBaseWidgetFactory : public pawsWidgetFactory |