SDXFrameWork  0.13
SDXFrameWork
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Static Public Member Functions | Static Public Attributes | Friends | List of all members
SDX::System Class Reference

ライブラリの初期化やシステム的な処理を行う関数群. More...

#include <System.h>

Static Public Member Functions

static void Initialise (const char *ウィンドウ名, int 幅, int 高さ, bool フルスクリーンフラグ=false)
 ライブラリの初期化. More...
 
static bool End ()
 ライブラリの終了処理. More...
 
static bool Update (bool 描画更新フラグ=true)
 各種更新処理をまとめて行う. More...
 
static bool ProcessMessage ()
 OSのメッセージ処理を行う. More...
 
static void Wait (int 停止ミリ秒)
 指定ミリ秒処理を停止する. More...
 
static void WaitKey ()
 なんらかのキーが入力されるまで処理を停止する. More...
 
static Platform GetPlatform ()
 プラットフォームを取得する. More...
 
static bool IsTablet ()
 タブレット端末かどうかを取得. More...
 

Static Public Attributes

static std::string inputText
 
static std::string textComposition
 
static int textCursor
 
static int textSelection_len
 

Friends

class Window
 

Detailed Description

ライブラリの初期化やシステム的な処理を行う関数群.

//Copyright © 2014 SDXFramework
//[License]GNU Affero General Public License, version 3
//[Contact]http://sourceforge.jp/projects/dxframework/
//ライブラリの初期化等を行う
#include <SDXFramework.h>
bool SampleSystem()
{
using namespace SDX;
System::Initialise("sample", 640, 480);//ウィンドウタイトルを指定して、初期化する
Drawing::String({ 10, 10 }, Color::White, "3秒待ちます");
System::Wait(3000);
Drawing::String({ 10, 50 }, Color::White, "何かキーを押したら終了します");
System::End();//ライブラリの終了処理を行う
return true;
}

Member Function Documentation

static void SDX::System::Initialise ( const char *  ウィンドウ名,
int  ,
int  高さ,
bool  フルスクリーンフラグ = false 
)
inlinestatic

ライブラリの初期化.

初期化に失敗した場合、ソフトを強制的に終了する。
一部の設定関数は初期化前に呼び出す必要がある。

static bool SDX::System::End ( )
inlinestatic

ライブラリの終了処理.

この関数を使用した後は速やかにプログラムを終了させなければならない。

static bool SDX::System::Update ( bool  描画更新フラグ = true)
inlinestatic

各種更新処理をまとめて行う.

static bool SDX::System::ProcessMessage ( )
inlinestatic

OSのメッセージ処理を行う.

目安として1/60秒に一回程度、この関数を呼び出す必要があり。 falseを返した場合、速やかにプログラムを終了させなければならない。

Todo:
タブレット版専用の処理色々
static void SDX::System::Wait ( int  停止ミリ秒)
inlinestatic

指定ミリ秒処理を停止する.

static void SDX::System::WaitKey ( )
inlinestatic

なんらかのキーが入力されるまで処理を停止する.

static Platform SDX::System::GetPlatform ( )
inlinestatic

プラットフォームを取得する.

static bool SDX::System::IsTablet ( )
inlinestatic

タブレット端末かどうかを取得.

Todo:
Windowsタブレットだとfalseになる