C# 클래스 SFML.Window.Window

Window is a rendering window ; it can create a new window or connect to an existing one
상속: SFML.System.ObjectBase
파일 보기 프로젝트 열기: SFML/SFML.Net 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Close (destroy) the window. The Window instance remains valid and you can call Create to recreate the window

DispatchEvents ( ) : void

Call the event handlers for each pending event

Display ( ) : void

Display the window on screen

HasFocus ( ) : bool

Check whether the window has the input focus

RequestFocus ( ) : void

Request the current window to be made the active foreground window

SetActive ( ) : bool

Activate the window as the current target for rendering

SetActive ( bool active ) : bool

Activate of deactivate the window as the current target for rendering

SetFramerateLimit ( uint limit ) : void

Limit the framerate to a maximum fixed frequency

SetIcon ( uint width, uint height, byte pixels ) : void

Change the window's icon

SetJoystickThreshold ( float threshold ) : void

Change the joystick threshold, ie. the value below which no move event will be generated

SetKeyRepeatEnabled ( bool enable ) : void

Enable or disable automatic key-repeat. Automatic key-repeat is enabled by default

SetMouseCursorGrabbed ( bool grabbed ) : void

Grab or release the mouse cursor

If set, grabs the mouse cursor inside this window's client area so it may no longer be moved outside its bounds. Note that grabbing is only active while the window has focus and calling this function for fullscreen windows won't have any effect (fullscreen windows always grab the cursor).

SetMouseCursorVisible ( bool show ) : void

Show or hide the mouse cursor

SetTitle ( string title ) : void

Change the title of the window

SetVerticalSyncEnabled ( bool enable ) : void

Enable / disable vertical synchronization

SetVisible ( bool visible ) : void

Show or hide the window

ToString ( ) : string

Provide a string describing the object

WaitAndDispatchEvents ( ) : void

Wait for a new event and dispatch it to the corresponding event handler

Window ( IntPtr handle ) : System

Create the window from an existing control with default creation settings

Window ( IntPtr Handle, ContextSettings settings ) : System

Create the window from an existing control

Window ( VideoMode mode, string title ) : System

Create the window with default style and creation settings

Window ( VideoMode mode, string title, Styles style ) : System

Create the window with default creation settings

Window ( VideoMode mode, string title, Styles style, ContextSettings settings ) : System

Create the window

보호된 메소드들

메소드 설명
Destroy ( bool disposing ) : void

Handle the destruction of the object

InternalGetMousePosition ( ) : Vector2i

Internal function to get the mouse position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.

InternalGetTouchPosition ( uint Finger ) : Vector2i

Internal function to get the touch position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.

InternalSetMousePosition ( Vector2i position ) : void

Internal function to set the mouse position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.

PollEvent ( Event &eventToFill ) : bool

Internal function to get the next event (non-blocking)

WaitEvent ( Event &eventToFill ) : bool

Internal function to get the next event (blocking)

Window ( IntPtr cPointer, int dummy ) : System

Constructor for derived classes

비공개 메소드들

메소드 설명
CallEventHandler ( Event e ) : void

Call the event handler for the given event

