eliot/wxwin/auxframes.h

191 lines
4.7 KiB
C
Raw Normal View History

2004-04-08 11:43:06 +02:00
/* Eliot */
/* Copyright (C) 1999 Antoine Fraboulet */
/* Antoine.Fraboulet@free.fr */
/* */
/* 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 */
/* $Id: auxframes.h,v 1.2 2005/02/05 11:14:56 ipkiss Exp $ */
2004-04-08 11:43:06 +02:00
// -*- C++ -*-
#ifndef _AUXFRAMES_H
#define _AUXFRAMES_H
#include "searchpanel.h"
#include "gfxboard.h"
#include "wx/frame.h"
#include "wx/listctrl.h"
#include "wx/textctrl.h"
#include "wx/stattext.h"
#include "wx/listbox.h"
#include "wx/button.h"
#define MIN_FRAME_ID 0
#define MAX_FRAME_ID 7
typedef enum {
REFRESH,
FORCE_REFRESH
2004-04-08 11:43:06 +02:00
} refresh_t;
typedef enum {
ID_Frame_Verif = MIN_FRAME_ID + 0,
ID_Frame_Search = MIN_FRAME_ID + 1,
ID_Frame_Plus1 = MIN_FRAME_ID + 2,
ID_Frame_Racc = MIN_FRAME_ID + 3,
ID_Frame_Benj = MIN_FRAME_ID + 4,
ID_Frame_Bag = MIN_FRAME_ID + 5,
ID_Frame_Board = MIN_FRAME_ID + 6
2004-04-08 11:43:06 +02:00
} frames_id_t;
/** ******************************
*
****************************** */
class AuxFrame: public wxFrame
{
protected:
int show;
frames_id_t frameid;
wxString name, classname;
ConfigDB config;
2004-04-08 11:43:06 +02:00
public:
AuxFrame(wxFrame*, int, wxString, wxString);
~AuxFrame();
2004-04-08 11:43:06 +02:00
void SwitchDisplay();
void Reload();
virtual void Refresh(refresh_t force = REFRESH) {};
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class BoardFrame: public AuxFrame
{
protected:
GfxBoard* board;
2004-04-08 11:43:06 +02:00
public:
BoardFrame(wxFrame*, Game&);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class BagFrame: public AuxFrame
{
private:
Game& m_game;
wxListCtrl *tiles;
2004-04-08 11:43:06 +02:00
public:
BagFrame(wxFrame*, Game&);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class SearchFrame: public AuxFrame
{
private:
SearchPanel *panel;
2004-04-08 11:43:06 +02:00
public:
SearchFrame(wxFrame*, Dictionary);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class VerifFrame: public AuxFrame
{
private:
Dictionary dic;
wxTextCtrl *word;
wxStaticText *result;
void verif();
2004-04-08 11:43:06 +02:00
public:
VerifFrame(wxFrame*, Dictionary);
void OnText(wxCommandEvent& event);
void Refresh(refresh_t force = REFRESH);
DECLARE_EVENT_TABLE()
2004-04-08 11:43:06 +02:00
};
/** **********************************************************
**************************************************************
*********************************************************** */
class AuxFrameList: public AuxFrame
{
protected:
wxListBox *listbox;
wxButton *button;
2004-04-08 11:43:06 +02:00
public:
AuxFrameList(wxFrame*, int, wxString, wxString);
void OnCopy(wxCommandEvent& event);
void Waiting();
DECLARE_EVENT_TABLE()
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class Plus1Frame: public AuxFrameList
{
protected:
Game& m_game;
string m_rack;
2004-04-08 11:43:06 +02:00
public:
Plus1Frame(wxFrame*, Game&);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class BenjFrame: public AuxFrameList
{
protected:
Game& m_game;
wxListCtrl* results;
2004-04-08 11:43:06 +02:00
public:
BenjFrame(wxFrame*, Game&, wxListCtrl*);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
/** ******************************
*
****************************** */
class RaccFrame: public AuxFrameList
{
protected:
Game& m_game;
wxListCtrl* results;
2004-04-08 11:43:06 +02:00
public:
RaccFrame(wxFrame*, Game&, wxListCtrl*);
void Refresh(refresh_t force = REFRESH);
2004-04-08 11:43:06 +02:00
};
#endif