GaitGeneration by Graph Search
|
ノードの表示・切り替えを行うGUIのクラス. [詳解]
#include <dxlib_gui_display_node_switcher.h>
公開メンバ関数 | |
DxlibGuiDisplayNodeSwitcher (int window_x, int window_y) | |
void | SetGraphData (size_t node_num, const std::vector< size_t > &simulation_end_index) |
GUIに表示するノードの情報を設定する. | |
size_t | GetDisplayNodeNum () const |
現在表示するノードの番号を取得する. | |
constexpr int | GetSimulationNum () const |
現在表示するシミュレーションの番号を取得する. | |
void | Update () override |
GUIの更新,毎フレーム実行すること. | |
void | Draw () const override |
GUIの描画. | |
void | InAnimation (const bool in_animation) |
int | GetAnimeSpeed () const |
![]() | |
AbstractDxlibGui ()=delete | |
AbstractDxlibGui (int width, int height) | |
virtual | ~AbstractDxlibGui ()=default |
void | SetPos (int pos_x, int pos_y, unsigned int option=kDxlibGuiAnchorLeftTop, bool this_is_first_time=false) |
GUIの位置を設定する. Dxlibの画面の座標は左上を原点とし,右下に行くほど値が大きくなる. 横方向にx軸,縦方向にy軸をとる. | |
void | SetVisible (bool visible) override |
GUIの表示を行うかどうかを設定する. | |
constexpr bool | IsVisible () const override |
GUIの表示を行うかどうかを返す. | |
void | ClickedAction (const DxlibMouseState &state) override |
GUIがクリックされたときに実行される関数. CursorOnGuiが true を返すときに呼び出される. 複数のGUIが重なっている場合は,優先度の高いものから順に呼び出される. | |
bool | CursorOnGui (int cursor_x, int cursor_y) const noexcept override |
GUIの上にカーソルがあるかどうかを返す. | |
bool | IsDraggable (int cursor_x, int cursor_y) const override |
ドラッグ可能な位置にあるかを判定する. | |
bool | IsDragged () const override |
ドラッグ中かどうかを取得する. | |
void | SetDragged (const bool is_dragged) override |
ドラッグ中かどうかを設定する. | |
void | DraggedAction (int cursor_dif_x, int cursor_dif_y, unsigned int mouse_key_bit) override |
ドラッグ中の処理を行う. カーソルは上にあるけど,ドラッグ中ではない場合でも呼び出される. | |
![]() | |
virtual | ~IDxlibGui ()=default |
![]() | |
virtual | ~IDxlibClickable ()=default |
![]() | |
virtual | ~IDxlibDraggable ()=default |
その他の継承メンバ | |
![]() | |
void | DrawBackground (const std::string &str) const |
![]() | |
std::vector< std::unique_ptr< SimpleButton > > | button_ |
ボタンのリスト. | |
const int | width_ |
GUIの横幅. | |
const int | height_ |
GUIの縦幅. | |
bool | visible_ { true } |
GUIが表示されているかどうかのフラグ. | |
bool | is_dragging_ { false } |
int | gui_left_pos_x_ { 0 } |
GUIの左端の位置. | |
int | gui_top_pos_y_ { 0 } |
GUIの上端の位置. | |
int | init_pos_x_ { 0 } |
SetされたGUIの左上のX座標. | |
int | init_pos_y_ { 0 } |
SetされたGUIの左上のY座標. | |
int | font_handle_ { -1 } |
フォントハンドル. | |
![]() | |
static constexpr int | kTitleBarHeight { 32 } |
タイトルバーの高さ. | |
ノードの表示・切り替えを行うGUIのクラス.
dxlib_gui_display_node_switcher.h の 24 行目に定義があります。
designlab::DxlibGuiDisplayNodeSwitcher::DxlibGuiDisplayNodeSwitcher | ( | int | window_x, |
int | window_y | ||
) |
|
overridevirtual |
GUIの描画.
designlab::AbstractDxlibGuiを実装しています。
dxlib_gui_display_node_switcher.cpp の 160 行目に定義があります。
|
inline |
dxlib_gui_display_node_switcher.h の 49 行目に定義があります。
size_t designlab::DxlibGuiDisplayNodeSwitcher::GetDisplayNodeNum | ( | ) | const |
|
inlineconstexpr |
|
inline |
dxlib_gui_display_node_switcher.h の 48 行目に定義があります。
void designlab::DxlibGuiDisplayNodeSwitcher::SetGraphData | ( | size_t | node_num, |
const std::vector< size_t > & | simulation_end_index | ||
) |
GUIに表示するノードの情報を設定する.
[in] | node_num | 全ノード数. |
[in] | simulation_end_index | シミュレーションの終了ノード番号. |
dxlib_gui_display_node_switcher.cpp の 113 行目に定義があります。
|
overridevirtual |
GUIの更新,毎フレーム実行すること.
designlab::AbstractDxlibGuiを実装しています。
dxlib_gui_display_node_switcher.cpp の 138 行目に定義があります。