sfMouse_getPosition ( IntPtr CPointer ) : Vector2i
sfMouse_setPosition ( Vector2i position, IntPtr CPointer ) : void
sfTouch_getPosition ( uint Finger, IntPtr RelativeTo ) : Vector2i
sfWindow_close ( IntPtr CPointer ) : void
sfWindow_create ( VideoMode Mode, string Title, Styles Style, ContextSettings &Params ) : IntPtr
sfWindow_createFromHandle ( IntPtr Handle, ContextSettings &Params ) : IntPtr
sfWindow_createUnicode ( VideoMode Mode, IntPtr Title, Styles Style, ContextSettings &Params ) : IntPtr
sfWindow_destroy ( IntPtr CPointer ) : void
sfWindow_display ( IntPtr CPointer ) : void
sfWindow_getFrameTime ( IntPtr CPointer ) : uint
sfWindow_getPosition ( IntPtr CPointer ) : Vector2i
sfWindow_getSettings ( IntPtr CPointer ) : ContextSettings
sfWindow_getSize ( IntPtr CPointer ) : Vector2u
sfWindow_getSystemHandle ( IntPtr CPointer ) : IntPtr
sfWindow_hasFocus ( IntPtr CPointer ) : bool
sfWindow_isOpen ( IntPtr CPointer ) : bool
sfWindow_pollEvent ( IntPtr CPointer, Event &Evt ) : bool
sfWindow_requestFocus ( IntPtr CPointer ) : void
sfWindow_setActive ( IntPtr CPointer, bool Active ) : bool
sfWindow_setFramerateLimit ( IntPtr CPointer, uint Limit ) : void
sfWindow_setIcon ( IntPtr CPointer, uint Width, uint Height, byte Pixels ) : void
sfWindow_setJoystickThreshold ( IntPtr CPointer, float Threshold ) : void
sfWindow_setKeyRepeatEnabled ( IntPtr CPointer, bool Enable ) : void
sfWindow_setMouseCursorGrabbed ( IntPtr CPointer, bool grabbed ) : void
sfWindow_setMouseCursorVisible ( IntPtr CPointer, bool Show ) : void
sfWindow_setPosition ( IntPtr CPointer, Vector2i position ) : void
sfWindow_setSize ( IntPtr CPointer, Vector2u size ) : void
sfWindow_setTitle ( IntPtr CPointer, string title ) : void
sfWindow_setUnicodeTitle ( IntPtr CPointer, IntPtr title ) : void
sfWindow_setVerticalSyncEnabled ( IntPtr CPointer, bool Enable ) : void
sfWindow_setVisible ( IntPtr CPointer, bool visible ) : void
sfWindow_waitEvent ( IntPtr CPointer, Event &Evt ) : bool

메소드 상세

Close() 공개 메소드

Close (destroy) the window. The Window instance remains valid and you can call Create to recreate the window
public Close ( ) : void
리턴 void

Destroy() 보호된 메소드

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
리턴 void

DispatchEvents() 공개 메소드

Call the event handlers for each pending event
public DispatchEvents ( ) : void
리턴 void

Display() 공개 메소드

Display the window on screen
public Display ( ) : void
리턴 void

HasFocus() 공개 메소드

Check whether the window has the input focus
public HasFocus ( ) : bool
리턴 bool

InternalGetMousePosition() 보호된 메소드

Internal function to get the mouse position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.
protected InternalGetMousePosition ( ) : Vector2i
리턴 Vector2i

InternalGetTouchPosition() 보호된 메소드

Internal function to get the touch position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.
protected InternalGetTouchPosition ( uint Finger ) : Vector2i
Finger uint Finger index
리턴 Vector2i

InternalSetMousePosition() 보호된 메소드

Internal function to set the mouse position relative to the window. This function is protected because it is called by another class of another module, it is not meant to be called by users.
protected InternalSetMousePosition ( Vector2i position ) : void
position Vector2i Relative mouse position
리턴 void

PollEvent() 보호된 메소드

Internal function to get the next event (non-blocking)
protected PollEvent ( Event &eventToFill ) : bool
eventToFill Event Variable to fill with the raw pointer to the event structure
리턴 bool

RequestFocus() 공개 메소드

Request the current window to be made the active foreground window
public RequestFocus ( ) : void
리턴 void

SetActive() 공개 메소드

Activate the window as the current target for rendering
public SetActive ( ) : bool
리턴 bool

SetActive() 공개 메소드

Activate of deactivate the window as the current target for rendering
public SetActive ( bool active ) : bool
active bool True to activate, false to deactivate (true by default)
리턴 bool

SetFramerateLimit() 공개 메소드

