libgnomeuimm
2.28.0
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
libgnomeui
libgnomeuimm
ui-items-icon.h
Go to the documentation of this file.
1
// $Id$ -*- c++ -*-
2
/*
3
* Copyright 2000-2002 The libgnomeuimm development team
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free
17
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
*
19
*/
20
21
22
#ifndef LIBGNOMEUIMM_ICON_H
23
#define LIBGNOMEUIMM_ICON_H
24
25
#include <gtkmm/stockid.h>
26
#include <libgnomeui/gnome-app-helper.h>
27
28
namespace
Gnome
29
{
30
31
namespace
UI
32
{
33
34
namespace
Items
35
{
36
38
class
Icon
39
{
40
public
:
41
enum
Type
42
{
43
NONE
= GNOME_APP_PIXMAP_NONE,
44
STOCK
= GNOME_APP_PIXMAP_STOCK,
45
DATA
= GNOME_APP_PIXMAP_DATA,
46
FILENAME
= GNOME_APP_PIXMAP_FILENAME
47
};
48
49
explicit
Icon
(
const
Gtk::StockID& stock_id);
50
Icon
(
Type
type =
NONE
);
51
~Icon
();
52
53
Type
get_type
()
const
;
54
gconstpointer
get_pixmap_info
()
const
;
//This Icon must live as long as you need to use this data.
55
56
protected
:
57
58
Type
pixmap_type_
;
59
typedef
const
char
*
const
*
const
xpmdata_t
;
60
61
//Only one of these will have a value:
62
gconstpointer
xpm_data_
;
63
Glib::ustring
stock_id_
;
//There's no Gtk::StockID default constructor.
64
std::string
filename_
;
65
};
66
67
class
IconXpm
:
public
Icon
68
{
69
public
:
70
IconXpm
(
xpmdata_t
xpm);
71
~IconXpm
();
72
};
73
74
class
IconFile
:
public
Icon
75
{
76
public
:
77
IconFile
(
const
std::string& file);
78
~IconFile
();
79
};
80
81
}
// namespace Items
82
}
// namespace UI
83
}
// namespace Gnome
84
85
86
87
#endif //LIBGNOMEUIMM_ICON_H
Generated on Sat Jan 12 2013 12:50:49 for libgnomeuimm by
1.8.3