@ -207,6 +207,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- popups: clicking outside (to close popup) and holding shouldn't drag window below.
- popups: clicking outside (to close popup) and holding shouldn't drag window below.
- popups: add variant using global identifier similar to Begin/End (#402)
- popups: add variant using global identifier similar to Begin/End (#402)
- popups: border options. richer api like BeginChild() perhaps? (#197)
- popups: border options. richer api like BeginChild() perhaps? (#197)
- popups: flags could be reworked to allow both mouse buttons as index (0..5 and as flags using higher-bit) allowing to or them.
- popups/modals: although it is sometimes convenient that popups/modals lifetime is owned by imgui, we could also a bool-owned-by-user api as long as Begin() return value testing is enforced.
- popups/modals: although it is sometimes convenient that popups/modals lifetime is owned by imgui, we could also a bool-owned-by-user api as long as Begin() return value testing is enforced.
- tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
- tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
IMGUI_APIboolSmallButton(constchar*label);// button with FramePadding=(0,0) to easily embed within text
IMGUI_APIboolSmallButton(constchar*label);// button with FramePadding=(0,0) to easily embed within text
IMGUI_APIboolInvisibleButton(constchar*str_id,constImVec2&size);// button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
IMGUI_APIboolInvisibleButton(constchar*str_id,constImVec2&size, ImGuiButtonFlagsflags=0);// flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
IMGUI_APIboolArrowButton(constchar*str_id,ImGuiDirdir);// square button with an arrow shape
IMGUI_APIboolArrowButton(constchar*str_id,ImGuiDirdir);// square button with an arrow shape
IMGUI_APIvoidBullet();// draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
IMGUI_APIvoidBullet();// draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
// Widgets: Combo Box
// Widgets: Combo Box
// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
@ -877,6 +878,7 @@ enum ImGuiTreeNodeFlags_
// small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags.
// small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags.
// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags.
// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags.
// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0.
// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0.
// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later).
enumImGuiPopupFlags_
enumImGuiPopupFlags_
{
{
ImGuiPopupFlags_None=0,
ImGuiPopupFlags_None=0,
@ -1221,6 +1223,19 @@ enum ImGuiStyleVar_
#endif
#endif
};
};
// Flags for InvisibleButton() [extended in imgui_internal.h]
enumImGuiButtonFlags_
{
ImGuiButtonFlags_None=0,
ImGuiButtonFlags_MouseButtonLeft=1<<0,// React on left mouse button (default)
ImGuiButtonFlags_MouseButtonRight=1<<1,// React on right mouse button
ImGuiButtonFlags_MouseButtonMiddle=1<<2,// React on center mouse button
ImGuiButtonFlags_PressedOnClick=1<<4,// return true on click (mouse down event)
ImGuiButtonFlags_PressedOnClick=1<<1,// return true on click (mouse down event)
ImGuiButtonFlags_PressedOnClickRelease=1<<5,// [Default] return true on click + release on same item <-- this is what the majority of Button are using
ImGuiButtonFlags_PressedOnClickRelease=1<<2,// [Default] return true on click + release on same item <-- this is what the majority of Button are using
ImGuiButtonFlags_PressedOnClickReleaseAnywhere=1<<6,// return true on click + release even if the release event is not done while hovering the item
ImGuiButtonFlags_PressedOnClickReleaseAnywhere=1<<3,// return true on click + release even if the release event is not done while hovering the item
ImGuiButtonFlags_PressedOnRelease=1<<7,// return true on release (default requires click+release)
ImGuiButtonFlags_PressedOnRelease=1<<4,// return true on release (default requires click+release)
ImGuiButtonFlags_PressedOnDoubleClick=1<<8,// return true on double-click (default requires click+release)
ImGuiButtonFlags_PressedOnDoubleClick=1<<5,// return true on double-click (default requires click+release)
ImGuiButtonFlags_PressedOnDragDropHold=1<<9,// return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_PressedOnDragDropHold=1<<6,// return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_Repeat=1<<10,// hold to repeat
ImGuiButtonFlags_FlattenChildren=1<<7,// allow interactions even if a child window is overlapping
ImGuiButtonFlags_FlattenChildren=1<<11,// allow interactions even if a child window is overlapping
ImGuiButtonFlags_AllowItemOverlap=1<<8,// require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
ImGuiButtonFlags_AllowItemOverlap=1<<12,// require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap()
ImGuiButtonFlags_DontClosePopups=1<<9,// disable automatically closing parent popup on press // [UNUSED]
ImGuiButtonFlags_DontClosePopups=1<<13,// disable automatically closing parent popup on press // [UNUSED]
ImGuiButtonFlags_AlignTextBaseLine=1<<11,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_AlignTextBaseLine=1<<15,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_NoKeyModifiers=1<<12,// disable mouse interaction if a key modifier is held
ImGuiButtonFlags_NoKeyModifiers=1<<16,// disable mouse interaction if a key modifier is held
ImGuiButtonFlags_NoHoldingActiveId=1<<13,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_NoHoldingActiveId=1<<17,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_NoNavFocus=1<<14,// don't override navigation focus when activated
ImGuiButtonFlags_NoNavFocus=1<<18,// don't override navigation focus when activated
ImGuiButtonFlags_NoHoveredOnFocus=1<<15,// don't report as hovered when nav focus is on this item
ImGuiButtonFlags_NoHoveredOnFocus=1<<19,// don't report as hovered when nav focus is on this item
ImGuiButtonFlags_MouseButtonLeft=1<<16,// [Default] react on left mouse button
ImGuiButtonFlags_MouseButtonRight=1<<17,// react on right mouse button
ImGuiButtonFlags_MouseButtonMiddle=1<<18,// react on center mouse button