/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/iconbndl.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/iconbndl.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 2346 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/iconbndl.h
3 // Purpose: wxIconBundle
4 // Author: Mattia barbon
5 // Modified by:
6 // Created: 23.03.02
7 // RCS-ID: $Id: iconbndl.h 49563 2007-10-31 20:46:21Z VZ $
8 // Copyright: (c) Mattia Barbon
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_ICONBNDL_H_
13 #define _WX_ICONBNDL_H_
14
15 #include "wx/dynarray.h"
16 // for wxSize
17 #include "wx/gdicmn.h"
18
19 class WXDLLIMPEXP_FWD_CORE wxIcon;
20 class WXDLLIMPEXP_FWD_BASE wxString;
21
22 WX_DECLARE_EXPORTED_OBJARRAY( wxIcon, wxIconArray );
23
24 // this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE,
25 // if you need them, you have to load them manually and call
26 // wxIconCollection::AddIcon
27 class WXDLLEXPORT wxIconBundle
28 {
29 public:
30 // default constructor
31 wxIconBundle() : m_icons() {}
32 // initializes the bundle with the icon(s) found in the file
33 wxIconBundle( const wxString& file, long type ) : m_icons()
34 { AddIcon( file, type ); }
35 // initializes the bundle with a single icon
36 wxIconBundle( const wxIcon& icon ) : m_icons()
37 { AddIcon( icon ); }
38
39 const wxIconBundle& operator =( const wxIconBundle& ic );
40 wxIconBundle( const wxIconBundle& ic ) : m_icons()
41 { *this = ic; }
42
43 ~wxIconBundle() { DeleteIcons(); }
44
45 // adds all the icons contained in the file to the collection,
46 // if the collection already contains icons with the same
47 // width and height, they are replaced
48 void AddIcon( const wxString& file, long type );
49 // adds the icon to the collection, if the collection already
50 // contains an icon with the same width and height, it is
51 // replaced
52 void AddIcon( const wxIcon& icon );
53
54 // returns the icon with the given size; if no such icon exists,
55 // returns the icon with size wxSYS_ICON_[XY]; if no such icon exists,
56 // returns the first icon in the bundle
57 const wxIcon& GetIcon( const wxSize& size ) const;
58 // equivalent to GetIcon( wxSize( size, size ) )
59 const wxIcon& GetIcon( wxCoord size = wxDefaultCoord ) const
60 { return GetIcon( wxSize( size, size ) ); }
61 private:
62 // delete all icons
63 void DeleteIcons();
64 public:
65 wxIconArray m_icons;
66 };
67
68 #endif
69 // _WX_ICONBNDL_H_

  ViewVC Help
Powered by ViewVC 1.1.22