class for drawing ribbon menu buttons More...
#include <MRRibbonButtonDrawer.h>
Classes | |
struct | ButtonItemWidth |
Public Types | |
enum class | TextureType { Mono , Gradient , RainbowRect , Count } |
Public Member Functions | |
MRVIEWER_API bool | GradientCheckboxItem (const MenuItemInfo &item, bool *value) const |
draw gradient checkbox with icon (for menu item) | |
MRVIEWER_API ButtonItemWidth | calcItemWidth (const MenuItemInfo &item, DrawButtonParams::SizeType sizeType) const |
MRVIEWER_API void | drawButtonItem (const MenuItemInfo &item, const DrawButtonParams ¶ms) const |
draw item button | |
MRVIEWER_API void | drawCustomButtonItem (const MenuItemInfo &item, const CustomButtonParameters &customParam, const DrawButtonParams ¶ms) const |
draw item button | |
MRVIEWER_API void | drawButtonIcon (const MenuItemInfo &item, const DrawButtonParams ¶ms) const |
draw item button icon | |
MRVIEWER_API bool | drawTabArrawButton (const char *icon, const ImVec2 &size, float iconSize) |
draw custom styled button | |
MRVIEWER_API void | setMonochrome (const std::optional< Color > &color) |
if set color then instead of multicolored icons will be drawn with this color | |
void | setOnPressAction (std::function< void(std::shared_ptr< RibbonMenuItem >, const std::string &)> action) |
set reaction on press item button | |
void | setGetterRequirements (std::function< std::string(std::shared_ptr< RibbonMenuItem >)> getterRequirements) |
set function to get requirements for activate item | |
void | setMenu (RibbonMenu *menu) |
void | setShortcutManager (const ShortcutManager *shortcutManager) |
void | setScaling (float scaling) |
Static Public Member Functions | |
static MRVIEWER_API void | InitGradientTexture () |
static MRVIEWER_API std::unique_ptr< ImGuiImage > & | GetTexture (TextureType type) |
static MRVIEWER_API bool | CustomCollapsingHeader (const char *label, ImGuiTreeNodeFlags flags=0, int issueCount=0) |
class for drawing ribbon menu buttons
|
strong |
MRVIEWER_API ButtonItemWidth MR::RibbonButtonDrawer::calcItemWidth | ( | const MenuItemInfo & | item, |
DrawButtonParams::SizeType | sizeType ) const |
|
static |
draw custom collapsing header if issueCount is greater than zero, so many red dots will be displayed after text
MRVIEWER_API void MR::RibbonButtonDrawer::drawButtonIcon | ( | const MenuItemInfo & | item, |
const DrawButtonParams & | params ) const |
draw item button icon
MRVIEWER_API void MR::RibbonButtonDrawer::drawButtonItem | ( | const MenuItemInfo & | item, |
const DrawButtonParams & | params ) const |
draw item button
MRVIEWER_API void MR::RibbonButtonDrawer::drawCustomButtonItem | ( | const MenuItemInfo & | item, |
const CustomButtonParameters & | customParam, | ||
const DrawButtonParams & | params ) const |
draw item button
MRVIEWER_API bool MR::RibbonButtonDrawer::drawTabArrawButton | ( | const char * | icon, |
const ImVec2 & | size, | ||
float | iconSize ) |
draw custom styled button
|
static |
MRVIEWER_API bool MR::RibbonButtonDrawer::GradientCheckboxItem | ( | const MenuItemInfo & | item, |
bool * | value ) const |
draw gradient checkbox with icon (for menu item)
|
static |
|
inline |
set function to get requirements for activate item
|
inline |
MRVIEWER_API void MR::RibbonButtonDrawer::setMonochrome | ( | const std::optional< Color > & | color | ) |
if set color then instead of multicolored icons will be drawn with this color
|
inline |
set reaction on press item button
|
inline |
|
inline |