///////////////////////////////////////////////////////////////////////////// // Name: tablepic.h // tag: table pic header // Author: David Roundy // Modified by: // Created: Feb 29 2002 // Copyright: (c) 2002 David Roundy // Licence: GPL /* 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; either version 2 of the License, or (at your option) any later version. 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 _TABLEPIC_H_ #define _TABLEPIC_H_ //----------------------------------------// // A class which displays the player name // //----------------------------------------// class TablePic : public wxPanel { public: TablePic(wxWindow* parent, const wxString &name, int x=0, int y=0); ~TablePic(); virtual void OnDraw(wxDC& dc); void SetTalkFocus(wxFocusEvent& evt); void ButtonPush(wxCommandEvent& evt); void SitNorth(wxCommandEvent& evt); void SitSouth(wxCommandEvent& evt); void SitEast(wxCommandEvent& evt); void SitWest(wxCommandEvent& evt); void SetTopic(const wxString &topic); void Sit(const wxString &seat, const wxString &player); void Stand(const wxString &seat); void JoinTable(); void LeaveTable(); void SendEvent(const wxString &type, const wxString &msg); wxSize GetBestSize(); DECLARE_EVENT_TABLE() private: enum { PUSH_BUTTON_ID, SIT_NORTH, SIT_SOUTH, SIT_EAST, SIT_WEST }; wxString m_name; wxStaticText *m_name_label; wxStaticText *m_players[4]; wxButton *m_button; wxButton *m_sit_buttons[4]; }; // declare our list class. WX_DECLARE_LIST(TablePic, TablePicList); #endif // _TABLEPIC_H_