Ocean
WxStaticBitmap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_PLATFORM_WXWIDGETS_WX_STATIC_BITMAP_H
9 #define META_OCEAN_PLATFORM_WXWIDGETS_WX_STATIC_BITMAP_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Platform
17 {
18 
19 namespace WxWidgets
20 {
21 
22 /**
23  * This class implements a static bitmap.
24  * @ingroup platformwxwidgets
25  */
26 class OCEAN_PLATFORM_WXWIDGETS_EXPORT WxStaticBitmap : public wxStaticBitmap
27 {
28  public:
29 
30  /**
31  * Creates a new static bitmap.
32  * @param parent The parent window, may be nullptr
33  * @param id The id of the new static bitmap
34  * @param bitmap The bitmap of the new static bitmap
35  * @param pos Horizontal and vertical position of the new static bitmap, in pixel with range (-infinity, infinity)x(-infinity, infinity)
36  * @param size The width and height of the new static bitmap, in pixel with range [0, infinity)x[0, infinity)
37  * @param style The style of the new static bitmap
38  * @param name The optional name of the new static bitmap
39  */
40  WxStaticBitmap(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxStaticBitmapNameStr);
41 
42  /**
43  * Sets the bitmap of this static bitmap.
44  * @param bitmap The bitmap to set
45  */
46 #if wxMAJOR_VERSION >= 3 && wxMINOR_VERSION >= 2 && wxRELEASE_NUMBER >= 4
47  void SetBitmap(const wxBitmapBundle& bitmap) override;
48 #else
49  void SetBitmap(const wxBitmap& bitmap) override;
50 #endif
51  /**
52  * Returns false to not use a transparent background.
53  * @return Always false
54  */
55  bool HasTransparentBackground() override;
56 };
57 
58 }
59 
60 }
61 
62 }
63 
64 #endif // META_OCEAN_PLATFORM_WXWIDGETS_WX_STATIC_BITMAP_H
This class implements a static bitmap.
Definition: WxStaticBitmap.h:27
void SetBitmap(const wxBitmap &bitmap) override
WxStaticBitmap(wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxStaticBitmapNameStr)
Creates a new static bitmap.
void SetBitmap(const wxBitmapBundle &bitmap) override
Sets the bitmap of this static bitmap.
bool HasTransparentBackground() override
Returns false to not use a transparent background.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15