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 */
|
|
|
|
|
2005-02-05 12:14:56 +01:00
|
|
|
/* $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 {
|
2005-02-05 12:14:56 +01:00
|
|
|
REFRESH,
|
|
|
|
FORCE_REFRESH
|
2004-04-08 11:43:06 +02:00
|
|
|
} refresh_t;
|
|
|
|
|
|
|
|
typedef enum {
|
2005-02-05 12:14:56 +01:00
|
|
|
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:
|
2005-02-05 12:14:56 +01:00
|
|
|
int show;
|
|
|
|
frames_id_t frameid;
|
|
|
|
wxString name, classname;
|
|
|
|
ConfigDB config;
|
2004-04-08 11:43:06 +02:00
|
|
|
|
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
AuxFrame(wxFrame*, int, wxString, wxString);
|
|
|
|
~AuxFrame();
|
2004-04-08 11:43:06 +02:00
|
|
|
|
2005-02-05 12:14:56 +01: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:
|
2005-02-05 12:14:56 +01:00
|
|
|
GfxBoard* board;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
BoardFrame(wxFrame*, Game&);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/** ******************************
|
|
|
|
*
|
|
|
|
****************************** */
|
|
|
|
|
|
|
|
class BagFrame: public AuxFrame
|
|
|
|
{
|
|
|
|
private:
|
2005-02-05 12:14:56 +01:00
|
|
|
Game& m_game;
|
|
|
|
wxListCtrl *tiles;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
BagFrame(wxFrame*, Game&);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/** ******************************
|
|
|
|
*
|
|
|
|
****************************** */
|
|
|
|
|
|
|
|
class SearchFrame: public AuxFrame
|
|
|
|
{
|
|
|
|
private:
|
2005-02-05 12:14:56 +01:00
|
|
|
SearchPanel *panel;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
SearchFrame(wxFrame*, Dictionary);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/** ******************************
|
|
|
|
*
|
|
|
|
****************************** */
|
|
|
|
|
|
|
|
class VerifFrame: public AuxFrame
|
|
|
|
{
|
|
|
|
private:
|
2005-02-05 12:14:56 +01:00
|
|
|
Dictionary dic;
|
|
|
|
wxTextCtrl *word;
|
|
|
|
wxStaticText *result;
|
|
|
|
void verif();
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
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:
|
2005-02-05 12:14:56 +01:00
|
|
|
wxListBox *listbox;
|
|
|
|
wxButton *button;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
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:
|
2005-02-05 12:14:56 +01:00
|
|
|
Game& m_game;
|
|
|
|
string m_rack;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
Plus1Frame(wxFrame*, Game&);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/** ******************************
|
|
|
|
*
|
|
|
|
****************************** */
|
|
|
|
|
|
|
|
class BenjFrame: public AuxFrameList
|
|
|
|
{
|
|
|
|
protected:
|
2005-02-05 12:14:56 +01:00
|
|
|
Game& m_game;
|
|
|
|
wxListCtrl* results;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
BenjFrame(wxFrame*, Game&, wxListCtrl*);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/** ******************************
|
|
|
|
*
|
|
|
|
****************************** */
|
|
|
|
|
|
|
|
class RaccFrame: public AuxFrameList
|
|
|
|
{
|
|
|
|
protected:
|
2005-02-05 12:14:56 +01:00
|
|
|
Game& m_game;
|
|
|
|
wxListCtrl* results;
|
2004-04-08 11:43:06 +02:00
|
|
|
public:
|
2005-02-05 12:14:56 +01:00
|
|
|
RaccFrame(wxFrame*, Game&, wxListCtrl*);
|
|
|
|
void Refresh(refresh_t force = REFRESH);
|
2004-04-08 11:43:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|