Class: ImGuiViewport

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/imgui.rb

Overview

  • Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.

  • With multi-viewport enabled, we extend this concept to have multiple active viewports.

  • In the future we will extend this concept further to also represent Platform Monitor and support a “no main platform window” operation mode.

  • About Main Area vs Work Area:

    • Main Area = entire viewport.

    • Work Area = entire viewport minus sections used by main menu bars (for platform windows), or by task bar (for platform monitor).

    • Windows are generally trying to stay within the Work Area of their host viewport.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



1599
1600
1601
# File 'lib/imgui.rb', line 1599

def self.create()
  return ImGuiViewport.new(ImGui::ImGuiViewport_ImGuiViewport())
end

Instance Method Details

#destroyObject



1603
1604
1605
# File 'lib/imgui.rb', line 1603

def destroy()
  ImGui::ImGuiViewport_destroy(self)
end

#GetCenterObject



1587
1588
1589
1590
1591
# File 'lib/imgui.rb', line 1587

def GetCenter()
  pOut = ImVec2.new
  ImGui::ImGuiViewport_GetCenter(pOut, self)
  return pOut
end

#GetWorkCenterObject



1593
1594
1595
1596
1597
# File 'lib/imgui.rb', line 1593

def GetWorkCenter()
  pOut = ImVec2.new
  ImGui::ImGuiViewport_GetWorkCenter(pOut, self)
  return pOut
end