⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scoredlg.h

📁 一个扑克牌游戏集合的源码,包含了很多基本c-c++语言应用
💻 H
字号:
#ifndef SCOREDLG_H#define SCOREDLG_H//$Id: ScoreDlg.h,v 1.12 2003/11/15 03:56:26 markus Rel $// 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.#include <vector>#include <YGP/ANumeric.h>#include <YGP/SmartPtr.h>#include <XGP/XDialog.h>#include <XGP/XAttrLabel.h>namespace Gtk {   class HBox;   class Label;   class Widget;   class Separator;}class Player;// Class to display the score of the cardgamesclass ScoreDlg : public XGP::XDialog { public:   ScoreDlg (const std::vector<Player*>& player);   virtual ~ScoreDlg ();   static ScoreDlg* create (const std::vector<Player*>& player) {      return new ScoreDlg (player); }   void update (const std::vector<Player*>& player);   void addPoints (int aPoints[]);   void addPoints (const std::vector<int>& aPoints);   void getMaxPoints (int& points, unsigned int& player);   void getMinPoints (int& points, unsigned int& player); private:   //Prohibited manager functions   ScoreDlg (const ScoreDlg& other);   const ScoreDlg& operator= (const ScoreDlg& other);   virtual void okEvent ();   typedef YGP::SmartPtr<Gtk::Box>        PBox;   typedef YGP::SmartPtr<Gtk::Label>      PLabel;   typedef YGP::SmartPtr<Gtk::Separator>  PSeparator;   PBox client;   class column {    public:      column ();      ~column ();      void addEntry (int points);      void setTitle (const Glib::ustring& title);      int getPoints () const { return pSum->getAttribute (); }      Gtk::Box& getBox () const { return *pBox; }    private:      typedef XGP::XAttributeLabel2<YGP::ANumeric> NumLabel;      typedef YGP::SmartPtr<NumLabel>              PNumLabel;      PBox       pBox;      PLabel     pTitle;      PNumLabel  pSum;      PSeparator pSep;   };   std::vector<column*> aColumns;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -