OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::Window Namespace Reference

Functions

void SetTitle (const String &title)
 ウィンドウのタイトルを変更します。 More...
 
SIV3D_CONCEPT_FORMATTABLE_ARGS void SetTitle (const Args &... args)
 ウィンドウのタイトルを変更します。 More...
 
const StringGetTitle () noexcept
 現在のウィンドウのタイトルを返します。 More...
 
const WindowStateGetState () noexcept
 現在のウィンドウの状態を返します。 More...
 
void SetStyle (WindowStyle style)
 ウィンドウスタイルを変更します。 More...
 
WindowStyle GetStyle () noexcept
 現在のウィンドウスタイルを返します。 More...
 
void SetPos (Point pos)
 ウィンドウを指定したスクリーン座標に移動させます。 More...
 
void SetPos (int32 x, int32 y)
 ウィンドウを指定したスクリーン座標に移動させます。 More...
 
Point GetPos () noexcept
 現在のウィンドウの位置をスクリーン座標で返します。 More...
 
void Centering ()
 ウィンドウを現在のモニタのワークエリアの中央に移動させます。 More...
 
void Maximize ()
 ウィンドウを最大化します。 More...
 
void Restore ()
 最大・最小化されたウィンドウを元のサイズに戻します。 More...
 
void Minimize ()
 ウィンドウを最小化します。 More...
 
bool Resize (Size size, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを仮想サイズ基準で変更します。 More...
 
bool Resize (int32 width, int32 height, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを仮想サイズ基準で変更します。 More...
 
bool ResizeVirtual (Size size, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを仮想サイズ基準で変更します。 More...
 
bool ResizeVirtual (int32 width, int32 height, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを仮想サイズ基準で変更します。 More...
 
bool ResizeActual (Size size, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを実サイズ基準で変更します。 More...
 
bool ResizeActual (int32 width, int32 height, s3d::Centering centering=Centering::Yes)
 ウィンドウのクライアントサイズを実サイズ基準で変更します。 More...
 
void SetMinimumFrameBufferSize (Size size)
 ウィンドウを手動でリサイズするときの最小サイズを実サイズ基準で設定します。 More...
 
void SetFullscreen (bool fullscreen, size_t monitorIndex=System::GetCurrentMonitorIndex())
 ウィンドウモードとフルスクリーンモードを切り替えます。 More...
 
void SetToggleFullscreenEnabled (bool enabled)
 Windows 版において、Alt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えを有効にするかを設定します。 More...
 
bool IsToggleFullscreenEnabled ()
 Alt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えが有効であるかを返します。 More...
 

Variables

constexpr StringView DefaultTitle = U"Siv3D App"
 ウィンドウのデフォルトのタイトル More...
 
constexpr Size DefaultClientSize { 800, 600 }
 デフォルトのクライアントサイズ More...
 

Function Documentation

◆ Centering()

void s3d::Window::Centering ( )

ウィンドウを現在のモニタのワークエリアの中央に移動させます。

◆ GetPos()

Point s3d::Window::GetPos ( )
noexcept

現在のウィンドウの位置をスクリーン座標で返します。

Returns
現在のウィンドウの位置

◆ GetState()

const WindowState& s3d::Window::GetState ( )
noexcept

現在のウィンドウの状態を返します。

Returns
現在のウィンドウの状態

◆ GetStyle()

WindowStyle s3d::Window::GetStyle ( )
noexcept

現在のウィンドウスタイルを返します。

Returns
現在のウィンドウスタイル

◆ GetTitle()

const String& s3d::Window::GetTitle ( )
noexcept

現在のウィンドウのタイトルを返します。

Returns
現在のウィンドウのタイトル

◆ IsToggleFullscreenEnabled()

bool s3d::Window::IsToggleFullscreenEnabled ( )

Alt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えが有効であるかを返します。

Returns
Alt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えが有効である場合 true, それ以外の場合は false
Remarks
Windows 版以外では常に false を返します。

◆ Maximize()

void s3d::Window::Maximize ( )

ウィンドウを最大化します。

◆ Minimize()

void s3d::Window::Minimize ( )

ウィンドウを最小化します。

◆ Resize() [1/2]

bool s3d::Window::Resize ( int32  width,
int32  height,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを仮想サイズ基準で変更します。

Parameters
width新しい幅(ピクセル)
height新しい高さ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ Resize() [2/2]

bool s3d::Window::Resize ( Size  size,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを仮想サイズ基準で変更します。

Parameters
size新しいサイズ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ ResizeActual() [1/2]

bool s3d::Window::ResizeActual ( int32  width,
int32  height,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを実サイズ基準で変更します。

Parameters
width新しい幅(ピクセル)
height新しい高さ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ ResizeActual() [2/2]

bool s3d::Window::ResizeActual ( Size  size,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを実サイズ基準で変更します。

Parameters
size新しいサイズ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ ResizeVirtual() [1/2]

bool s3d::Window::ResizeVirtual ( int32  width,
int32  height,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを仮想サイズ基準で変更します。

Parameters
width新しい幅(ピクセル)
height新しい高さ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ ResizeVirtual() [2/2]

bool s3d::Window::ResizeVirtual ( Size  size,
s3d::Centering  centering = Centering::Yes 
)

ウィンドウのクライアントサイズを仮想サイズ基準で変更します。

Parameters
size新しいサイズ(ピクセル)
centeringウィンドウを画面の中心に移動させるか
Returns
サイズの変更に成功した場合 true, それ以外の場合は false

◆ Restore()

void s3d::Window::Restore ( )

最大・最小化されたウィンドウを元のサイズに戻します。

◆ SetFullscreen()

void s3d::Window::SetFullscreen ( bool  fullscreen,
size_t  monitorIndex = System::GetCurrentMonitorIndex() 
)

ウィンドウモードとフルスクリーンモードを切り替えます。

Parameters
fullscreenフルスクリーンモードにする場合 true, ウィンドウモードにする場合 false
monitorIndex表示するモニタのインデックス

◆ SetMinimumFrameBufferSize()

void s3d::Window::SetMinimumFrameBufferSize ( Size  size)

ウィンドウを手動でリサイズするときの最小サイズを実サイズ基準で設定します。

Parameters
size設定するサイズ(ピクセル)

◆ SetPos() [1/2]

void s3d::Window::SetPos ( int32  x,
int32  y 
)

ウィンドウを指定したスクリーン座標に移動させます。

Parameters
x移動先のスクリーン X 座標
y移動先のスクリーン Y 座標

◆ SetPos() [2/2]

void s3d::Window::SetPos ( Point  pos)

ウィンドウを指定したスクリーン座標に移動させます。

Parameters
pos移動先のスクリーン座標

◆ SetStyle()

void s3d::Window::SetStyle ( WindowStyle  style)

ウィンドウスタイルを変更します。

Parameters
style新しいウィンドウスタイル

◆ SetTitle() [1/2]

SIV3D_CONCEPT_FORMATTABLE_ARGS void s3d::Window::SetTitle ( const Args &...  args)
inline

ウィンドウのタイトルを変更します。

Template Parameters
...Args新しいタイトルの値の型
Parameters
...args新しいタイトル

◆ SetTitle() [2/2]

void s3d::Window::SetTitle ( const String title)

ウィンドウのタイトルを変更します。

Parameters
title新しいタイトル

◆ SetToggleFullscreenEnabled()

void s3d::Window::SetToggleFullscreenEnabled ( bool  enabled)

Windows 版において、Alt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えを有効にするかを設定します。

Parameters
enabledAlt + Enter キーによるウィンドウモードとフルスクリーンモードの切り替えを有効にする場合は true, 無効にする場合は false
Remarks
Windows 版ではデフォルトで有効、それ以外のプラットフォームでは常に無効です。

Variable Documentation

◆ DefaultClientSize

constexpr Size s3d::Window::DefaultClientSize { 800, 600 }
inlineconstexpr

デフォルトのクライアントサイズ

◆ DefaultTitle

constexpr StringView s3d::Window::DefaultTitle = U"Siv3D App"
inlineconstexpr

ウィンドウのデフォルトのタイトル