00001 /* 00002 ParaGUI - crossplatform widgetset 00003 Copyright (C) 2000,2001,2002 Alexander Pipelka 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 Alexander Pipelka 00020 pipelka@teleweb.at 00021 00022 Last Update: $Author: mbickel $ 00023 Update Date: $Date: 2007-04-13 16:15:56 $ 00024 Source File: $Source: /home/cvspsrv/cvsroot/games/asc/source/libs/paragui/include/pglistboxbaseitem.h,v $ 00025 CVS/RCS Revision: $Revision: 1.2 $ 00026 Status: $State: Exp $ 00027 */ 00028 00029 #ifndef PG_LISTBOXBASEITEM_H 00030 #define PG_LISTBOXBASEITEM_H 00031 00032 #include "pglabel.h" 00033 00044 class PG_ListBox; 00045 00046 class DECLSPEC PG_ListBoxBaseItem : public PG_Label { 00047 public: 00048 00050 PG_ListBoxBaseItem(PG_Widget* parent, Uint16 height, void* userdata = NULL); 00051 00053 ~PG_ListBoxBaseItem(); 00054 00056 void SetUserData(void* userdata); 00057 00059 void* GetUserData(); 00060 00062 bool IsSelected(); 00063 00065 void Select(bool select = true); 00066 00068 PG_ListBox* GetParent(); 00069 00070 protected: 00071 00072 void eventSizeWidget(Uint16 w, Uint16 h); 00073 00075 void eventMouseEnter(); 00076 00078 void eventMouseLeave(); 00079 00081 bool eventMouseButtonUp (const SDL_MouseButtonEvent* button); 00082 00084 void eventHide(); 00085 00086 void* my_userdata; 00087 00088 bool my_selected; 00089 00090 bool my_hover; 00091 00092 }; 00093 00094 #endif // PG_LISTBOXBASEITEM_H
1.4.2