Refactor enums to classes with static fields
This commit is contained in:
1 parent
d4c59568d7
commit
8d241a60e6
35 files changed
+551
-769
No files matched your search
@@ -4,30 +4,18 @@ package imgui.enums;
|
||||
* Flags for ImGui::BeginTabBar()
|
||||
*/
|
||||
public final class ImGuiTabBarFlags {
|
||||
public static ImGuiTabBarFlags None = new ImGuiTabBarFlags(0);
|
||||
public static ImGuiTabBarFlags Reorderable = new ImGuiTabBarFlags(1 << 0);
|
||||
public static ImGuiTabBarFlags AutoSelectNewTabs = new ImGuiTabBarFlags(1 << 1);
|
||||
public static ImGuiTabBarFlags TabListPopupButton = new ImGuiTabBarFlags(1 << 2);
|
||||
public static ImGuiTabBarFlags NoCloseWithMiddleMouseButton = new ImGuiTabBarFlags(1 << 3);
|
||||
public static ImGuiTabBarFlags NoTabListScrollingButtons = new ImGuiTabBarFlags(1 << 4);
|
||||
public static ImGuiTabBarFlags NoTooltip = new ImGuiTabBarFlags(1 << 5);
|
||||
public static ImGuiTabBarFlags FittingPolicyResizeDown = new ImGuiTabBarFlags(1 << 6);
|
||||
public static ImGuiTabBarFlags FittingPolicyScroll = new ImGuiTabBarFlags(1 << 7);
|
||||
public static ImGuiTabBarFlags FittingPolicyMask = new ImGuiTabBarFlags(FittingPolicyResizeDown.getValue() | FittingPolicyScroll.getValue());
|
||||
public static ImGuiTabBarFlags FittingPolicyDefault = new ImGuiTabBarFlags(FittingPolicyResizeDown.getValue());
|
||||
private static ImGuiTabBarFlags Custom = new ImGuiTabBarFlags(0);
|
||||
int value;
|
||||
|
||||
private ImGuiTabBarFlags(int code) {
|
||||
value = code;
|
||||
private ImGuiTabBarFlags() {
|
||||
}
|
||||
|
||||
public ImGuiTabBarFlags or(ImGuiTabBarFlags otherEnum) {
|
||||
ImGuiTabBarFlags.Custom.value = value | otherEnum.value;
|
||||
return ImGuiTabBarFlags.Custom;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
public static final int None = 0;
|
||||
public static final int Reorderable = 1; // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
|
||||
public static final int AutoSelectNewTabs = 1 << 1; // Automatically select new tabs when they appear
|
||||
public static final int TabListPopupButton = 1 << 2; // Disable buttons to open the tab list popup
|
||||
public static final int NoCloseWithMiddleMouseButton = 1 << 3; // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
||||
public static final int NoTabListScrollingButtons = 1 << 4; // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
|
||||
public static final int NoTooltip = 1 << 5; // Disable tooltips when hovering a tab
|
||||
public static final int FittingPolicyResizeDown = 1 << 6; // Resize tabs when they don't fit
|
||||
public static final int FittingPolicyScroll = 1 << 7; // Add scroll buttons when tabs don't fit
|
||||
public static final int FittingPolicyMask_ = FittingPolicyResizeDown | FittingPolicyScroll;
|
||||
public static final int FittingPolicyDefault_ = FittingPolicyResizeDown;
|
||||
}
|
||||
Reference in new issue
Block a user