Limit the framerate to a maximum fixed frequency
public SetFramerateLimit ( uint limit ) : void
limit uint Framerate limit, in frames per seconds (use 0 to disable limit)
리턴 void

SetIcon() 공개 메소드

Change the window's icon
public SetIcon ( uint width, uint height, byte pixels ) : void
width uint Icon's width, in pixels
height uint Icon's height, in pixels
pixels byte Array of pixels, format must be RGBA 32 bits
리턴 void

SetJoystickThreshold() 공개 메소드

Change the joystick threshold, ie. the value below which no move event will be generated
public SetJoystickThreshold ( float threshold ) : void
threshold float New threshold, in range [0, 100]
리턴 void

SetKeyRepeatEnabled() 공개 메소드

Enable or disable automatic key-repeat. Automatic key-repeat is enabled by default
public SetKeyRepeatEnabled ( bool enable ) : void
enable bool True to enable, false to disable
리턴 void

SetMouseCursorGrabbed() 공개 메소드

Grab or release the mouse cursor
If set, grabs the mouse cursor inside this window's client area so it may no longer be moved outside its bounds. Note that grabbing is only active while the window has focus and calling this function for fullscreen windows won't have any effect (fullscreen windows always grab the cursor).
public SetMouseCursorGrabbed ( bool grabbed ) : void
grabbed bool True to grab, false to release
리턴 void

SetMouseCursorVisible() 공개 메소드

Show or hide the mouse cursor
public SetMouseCursorVisible ( bool show ) : void
show bool True to show, false to hide
리턴 void

SetTitle() 공개 메소드

Change the title of the window
public SetTitle ( string title ) : void
title string New title
리턴 void

SetVerticalSyncEnabled() 공개 메소드

Enable / disable vertical synchronization
public SetVerticalSyncEnabled ( bool enable ) : void
enable bool True to enable v-sync, false to deactivate
리턴 void

SetVisible() 공개 메소드

Show or hide the window
public SetVisible ( bool visible ) : void
visible bool True to show the window, false to hide it
리턴 void

ToString() 공개 메소드

Provide a string describing the object
public ToString ( ) : string
리턴 string

WaitAndDispatchEvents() 공개 메소드

Wait for a new event and dispatch it to the corresponding event handler
public WaitAndDispatchEvents ( ) : void
리턴 void

WaitEvent() 보호된 메소드

Internal function to get the next event (blocking)
protected WaitEvent ( Event &eventToFill ) : bool
eventToFill Event Variable to fill with the raw pointer to the event structure
리턴 bool

Window() 공개 메소드

Create the window from an existing control with default creation settings
public Window ( IntPtr handle ) : System
handle System.IntPtr Platform-specific handle of the control
리턴 System

Window() 공개 메소드

Create the window from an existing control
public Window ( IntPtr Handle, ContextSettings settings ) : System
Handle System.IntPtr Platform-specific handle of the control
settings ContextSettings Creation parameters
리턴 System

Window() 보호된 메소드

Constructor for derived classes
protected Window ( IntPtr cPointer, int dummy ) : System
cPointer System.IntPtr Pointer to the internal object in the C API
dummy int Internal hack :)
리턴 System

Window() 공개 메소드

Create the window with default style and creation settings
public Window ( VideoMode mode, string title ) : System
mode VideoMode Video mode to use
title string Title of the window
리턴 System

Window() 공개 메소드

Create the window with default creation settings
public Window ( VideoMode mode, string title, Styles style ) : System
mode VideoMode Video mode to use
title string Title of the window
style Styles Window style (Resize | Close by default)
리턴 System

Window() 공개 메소드

Create the window
public Window ( VideoMode mode, string title, Styles style, ContextSettings settings ) : System
mode VideoMode Video mode to use
title string Title of the window
style Styles Window style (Resize | Close by default)
settings ContextSettings Creation parameters
리턴 System