NCBI C++ ToolKit
fileartprov.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef _WX_FILEARTPROV_H_
2 #define _WX_FILEARTPROV_H_
3 
4 /* $Id: fileartprov.hpp 17877 2008-09-24 13:03:09Z dicuccio $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Yury Voronov
30  *
31  * File Description: File is supposed to be submitted to wxWidgets main library,
32  * that is why it is written with use of wxWidgets modules only, and in wxWidgets
33  * naming and coding conventions.
34  *
35  */
36 #include <gui/gui.hpp>
37 
38 #include <wx/artprov.h>
39 #include <wx/dir.h>
40 
41 // ----------------------------------------------------------------------------
42 // custom art provider
43 // ----------------------------------------------------------------------------
44 
47 
48 class NCBI_GUIWIDGETS_WX_EXPORT wxFileArtProvider : public wxArtProvider
49 {
50 public:
52  virtual ~wxFileArtProvider();
53 
54  void RegisterImageAlias(const wxArtID& anId,
55  const wxArtClient& aClient,
56  const wxSize& aSize,
57  const wxImage& anImage);
58 
59  int AddDirectory(wxString aDirName);
60 
61  virtual void RegisterFileAlias(const wxArtID& anId,
62  const wxArtClient& aClient,
63  const wxSize& aSize,
64  const wxString& aName,
65  long aType = wxBITMAP_TYPE_ANY,
66  int anIndex = -1);
67 
68  void RegisterFileAlias(const wxArtID& anId,
69  const wxArtClient& aClient,
70  const wxString& aName,
71  long aType = wxBITMAP_TYPE_ANY,
72  int anIndex = -1)
73  {
74  RegisterFileAlias( anId, aClient, wxDefaultSize, aName, aType, anIndex );
75  }
76  void RegisterFileAlias(const wxArtID& anId,
77  const wxString& aName,
78  long aType = wxBITMAP_TYPE_ANY,
79  int anIndex = -1)
80  {
81  RegisterFileAlias( anId, wxART_OTHER, aName, aType, anIndex );
82  }
83 
84  void RemoveAlias(const wxArtID& anId,
85  const wxArtClient& aClient = wxART_OTHER,
86  const wxSize& aSize = wxDefaultSize);
87 
88 protected:
89  virtual wxBitmap CreateBitmap(
90  const wxArtID& id, const wxArtClient& client, const wxSize& size
91  );
92 
93 private:
96 
97  DECLARE_DYNAMIC_CLASS(wxFileArtProvider)
98 
99 };
100 
101 #endif // _WX_FILEARTPROV_H_
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
void RegisterFileAlias(const wxArtID &anId, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
Definition: fileartprov.hpp:76
wxFileArtDirNameSet * m_DirNameSet
Definition: fileartprov.hpp:95
wxFileArtNameAndImageCache * m_nameCache
Definition: fileartprov.hpp:94
void RegisterImageAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxImage &anImage)
void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
Definition: fileartprov.hpp:68
#define NCBI_GUIWIDGETS_WX_EXPORT
Definition: gui_export.h:543
const struct ncbi::grid::netcache::search::fields::SIZE size
static CNamedPipeClient * client
Modified on Wed Apr 17 13:10:42 2024 by modify_doxy.py rev. 669887