// -*-c++-*- //------------------------------------------------------------------------------ // xword - (http://xword.sourceforge.net) // Copyright 2002 Patrick Crosby //------------------------------------------------------------------------------ // Interface.h // // $Id: Interface.h,v 1.5 2002/01/23 19:43:03 pcrosby Exp $ //------------------------------------------------------------------------------ // 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 __Interface__ #define __Interface__ #include #include #include #include #include "Namespace.h" NAMESPACE_OPEN //------------------------------------------------------------------------------ class Puzzle; class GridWidget; class Interface: public Gtk::Window { // Constants // Types // Variables private: Puzzle* m_pPuzzle; GridWidget* m_pGrid; Gtk::Label m_labelTitle; Gtk::Label m_labelAuthor; Gtk::Label m_labelAcross; Gtk::Label m_labelDown; Gtk::Label m_labelAcrossNum; Gtk::Label m_labelDownNum; Gtk::FileSelection m_FileSelection; // Methods public: Interface(); ~Interface(); virtual gint delete_event_impl(GdkEventAny* pEvent); virtual gint key_press_event_impl(GdkEventKey* pEvent); void SetPuzzle(const std::string& strFilename); private: void CursorMoved(); void ButtonOpen(); void ButtonSave(); void ButtonExit(); void ButtonFileOK(); }; //------------------------------------------------------------------------------ NAMESPACE_CLOSE #endif //------------------------------------------------------------------------------