Exposed BeginCombo() publicly.

This commit is contained in:
omar
2017-12-10 18:08:59 +01:00
parent 080f61858f
commit e3e0326ea9
3 changed files with 26 additions and 24 deletions

View File

@ -48,7 +48,6 @@ typedef int ImGuiButtonFlags; // flags: for ButtonEx(), ButtonBehavior()
typedef int ImGuiItemFlags; // flags: for PushItemFlag() // enum ImGuiItemFlags_
typedef int ImGuiSeparatorFlags; // flags: for Separator() - internal // enum ImGuiSeparatorFlags_
typedef int ImGuiSliderFlags; // flags: for SliderBehavior() // enum ImGuiSliderFlags_
typedef int ImGuiComboFlags; // flags: for BeginCombo() // enum ImGuiComboFlags_
//-------------------------------------------------------------------------
// STB libraries
@ -210,18 +209,6 @@ enum ImGuiSelectableFlagsPrivate_
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 6
};
enum ImGuiComboFlags_
{
ImGuiComboFlags_PopupAlignLeft = 1 << 0, // Align the popup toward the left by default
// If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()
ImGuiComboFlags_HeightSmall = 1 << 1, // Max ~4 items visible
ImGuiComboFlags_HeightRegular = 1 << 2, // Max ~8 items visible (default)
ImGuiComboFlags_HeightLarge = 1 << 3, // Max ~20 items visible
ImGuiComboFlags_HeightLargest = 1 << 4, // As many fitting items as possible
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
};
enum ImGuiSeparatorFlags_
{
ImGuiSeparatorFlags_Horizontal = 1 << 0, // Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar
@ -859,10 +846,6 @@ namespace ImGui
IMGUI_API void EndColumns(); // close columns
IMGUI_API void PushColumnClipRect(int column_index = -1);
// FIXME-WIP: New Combo API
IMGUI_API bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0);
IMGUI_API void EndCombo();
// NB: All position are in absolute pixels coordinates (never using window coordinates internally)
// AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT.
IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true);