/usr/include/wx-3.0/wx/iconbndl.h is in wx3.0-headers 3.0.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | ///////////////////////////////////////////////////////////////////////////////
// Name: wx/iconbndl.h
// Purpose: wxIconBundle
// Author: Mattia barbon
// Modified by:
// Created: 23.03.02
// Copyright: (c) Mattia Barbon
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ICONBNDL_H_
#define _WX_ICONBNDL_H_
#include "wx/gdiobj.h"
#include "wx/gdicmn.h" // for wxSize
#include "wx/icon.h"
#include "wx/dynarray.h"
class WXDLLIMPEXP_FWD_BASE wxInputStream;
WX_DECLARE_EXPORTED_OBJARRAY(wxIcon, wxIconArray);
// this class can't load bitmaps of type wxBITMAP_TYPE_ICO_RESOURCE,
// if you need them, you have to load them manually and call
// wxIconCollection::AddIcon
class WXDLLIMPEXP_CORE wxIconBundle : public wxGDIObject
{
public:
// Flags that determine what happens if GetIcon() doesn't find the icon of
// exactly the requested size.
enum
{
// Return invalid icon if exact size is not found.
FALLBACK_NONE = 0,
// Return the icon of the system icon size if exact size is not found.
// May be combined with other non-NONE enum elements to determine what
// happens if the system icon size is not found neither.
FALLBACK_SYSTEM = 1,
// Return the icon of closest larger size or, if there is no icon of
// larger size in the bundle, the closest icon of smaller size.
FALLBACK_NEAREST_LARGER = 2
};
// default constructor
wxIconBundle();
// initializes the bundle with the icon(s) found in the file
#if wxUSE_STREAMS && wxUSE_IMAGE
#if wxUSE_FFILE || wxUSE_FILE
wxIconBundle(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
#endif // wxUSE_FFILE || wxUSE_FILE
wxIconBundle(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
#endif // wxUSE_STREAMS && wxUSE_IMAGE
// initializes the bundle with a single icon
wxIconBundle(const wxIcon& icon);
// default copy ctor and assignment operator are OK
// adds all the icons contained in the file to the collection,
// if the collection already contains icons with the same
// width and height, they are replaced
#if wxUSE_STREAMS && wxUSE_IMAGE
#if wxUSE_FFILE || wxUSE_FILE
void AddIcon(const wxString& file, wxBitmapType type = wxBITMAP_TYPE_ANY);
#endif // wxUSE_FFILE || wxUSE_FILE
void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
#endif // wxUSE_STREAMS && wxUSE_IMAGE
// adds the icon to the collection, if the collection already
// contains an icon with the same width and height, it is
// replaced
void AddIcon(const wxIcon& icon);
// returns the icon with the given size; if no such icon exists,
// behavior is specified by the flags.
wxIcon GetIcon(const wxSize& size, int flags = FALLBACK_SYSTEM) const;
// equivalent to GetIcon(wxSize(size, size))
wxIcon GetIcon(wxCoord size = wxDefaultCoord,
int flags = FALLBACK_SYSTEM) const
{ return GetIcon(wxSize(size, size), flags); }
// returns the icon exactly of the specified size or wxNullIcon if no icon
// of exactly given size are available
wxIcon GetIconOfExactSize(const wxSize& size) const;
wxIcon GetIconOfExactSize(wxCoord size) const
{ return GetIconOfExactSize(wxSize(size, size)); }
// enumerate all icons in the bundle: don't use these functions if ti can
// be avoided, using GetIcon() directly is better
// return the number of available icons
size_t GetIconCount() const;
// return the icon at index (must be < GetIconCount())
wxIcon GetIconByIndex(size_t n) const;
// check if we have any icons at all
bool IsEmpty() const { return GetIconCount() == 0; }
#if WXWIN_COMPATIBILITY_2_8
#if wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
wxDEPRECATED( void AddIcon(const wxString& file, long type)
{
AddIcon(file, (wxBitmapType)type);
}
)
wxDEPRECATED_CONSTRUCTOR( wxIconBundle (const wxString& file, long type)
{
AddIcon(file, (wxBitmapType)type);
}
)
#endif // wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
#endif // WXWIN_COMPATIBILITY_2_8
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
private:
// delete all icons
void DeleteIcons();
DECLARE_DYNAMIC_CLASS(wxIconBundle)
};
#endif // _WX_ICONBNDL_H_
|