载入中...
搜索中...
未找到
Window.h
浏览该文件的文档.
Definition Module.h:43
Platform window interface (SDL implementation on desktop/mobile). Script: win <- eve....
Definition Window.h:46
virtual void setVSync(int vsync)=0
Enables/disables vertical sync (0 = off, 1 = on).
virtual int getDisplayCount() const =0
Number of displays attached to the system.
virtual int showMessageBoxData(const MessageBoxData &data)=0
Shows a configurable message box; returns the pressed button index.
virtual bool setFullscreenDesktop(bool fullscreen)=0
Switches between desktop fullscreen and windowed mode.
virtual void maximize()=0
virtual double getNativeDPIScale() const =0
Native DPI scale reported by the OS for this window.
virtual bool hasFocus() const =0
True when the window has keyboard focus.
virtual bool isMinimized() const =0
virtual void restore()=0
virtual void toPixelsXY(double wx, double wy, double &px, double &py) const =0
Vector variants of the coordinate conversions above.
virtual std::string getDisplayName(int display) const =0
Human-readable display name for a display index.
virtual bool showMessageBox(const std::string &title, const std::string &message, const std::string &type, bool attachToWindow)=0
Shows a modal message box ("info", "warning", or "error").
virtual bool isVisible() const =0
virtual std::vector< WindowSize > getFullscreenSizes(int display) const =0
Fullscreen sizes supported by a display.
virtual bool setFullscreenExclusive(bool fullscreen)=0
Switches between exclusive fullscreen and windowed mode.
virtual void setWindowTitle(const std::string &title)=0
Sets the window title shown in the OS title bar.
virtual void windowToDPICoords(double *x, double *y) const =0
Converts window logical coordinates to UI-DPI coordinates.
virtual const std::string & getWindowTitle() const =0
virtual bool setIconRGBA(const uint8_t *rgba, int width, int height)=0
Sets the window icon from tightly packed RGBA8 pixels (w*h*4 bytes).
virtual bool isOpen() const =0
virtual bool hasMouseFocus() const =0
True when the window has mouse focus.
virtual void getDesktopDimensions(int display, int &width, int &height) const =0
Desktop resolution of a display.
virtual int getWidth() const =0
virtual double getDPIScale() const =0
Current UI/logical DPI scale (1.0 on non-retina displays).
virtual void windowToPixelCoords(double *x, double *y) const =0
Converts window logical coordinates to framebuffer pixel coordinates.
virtual bool setWindowSettings(WindowSettings settings)=0
Applies a full WindowSettings struct (recreates the window when needed).
Module_REG(Window)
virtual void requestAttention(bool continuous)=0
Requests OS attention (flashing taskbar); continuous repeats until focused.
virtual double toPixels(double x) const =0
Scales a logical length to UI pixels (and back).
virtual void DPIToWindowCoords(double *x, double *y) const =0
Converts UI-DPI coordinates to window logical coordinates.
virtual std::string getDisplayOrientation(int display) const =0
Display orientation string (e.g. "landscape").
virtual bool isMaximized() const =0
virtual void pixelToWindowCoords(double *x, double *y) const =0
Converts framebuffer pixel coordinates to window logical coordinates.
virtual double fromPixels(double x) const =0
virtual void getPosition(int &x, int &y, int &display)=0
Reads the current window position and display index.
virtual WindowSettings getWindowSettings()=0
virtual void setPosition(int x, int y, int display)=0
Moves the window to a position in logical units on the given display.
virtual int getHeight() const =0
virtual int getPixelWidth() const =0
Framebuffer (pixel) dimensions of the window.
virtual void * getHandle() const =0
Native window handle (SDL_Window* on SDL backend).
virtual void setSize(int width, int height)=0
Requests a new logical window size.
virtual void fromPixelsXY(double px, double py, double &wx, double &wy) const =0
virtual int getVSync() const =0
virtual int getPixelHeight() const =0
WidgetDesc window(std::string title, std::vector< WidgetDesc > children, std::string id)
Top-level window widget with a title bar.
Definition Widget.cpp:225
Definition Build.cpp:11
Display settings for window creation/resize. width/height == 0 selects the desktop display mode size.
Definition Window.h:17
std::vector< std::string > buttons
Definition Window.h:64
Definition Window.h:50
bool operator==(const WindowSize &w) const
Definition Window.h:54