-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeckGUI.h
executable file
·30 lines (27 loc) · 931 Bytes
/
DeckGUI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* DeckGUI.h
*
* Loads a series of pixmaps used for displaying the cards, as well as a card back used as a place marker in the
* display when we don't have a card yet to display. Use pixel buffers to share images since widgets cannot be
* shared.
*
* Created by Caroline Kierstead on 25/05/09.
* Copyright 2009 UW. All rights reserved.
*
*/
#ifndef __DECK_GUI_H
#define __DECK_GUI_H
#include <gdkmm/pixbuf.h>
#include <vector>
#include "Card.h"
// Enumerated types to define the face and suit values.
class DeckGUI {
public:
DeckGUI();
virtual ~DeckGUI();
Glib::RefPtr<Gdk::Pixbuf> getCardImage( Rank r, Suit s ); // Returns the image for the specified card.
Glib::RefPtr<Gdk::Pixbuf> getNullCardImage(); // Returns the image to use for the placeholder.
private:
std::vector< Glib::RefPtr< Gdk::Pixbuf > > deck; // Contains the pixel buffer images.
}; // DeckGUI
#endif