|
FifeGUI 0.2.0
A C++ GUI library designed for games.
|
#include <imagebutton.hpp>
Public Types | |
| enum class | ImageType : uint8_t { Up = 0 , Down = 1 , Hover = 2 , Up_Inactive = 3 , Down_Inactive = 4 , Hover_Inactive = 5 } |
| Public Types inherited from fcn::Widget | |
| enum class | SelectionMode : uint8_t { None = 0 , Border = 1 , Background = 2 } |
Public Member Functions | |
| void | adjustSize () override |
| void | draw (fcn::Graphics *graphics) override |
| Image const * | getDownImage () const |
| Image const * | getHoverImage () const |
| Image const * | getInactiveDownImage () const |
| Image const * | getInactiveHoverImage () const |
| Image const * | getInactiveUpImage () const |
| Image const * | getUpImage () const |
| ImageButton (Image const *image) | |
| ImageButton (ImageButton &&)=delete | |
| ImageButton (ImageButton const &)=delete | |
| ImageButton (std::string const &filename) | |
| ImageButton & | operator= (ImageButton &&)=delete |
| ImageButton & | operator= (ImageButton const &)=delete |
| void | resizeToContent (bool recursion) override |
| void | setDownImage (Image const *image) |
| void | setDownImage (std::string const &filename) |
| void | setHoverImage (Image const *image) |
| void | setHoverImage (std::string const &filename) |
| void | setInactiveDownImage (Image const *image) |
| void | setInactiveDownImage (std::string const &filename) |
| void | setInactiveHoverImage (Image const *image) |
| void | setInactiveHoverImage (std::string const &filename) |
| void | setInactiveUpImage (Image const *image) |
| void | setInactiveUpImage (std::string const &filename) |
| void | setUpImage (Image const *image) |
| void | setUpImage (std::string const &filename) |
| Public Member Functions inherited from fcn::Button | |
| void | ancestorHidden (Event const &e) override |
| Button (Button &&)=delete | |
| Button (Button const &)=delete | |
| Button (std::string caption) | |
| void | focusLost (Event const &event) override |
| void | fontChanged () override |
| Graphics::Alignment | getAlignment () const |
| std::string const & | getCaption () const |
| int | getDownXOffset () const |
| int | getDownYOffset () const |
| bool | isActive () const |
| void | keyPressed (KeyEvent &keyEvent) override |
| void | keyReleased (KeyEvent &keyEvent) override |
| void | mouseDragged (MouseEvent &mouseEvent) override |
| void | mouseEntered (MouseEvent &mouseEvent) override |
| void | mouseExited (MouseEvent &mouseEvent) override |
| void | mousePressed (MouseEvent &mouseEvent) override |
| void | mouseReleased (MouseEvent &mouseEvent) override |
| Button & | operator= (Button &&)=delete |
| Button & | operator= (Button const &)=delete |
| void | resizeToContent () |
| void | setActive (bool state) |
| void | setAlignment (Graphics::Alignment alignment) |
| void | setCaption (std::string const &caption) |
| void | setDownOffset (int x, int y) |
| void | setDownXOffset (int offset) |
| void | setDownYOffset (int offset) |
| Public Member Functions inherited from fcn::Widget | |
| virtual void | _draw (Graphics *graphics) |
| virtual FocusHandler * | _getFocusHandler () |
| virtual std::list< FocusListener * > const & | _getFocusListeners () |
| virtual FocusHandler * | _getInternalFocusHandler () |
| virtual std::list< KeyListener * > const & | _getKeyListeners () |
| virtual std::list< MouseListener * > const & | _getMouseListeners () |
| virtual void | _logic () |
| virtual void | _setFocusHandler (FocusHandler *focusHandler) |
| virtual void | _setParent (Widget *parent) |
| void | adaptLayout () |
| virtual void | adaptLayout (bool top) |
| void | addActionListener (ActionListener *actionListener) |
| void | addDeathListener (DeathListener *deathListener) |
| void | addFocusListener (FocusListener *focusListener) |
| void | addKeyListener (KeyListener *keyListener) |
| void | addMouseListener (MouseListener *mouseListener) |
| void | addWidgetListener (WidgetListener *widgetListener) |
| virtual void | drawBorder (Graphics *graphics) |
| virtual void | drawOutline (Graphics *graphics) |
| virtual void | drawSelectionFrame (Graphics *graphics) |
| void | expandContent () |
| virtual void | expandContent (bool recursion) |
| virtual void | focusNext () |
| virtual void | focusPrevious () |
| virtual void | getAbsolutePosition (int &x, int &y) const |
| std::string const & | getActionEventId () const |
| Color const & | getBackgroundColor () const |
| Color const & | getBaseColor () const |
| Color const & | getBorderColor () const |
| unsigned int | getBorderSize () const |
| virtual Rectangle | getChildrenArea () |
| unsigned int | getChildrenCount () const |
| Rectangle const & | getDimension () const |
| Size const & | getFixedSize () const |
| Font * | getFont () const |
| Color const & | getForegroundColor () const |
| int | getHeight () const |
| std::string const & | getId () const |
| void | getLastPosition (int &x, int &y) const |
| int | getMarginBottom () const |
| int | getMarginLeft () const |
| int | getMarginRight () const |
| int | getMarginTop () const |
| Size const & | getMaxSize () const |
| Size const & | getMinSize () const |
| Color const & | getOutlineColor () const |
| unsigned int | getOutlineSize () const |
| unsigned int | getPaddingBottom () const |
| unsigned int | getPaddingLeft () const |
| unsigned int | getPaddingRight () const |
| unsigned int | getPaddingTop () const |
| virtual Widget * | getParent () const |
| Color const & | getSelectionColor () const |
| SelectionMode | getSelectionMode () const |
| virtual Widget * | getTop () const |
| unsigned int | getVisibleChildrenCount () const |
| Widget * | getWidgetAt (int x, int y) |
| virtual Widget * | getWidgetAt (int x, int y, Widget *exclude) |
| std::list< Widget * > | getWidgetsIn (Rectangle const &area) |
| virtual std::list< Widget * > | getWidgetsIn (Rectangle const &area, Widget *ignore) |
| int | getWidth () const |
| int | getX () const |
| int | getY () const |
| bool | isEnabled () const |
| bool | isFixedSize () const |
| bool | isFocusable () const |
| virtual bool | isFocused () const |
| bool | isHorizontalExpand () const |
| bool | isLastPositionSet () const |
| virtual bool | isLayouted () |
| virtual bool | isModalFocusable () const |
| virtual bool | isModalFocused () const |
| virtual bool | isModalMouseInputFocusable () const |
| virtual bool | isModalMouseInputFocused () const |
| bool | isSetVisible () const |
| bool | isTabInEnabled () const |
| bool | isTabOutEnabled () const |
| bool | isVerticalExpand () const |
| bool | isVisible () const |
| virtual void | logic () |
| virtual void | moveToBottom (Widget *widget) |
| virtual void | moveToTop (Widget *widget) |
| Widget & | operator= (Widget &&)=delete |
| Widget & | operator= (Widget const &)=delete |
| virtual void | releaseModalFocus () |
| virtual void | releaseModalMouseInputFocus () |
| void | removeActionListener (ActionListener *actionListener) |
| void | removeDeathListener (DeathListener *deathListener) |
| void | removeFocusListener (FocusListener *focusListener) |
| void | removeKeyListener (KeyListener *keyListener) |
| void | removeMouseListener (MouseListener *mouseListener) |
| void | removeWidgetListener (WidgetListener *widgetListener) |
| virtual void | requestFocus () |
| virtual void | requestModalFocus () |
| virtual void | requestModalMouseInputFocus () |
| virtual void | requestMoveToBottom () |
| virtual void | requestMoveToTop () |
| void | resizeToContent () |
| void | setActionEventId (std::string const &actionEventId) |
| virtual void | setBackgroundColor (Color const &color) |
| virtual void | setBaseColor (Color const &color) |
| virtual void | setBorderColor (Color const &color) |
| void | setBorderSize (unsigned int size) |
| void | setDimension (Rectangle const &dimension) |
| void | setEnabled (bool enabled) |
| void | setFixedSize (Size const &size) |
| void | setFocusable (bool focusable) |
| virtual void | setFont (Font *font) |
| virtual void | setForegroundColor (Color const &color) |
| void | setHeight (int height) |
| void | setHorizontalExpand (bool expand) |
| void | setId (std::string const &id) |
| void | setInternalFocusHandler (FocusHandler *internalFocusHandler) |
| void | setLastPosition (int x, int y) |
| void | setMargin (int margin) |
| void | setMarginBottom (int margin) |
| void | setMarginLeft (int margin) |
| void | setMarginRight (int margin) |
| void | setMarginTop (int margin) |
| void | setMaxSize (Size const &size) |
| void | setMinSize (Size const &size) |
| virtual void | setOutlineColor (Color const &color) |
| void | setOutlineSize (unsigned int size) |
| void | setPadding (unsigned int padding) |
| void | setPaddingBottom (unsigned int padding) |
| void | setPaddingLeft (unsigned int padding) |
| void | setPaddingRight (unsigned int padding) |
| void | setPaddingTop (unsigned int padding) |
| void | setPosition (int x, int y) |
| virtual void | setSelectionColor (Color const &color) |
| virtual void | setSelectionMode (SelectionMode mode) |
| void | setSize (int width, int height) |
| void | setTabInEnabled (bool enabled) |
| void | setTabOutEnabled (bool enabled) |
| void | setVerticalExpand (bool expand) |
| void | setVisible (bool visible) |
| void | setWidth (int width) |
| void | setX (int x) |
| void | setY (int y) |
| virtual void | showPart (Rectangle rectangle) |
| virtual void | showWidgetPart (Widget *widget, Rectangle area) |
| Widget () | |
| Widget (Widget &&)=delete | |
| Widget (Widget const &)=delete | |
| Public Member Functions inherited from fcn::MouseListener | |
| virtual void | mouseClicked (MouseEvent &mouseEvent) |
| MouseListener (MouseListener &&)=default | |
| MouseListener (MouseListener const &)=default | |
| virtual void | mouseMoved (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedDown (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedLeft (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedRight (MouseEvent &mouseEvent) |
| virtual void | mouseWheelMovedUp (MouseEvent &mouseEvent) |
| MouseListener & | operator= (MouseListener &&)=default |
| MouseListener & | operator= (MouseListener const &)=default |
| Public Member Functions inherited from fcn::KeyListener | |
| KeyListener (KeyListener &&)=default | |
| KeyListener (KeyListener const &)=default | |
| KeyListener & | operator= (KeyListener &&)=default |
| KeyListener & | operator= (KeyListener const &)=default |
| Public Member Functions inherited from fcn::FocusListener | |
| virtual void | focusGained (Event const &event) |
| FocusListener (FocusListener &&)=delete | |
| FocusListener (FocusListener const &)=delete | |
| FocusListener & | operator= (FocusListener &&)=delete |
| FocusListener & | operator= (FocusListener const &)=delete |
| Public Member Functions inherited from fcn::WidgetListener | |
| virtual void | ancestorMoved (Event const &event) |
| virtual void | ancestorShown (Event const &event) |
| WidgetListener & | operator= (WidgetListener &&)=default |
| WidgetListener & | operator= (WidgetListener const &)=default |
| virtual void | widgetHidden (Event const &event) |
| WidgetListener (WidgetListener &&)=default | |
| WidgetListener (WidgetListener const &)=default | |
| virtual void | widgetMoved (Event const &event) |
| virtual void | widgetResized (Event const &event) |
| virtual void | widgetShown (Event const &event) |
Protected Member Functions | |
| void | adjustSizeImpl () override |
| void | setImage (Image const *image, ImageType type) |
| void | setImage (std::string const &filename, ImageType type) |
| Protected Member Functions inherited from fcn::Button | |
| virtual bool | isPressed () const |
| Protected Member Functions inherited from fcn::Widget | |
| void | add (Widget *widget) |
| void | calculateSize () |
| void | distributeActionEvent () |
| void | distributeAncestorHiddenEvent (Widget *ancestor) |
| void | distributeAncestorMovedEvent (Widget *ancestor) |
| void | distributeAncestorShownEvent (Widget *ancestor) |
| void | distributeHiddenEvent () |
| void | distributeMovedEvent () |
| void | distributeResizedEvent () |
| void | distributeShownEvent () |
| virtual Widget * | findWidgetById (std::string const &id) |
| std::list< Widget * > const & | getChildren () const |
| virtual void | remove (Widget *widget) |
| virtual void | removeAllChildren () |
| void | resizeToChildren () |
| Protected Member Functions inherited from fcn::MouseListener | |
| MouseListener ()=default | |
| Protected Member Functions inherited from fcn::KeyListener | |
| KeyListener ()=default | |
| Protected Member Functions inherited from fcn::FocusListener | |
| FocusListener ()=default | |
| Protected Member Functions inherited from fcn::WidgetListener | |
| WidgetListener ()=default | |
Protected Attributes | |
| std::vector< Image const * > | mImages |
| std::vector< std::unique_ptr< Image const > > | mOwnedImages |
| Protected Attributes inherited from fcn::Button | |
| Graphics::Alignment | mAlignment {Graphics::Alignment::Center} |
| std::string | mCaption |
| bool | mHasMouse {false} |
| bool | mKeyPressed {false} |
| bool | mMousePressed {false} |
| bool | mState {true} |
| int | mXOffset {1} |
| int | mYOffset {1} |
| Protected Attributes inherited from fcn::Widget | |
| std::string | mActionEventId |
| std::list< ActionListener * > | mActionListeners |
| Color | mBackgroundColor {0xf9fafb} |
| Color | mBaseColor {0xe5e7eb} |
| Color | mBorderColor {0xd1d5db} |
| unsigned int | mBorderSize {0} |
| std::list< Widget * > | mChildren |
| Font * | mCurrentFont {nullptr} |
| std::list< DeathListener * > | mDeathListeners |
| Rectangle | mDimension |
| bool | mEnabled {true} |
| Size | mFixedSize {-1, -1} |
| bool | mFixedSizeUsed {false} |
| bool | mFocusable {false} |
| FocusHandler * | mFocusHandler {nullptr} |
| std::list< FocusListener * > | mFocusListeners |
| Color | mForegroundColor {0x1f2933} |
| bool | mHExpand {false} |
| std::string | mId |
| FocusHandler * | mInternalFocusHandler {nullptr} |
| std::list< KeyListener * > | mKeyListeners |
| int | mLastX {0} |
| int | mLastY {0} |
| int | mMarginBottom {0} |
| int | mMarginLeft {0} |
| int | mMarginRight {0} |
| int | mMarginTop {0} |
| Size | mMaxSize {std::numeric_limits<int>::max(), std::numeric_limits<int>::max()} |
| Size | mMinSize {0, 0} |
| std::list< MouseListener * > | mMouseListeners |
| Rectangle | mOffsetRect |
| Color | mOutlineColor {0x9ca3af} |
| unsigned int | mOutlineSize {0} |
| unsigned int | mPaddingBottom {0} |
| unsigned int | mPaddingLeft {0} |
| unsigned int | mPaddingRight {0} |
| unsigned int | mPaddingTop {0} |
| Widget * | mParent {nullptr} |
| Color | mSelectionColor {0x3b82f6} |
| SelectionMode | mSelectionMode {SelectionMode::None} |
| bool | mTabIn {true} |
| bool | mTabOut {true} |
| bool | mVExpand {false} |
| bool | mVisible {true} |
| std::list< WidgetListener * > | mWidgetListeners |
Additional Inherited Members | |
| Static Public Member Functions inherited from fcn::Widget | |
| static DeathListener * | _getGuiDeathListener () |
| static VisibilityEventHandler * | _getVisibilityEventHandler () |
| static void | _setGuiDeathListener (DeathListener *deathListener) |
| static void | _setVisibilityEventHandler (VisibilityEventHandler *visibilityEventHandler) |
| static void | setGlobalFont (Font *font) |
| static bool | widgetExists (Widget const *widget) |
| Static Protected Attributes inherited from fcn::Widget | |
| static DefaultFont | mDefaultFont |
| static Font * | mGlobalFont = nullptr |
| static DeathListener * | mGuiDeathListener = nullptr |
| static VisibilityEventHandler * | mVisibilityEventHandler = nullptr |
| static std::list< Widget * > | mWidgetInstances |
An implementation of a regular clickable button.
Unlike a normal button an image button is capable of displaying images instead of only a simple text caption. It is possible to define images for button up, down and hover. Also the same 3 images for a inactive button so that it's possible to visualize the inactivity. As minimum the button up image should be set. All other 5 images are optional. Whenever an image button is clicked an action event will be sent to the action listener's of the image button.
Definition at line 32 of file imagebutton.hpp.
|
strong |
Types of images used by ImageButton.
Up/Down/Hover indicate the visual state; *_Inactive variants are used when the button is disabled.
Definition at line 41 of file imagebutton.hpp.
| fcn::ImageButton::ImageButton | ( | ) |
Definition at line 18 of file imagebutton.cpp.
|
explicit |
Constructor.
| filename | The filename of the up image to display. |
Definition at line 23 of file imagebutton.cpp.
References mImages, mOwnedImages, and setUpImage().
|
explicit |
Constructor.
Existing Images are freed automatically, if they were loaded internally.
| image | The up image to display. |
Definition at line 29 of file imagebutton.cpp.
References mImages, mOwnedImages, and setUpImage().
|
overridevirtual |
Adjust internal size after layout or image changes.
Reimplemented from fcn::Button.
Definition at line 145 of file imagebutton.cpp.
References adjustSizeImpl().
Referenced by fcn::ToggleButton::ToggleButton().
|
overrideprotectedvirtual |
Adjusts the size of the button to fit the caption.
The public adjustSize() method serves as a virtual entry point for polymorphism, while this adjustSizeImpl() method contains the concrete implementation of the resizing logic.
Reimplemented from fcn::Button.
Definition at line 150 of file imagebutton.cpp.
References fcn::Widget::getBorderSize(), fcn::Button::getCaption(), fcn::Widget::getFont(), fcn::Image::getHeight(), fcn::Widget::getHeight(), fcn::Widget::getPaddingBottom(), fcn::Widget::getPaddingLeft(), fcn::Widget::getPaddingRight(), fcn::Widget::getPaddingTop(), fcn::Image::getWidth(), fcn::Widget::getWidth(), mImages, and fcn::Widget::setSize().
Referenced by adjustSize(), resizeToContent(), setImage(), and setImage().
|
overridevirtual |
Draw the button using the provided graphics backend.
| Graphics & Rendering | Graphics backend to draw with. |
Reimplemented from fcn::Button.
Definition at line 170 of file imagebutton.cpp.
References fcn::Color::a, fcn::Color::b, fcn::Widget::drawBorder(), fcn::Graphics::drawImage(), fcn::Widget::drawSelectionFrame(), fcn::Graphics::drawText(), fcn::Graphics::fillRectangle(), fcn::Color::g, fcn::Button::getAlignment(), fcn::Widget::getBaseColor(), fcn::Widget::getBorderSize(), fcn::Button::getCaption(), getDownImage(), fcn::Button::getDownXOffset(), fcn::Button::getDownYOffset(), fcn::Widget::getFont(), fcn::Widget::getForegroundColor(), fcn::Font::getHeight(), fcn::Widget::getHeight(), getHoverImage(), getInactiveDownImage(), getInactiveHoverImage(), getInactiveUpImage(), fcn::Widget::getPaddingBottom(), fcn::Widget::getPaddingLeft(), fcn::Widget::getPaddingRight(), fcn::Widget::getPaddingTop(), fcn::Widget::getSelectionColor(), fcn::Widget::getSelectionMode(), getUpImage(), fcn::Widget::getWidth(), fcn::Rectangle::height, fcn::Button::isActive(), fcn::Widget::isFocused(), fcn::Button::isPressed(), fcn::Button::mHasMouse, fcn::Color::r, fcn::Graphics::setColor(), fcn::Graphics::setFont(), fcn::Rectangle::width, fcn::Rectangle::x, and fcn::Rectangle::y.
| Image const * fcn::ImageButton::getDownImage | ( | ) | const |
Gets current down image.
Definition at line 75 of file imagebutton.cpp.
References mImages.
Referenced by draw(), and fcn::CheckBox::drawMarkerImage().
| Image const * fcn::ImageButton::getHoverImage | ( | ) | const |
Gets current hover image.
Definition at line 90 of file imagebutton.cpp.
References mImages.
Referenced by draw(), and fcn::CheckBox::drawMarkerImage().
| Image const * fcn::ImageButton::getInactiveDownImage | ( | ) | const |
Gets inactive down image.
Definition at line 120 of file imagebutton.cpp.
References mImages.
Referenced by draw(), and fcn::CheckBox::drawMarkerImage().
| Image const * fcn::ImageButton::getInactiveHoverImage | ( | ) | const |
Gets inactive hover image.
Definition at line 135 of file imagebutton.cpp.
References mImages.
Referenced by draw(), and fcn::CheckBox::drawMarkerImage().
| Image const * fcn::ImageButton::getInactiveUpImage | ( | ) | const |
Gets inactive up image.
Definition at line 105 of file imagebutton.cpp.
References mImages.
Referenced by draw().
| Image const * fcn::ImageButton::getUpImage | ( | ) | const |
Gets current up image.
Definition at line 60 of file imagebutton.cpp.
References mImages.
Referenced by fcn::CheckBox::adjustSizeImpl(), draw(), and fcn::CheckBox::drawMarkerImage().
|
overridevirtual |
Resize the button to fit its image content.
| recursion | If true, resize children recursively (no-op for button). |
Reimplemented from fcn::Button.
Definition at line 140 of file imagebutton.cpp.
References adjustSizeImpl().
| void fcn::ImageButton::setDownImage | ( | Image const * | image | ) |
Sets the down image to display.
That is the image that is used if the button is pressed. Existing Image is freed automatically, if it was loaded internally.
| image | The down image to display. |
Definition at line 70 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setDownImage | ( | std::string const & | filename | ) |
Sets the down image to display.
That is the image that is used if the button is pressed. Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the down image to display. |
Definition at line 65 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setHoverImage | ( | Image const * | image | ) |
Sets the hover image to display.
That is the image that is used if the mouse is over the button. Existing Image is freed automatically, if it was loaded internally.
| image | The hover image to display. |
Definition at line 85 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setHoverImage | ( | std::string const & | filename | ) |
Sets the hover image to display.
That is the image that is used if the mouse is over the button. Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the hover image to display. |
Definition at line 80 of file imagebutton.cpp.
References setImage().
Internal helper to set an image for a specific ImageType using an existing Image pointer.
| image | image pointer to assign for the given type. |
| type | the image type slot to set. |
Definition at line 43 of file imagebutton.cpp.
References adjustSizeImpl(), mImages, and mOwnedImages.
|
protected |
Internal helper to set an image for a specific ImageType by filename.
| filename | image file to load and assign for the given type. |
| type | the image type slot to set. |
Definition at line 36 of file imagebutton.cpp.
References adjustSizeImpl(), fcn::Image::load(), mImages, and mOwnedImages.
Referenced by setDownImage(), setDownImage(), setHoverImage(), setHoverImage(), setInactiveDownImage(), setInactiveDownImage(), setInactiveHoverImage(), setInactiveHoverImage(), setInactiveUpImage(), setInactiveUpImage(), setUpImage(), and setUpImage().
| void fcn::ImageButton::setInactiveDownImage | ( | Image const * | image | ) |
Sets the down image to display if the button is inactive.
Existing Image is freed automatically, if it was loaded internally.
| image | The inactive down image to display. |
Definition at line 115 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setInactiveDownImage | ( | std::string const & | filename | ) |
Sets the down image to display if the button is inactive.
Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the inactive down image to display. |
Definition at line 110 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setInactiveHoverImage | ( | Image const * | image | ) |
Sets the hover image to display if the button is inactive.
Existing Image is freed automatically, if it was loaded internally.
| image | The inactive hover image to display. |
Definition at line 130 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setInactiveHoverImage | ( | std::string const & | filename | ) |
Sets the hover image to display if the button is inactive.
Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the inactive hover image to display. |
Definition at line 125 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setInactiveUpImage | ( | Image const * | image | ) |
Sets the up image to display if the button is inactive.
If not provided the active up image is used. Existing Image is freed automatically, if it was loaded internally.
| image | The inactive up image to display. |
Definition at line 100 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setInactiveUpImage | ( | std::string const & | filename | ) |
Sets the up image to display if the button is inactive.
If not provided the active up image is used. Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the inactive up image to display. |
Definition at line 95 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setUpImage | ( | Image const * | image | ) |
Sets the up image to display.
That is the basic image that is also used if other images are not set. Existing Image is freed automatically, if it was loaded internally.
| image | The up image to display. |
Definition at line 55 of file imagebutton.cpp.
References setImage().
| void fcn::ImageButton::setUpImage | ( | std::string const & | filename | ) |
Sets the up image to display.
That is the basic image that is also used if other images are not set. Existing Image is freed automatically, if it was loaded internally.
| filename | The filename of the up image to display. |
Definition at line 50 of file imagebutton.cpp.
References setImage().
Referenced by ImageButton(), and ImageButton().
|
protected |
The images to display.
Definition at line 280 of file imagebutton.hpp.
Referenced by adjustSizeImpl(), getDownImage(), getHoverImage(), getInactiveDownImage(), getInactiveHoverImage(), getInactiveUpImage(), getUpImage(), ImageButton(), ImageButton(), setImage(), and setImage().
|
protected |
Owned images loaded by filename.
Definition at line 285 of file imagebutton.hpp.
Referenced by ImageButton(), ImageButton(), setImage(), and setImage().