OROCHI
 
Loading...
Searching...
No Matches
GxGuiSystem.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17#define GX_GUI_USE_PROFILE 0 // Guiのプロファイルを使用する
18
19#if GX_GUI_USE_PROFILE
20#define GX_GUI_PROFILE( name ) GX_PROFILE_COLOR_ADJUST( name, GxProfiler::ColorBaseTool )
21#else //GX_GUI_USE_PROFILE
22#define GX_GUI_PROFILE( name ) (static_cast<void>(0))
23#endif // !GX_GUI_USE_PROFILE
24
25class GxGuiDesktop;
26class GxGuiGraphics;
27class GxGuiWindow;
28class GxGuiProperty;
29
30#define MULTI_SELECT_DISP 1 // 複数選択時、値が異なるときの表示を使用
31
32//===========================================================================
35//===========================================================================
36class GxGuiConfig : public GxClassBase
37{
38 //-----------------------------------------------------------
40 //-----------------------------------------------------------
42public:
44 enum class GUI_ROTATE
45 {
46 XYZ = 0,
47 XZY,
48 YXZ,
49 YZX,
50 ZXY,
51 ZYX,
52 QUATERNION,
53 MAX,
54 };
55#if GX_DEVELOP
57 GX_ENUM_TABLE_MAX(GUI_ROTATE)
58#endif //GX_DEVELOP
59
60 // RTTI定義
61 GX_RTTI_CLASS(GxGuiConfig, GxClassBase)
62 // new, delete定義
63 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
64
65
66 //-----------------------------------------------------------
68 //-----------------------------------------------------------
70
72 GxGuiConfig(void);
73
75 //-----------------------------------------------------------
77 //-----------------------------------------------------------
79
81 void loadJson(const GxJson::GxJsonNode& jsonNode);
82
84 //-----------------------------------------------------------
86 //-----------------------------------------------------------
88
90 GX_FORCE_INLINE b32 isRotateTabEnable(GUI_ROTATE gui) const { return _rotateTabEnable.isFlag(gui); }
92 constexpr GUI_ROTATE getRotateTabDefault(void) const { return _rotateTabDefault; }
94 constexpr f32 getRotateSliderStep(void) const { return _rotateSliderStep; }
96 constexpr s32 getRotateFloatFormat(void) const { return _rotateFloatFormat; }
97
99 GxGuiConfig& operator = (const GxGuiConfig& v);
101 GX_FORCE_INLINE void set(GxGuiConfig& v) { *this = v; }
103 void setDefault(void);
104
106 //-----------------------------------------------------------
108 //-----------------------------------------------------------
110
111 GxFlag32Index<GUI_ROTATE> _rotateTabEnable;
112 GUI_ROTATE _rotateTabDefault;
113 f32 _rotateSliderStep;
114 s32 _rotateFloatFormat;
115
117};
118
119//===========================================================================
122//===========================================================================
123class GxGuiSystem : public GxClassBaseReference, public SingletonBase<GxGuiSystem>
124{
125 //-----------------------------------------------------------
127 //-----------------------------------------------------------
129public:
130 // RTTI宣言
131 GX_RTTI_ABSTRACT_CLASS(GxGuiSystem, GxClassBaseReference)
132 // GxClassBaseReference継承クラス用禁止宣言
134 // new, delete定義
135 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
136
137 // コールバック:GxGuiPropertyのsetPropertyValueが呼ばれた時
138 typedef void (GxClassBaseRoot::* SET_PROP_VALUE_CALLBACK)(GxGuiProperty* pSender);
139
140private:
142 struct GxGuiHistoryParam : public GxStructBase
143 {
144 //-----------------------------------------------------------
146 //-----------------------------------------------------------
148
149 // RTTI宣言
150 GX_RTTI_STRUCT(GxGuiHistoryParam)
151 // new, delete定義
152 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
153
154
155 //-----------------------------------------------------------
157 //-----------------------------------------------------------
159
160 GxGuiProperty* _pGuiProperty;
161 b32 _b32Param;
162 f64 _f64Param;
163 s64 _s64Param;
164 u64 _u64Param;
165 GxString _stringParam;
166
168 };
169
171 class GxInfoOnSetPropertyValue : GxClassBase
172 {
173 //-----------------------------------------------------------
175 //-----------------------------------------------------------
177 public:
179 GxInfoOnSetPropertyValue(GxClassBaseRoot* pOwner, SET_PROP_VALUE_CALLBACK pCallback)
180 : _pOwner(pOwner)
181 , _pCallback(pCallback)
182 {}
183
185 //-----------------------------------------------------------
187 //-----------------------------------------------------------
189
190 GxClassBaseRoot* _pOwner;
191 SET_PROP_VALUE_CALLBACK _pCallback;
192
194 };
195
197 static constexpr u32 SERIALIZE_TEMPORARY_SIZE = GxMath::VALUE_1M;
198
200 //-----------------------------------------------------------
202 //-----------------------------------------------------------
204public:
206 GxGuiSystem(void);
207
209 //-----------------------------------------------------------
211 //-----------------------------------------------------------
213public:
215 b32 initialize(void);
217 void cleanup(void) override;
219 void update( void );
221 void render( void );
222
223#if GX_EDITOR
225 void setTopWindowAll(HWND exceptHandle = nullptr);
227 void setMinimumWindowAll(void);
229 void setNormalWindowAll(void);
230#endif //GX_EDITOR
231
233 void reserveDeleteGui( GxGuiBase* pGui );
234private:
236 void emptyDeleteReservationList( void );
237
238protected:
240 void drawAutoScroll(void);
241
242public:
246 void addHistoryParam(GxGuiProperty* pGuiProperty);
247
250 void eraceAllHistoryParam(void);
251
254 void eraceHistoryParam(GxGuiProperty* pGuiProperty);
255
258 b32 isExistHistoryParam(GxGuiProperty* pGuiProperty);
259
260protected:
264 void executeUndo(void);
265
269 void executeRedo(void);
270
273 void applyHistoryParam(GxGuiHistoryParam* pGuiHistoryParam);
274
275public:
277 void setCallbackOnSetPropertyValue(GxClassBaseRoot* pOwner, SET_PROP_VALUE_CALLBACK pFunction);
278
280 void removeCallbackOnSetPropertyValue(GxClassBaseRoot* pOwner, SET_PROP_VALUE_CALLBACK pFunction);
281
283 void onSetPropertyValue(GxGuiProperty* pSender);
284
286 //-----------------------------------------------------------
288 //-----------------------------------------------------------
290public:
291#if GX_EDITOR
293 GxGuiWindow* getGuiWindow(HWND windowHandle);
294#endif //GX_EDITOR
295
297 GxGuiBase* getGui( const GxPoint2& position );
298
300 GX_FORCE_INLINE void setEditMode( b32 editMode ){ _editMode = editMode; }
301
304 GX_FORCE_INLINE b32 isEditMode( void ) const { return _editMode; }
305
307 GX_FORCE_INLINE const GxString& getEditParam( void ) const { return _editParam; }
308
310 s32 calcCursorPositionFromPosition( const GxPoint2& position ) const;
311
313 constexpr s32 getEditParamCursorPosition( void ) const { return _editParamCursorPosition; }
314
316 void setEditParamCursorPosition( s32 position, b32 select = false );
317
319 void setEditParam( const GxString& editParam );
320
322 void deleteEditParamSelected( void );
323
325 void selectAllEditParam( void );
326
328 void popEditParam( void );
329
331 void copyParamSelected( void );
332
334 void cutParamSelected( void );
335
337 void pasteParamSelected( void );
338
341 constexpr GxGuiDesktop* getDesktop( void ) const { return _pDesktop; }
342
345 constexpr GxGuiBase* getFocus( void ) const { return _pFocus; }
346
348 void setFocus( GxGuiBase* pFocus );
349
351 constexpr GxGuiBase* getModalGui(void) const { return _pModalGui; }
353 void setModalMode( GxGuiBase* pGui, b32 on );
354
356 void setInScreenWindow( void );
357
360 void editParam( GxKeyboard::KEY key );
361
362#if defined( _WINDOWS )
365 constexpr GX_CHAR* getDialogEdit( void ){ return _dialogEdit; }
366
369 constexpr u32 getDialogEditSize( void ) const { return sizeof( _dialogEdit ); }
370
371#endif //_WINDOWS
372
374 void drawEditParam( const GxRect& drawRect, const GxColor& color );
375
377 void setPopupHover( const GxPoint2& position, GX_CSTR message, const GxGuiBase* pOwner, b32 useAdjust = true );
378
380 void setMessageBox( const GxString& message, const GxString& caption );
381
383 b32 isFocusedDesktop( void ) const;
384
386 b32 isOnDesktopMousePosition( void ) const;
387
389 GX_FORCE_INLINE void setDrawAutoScroll( const GxPoint2& start, const GxPoint2& end ){ _isDrawAutoScroll = true; _autoScrollStartPosition = start; _autoScrollEndPosition = end; }
390
392 b32 isClickTarget( GxGuiBase* pGui ) const;
393
395 GX_FORCE_INLINE void useRealFloatFormat( b32 isUse ) { _isRealFloatFormat = isUse; }
397 GX_FORCE_INLINE b32 isRealFloatFormat(void) const { return _isRealFloatFormat; }
399 GX_FORCE_INLINE GxGuiConfig* getGuiConfig(void) { return &_guiConfig; }
400
402 GX_FORCE_INLINE void setStopRTDPlayByClick( b32 isUse ) { _isStopRTDPlayByClick = isUse; }
404 GX_FORCE_INLINE b32 getStopRTDPlayByClick(void) const { return _isStopRTDPlayByClick; }
406 GX_FORCE_INLINE void setRTDWheelScroll( b32 isUse ) { _useRTDWheelScroll = isUse; }
408 GX_FORCE_INLINE b32 getRTDWheelScroll(void) const { return _useRTDWheelScroll; }
410 b32 isFocused(void);
411
413 constexpr GxGuiBase* getOnMouseGUI(void) const { return _pOnMouse; }
415 constexpr GxGuiWindow* getOnMouseWindow(void) const { return _pOnMouseWindow; }
417 constexpr GxGuiWindow* getDragWindow(void) const { return _pDragWindow; }
419 constexpr void setDragWindow(GxGuiWindow* pWindow) { _pDragWindow = pWindow; }
421 constexpr void setStartDragGUI(GxGuiBase* pGui) { _pStartDragGUI = pGui; }
422
424 //-----------------------------------------------------------
426 //-----------------------------------------------------------
428private:
429 GxArray _listOnSetPropertyValue;
430protected:
431 GxGuiGraphics* _pGuiGraphics;
432 GxGuiDesktop* _pDesktop;
433
434 GxGuiBase* _pFocus;
435 GxGuiBase* _pModalGui;
436 GxGuiBase* _pOnMouse;
437 GxGuiWindow* _pOnMouseWindow;
438 GxGuiBase* _pClickTarget;
439 GxGuiWindow* _pDragWindow;
440 GxGuiBase* _pStartDragGUI;
441
442 GxArrayClassBaseReference _guiDeleteReservationList;
443
444 b32 _editMode;
445 GxString _editParam;
446 GxString _saveParam;
447
448 s32 _editParamCursorPosition;
449 s32 _editParamCursorTimer;
450
451 s32 _editParamSelectStartPosition;
452 s32 _editParamSelectEndPosition;
453
454#if defined( _WINDOWS ) || defined(_PS4) || defined(_PS5)
455 GX_CHAR _dialogEdit[GxMath::VALUE_512];
456#endif // _WINDOWS || _PS4 || _PS5
457
458 s32 _counter;
459
460 GxProperty _copyObjectProperty;
461 u32 _copyObjectArrayCount;
462
463 GX_CHAR _serializeTemporaryBuffer[ SERIALIZE_TEMPORARY_SIZE ];
464
465 b32 _isDrawAutoScroll;
466 GxPoint2 _autoScrollStartPosition;
467 GxPoint2 _autoScrollEndPosition;
468
469 // undo/redo用
470 GxList _guiHistoryParamList;
471 GxList::GxNode* _pGuiHistoryCurrentNode;
472 f32 _keyPushTimerForUndo;
473 f32 _keyPushTimerForRedo;
474 GxCriticalSection _historyListCriticalSection;
475
476 // その他
477 b32 _isRealFloatFormat;
478 b32 _useRTDWheelScroll;
479 b32 _isStopRTDPlayByClick;
480 GxGuiConfig _guiConfig;
481
483};
484
485// アクセスインターフェイス
486GX_FORCE_INLINE GxGuiSystem* getGxGuiSystem(void){ return GxGuiSystem::getSingletonPointer(); }
487
488//===========================================================================
490//===========================================================================
491class GxGuiGraphics : public GxClassBaseReference, public SingletonBase<GxGuiGraphics>
492{
493 //-----------------------------------------------------------
495 //-----------------------------------------------------------
497public:
498 // RTTI
499 GX_RTTI_ABSTRACT_CLASS(GxGuiGraphics, GxClassBaseReference)
500 // GxClassBaseReference継承クラス用禁止宣言
502 // new, delete定義
503 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
504
505
506 enum LAYOUT
507 {
508 LAYOUT_CENTER_HORIZON = (1<<0),
509 LAYOUT_CENTER_VERTICAL = (1<<1),
510 LAYOUT_LEFT = (1<<2),
511 LAYOUT_RIGHT = (1<<3),
512 LAYOUT_TOP = (1<<4),
513 LAYOUT_BOTTOM = (1<<5),
514
515 LAYOUT_CENTER = LAYOUT_CENTER_HORIZON | LAYOUT_CENTER_VERTICAL,
516
517 LAYOUT_HORIZON_MASK = LAYOUT_CENTER_HORIZON | LAYOUT_LEFT | LAYOUT_RIGHT,
518 LAYOUT_VERTICAL_MASK = LAYOUT_CENTER_VERTICAL | LAYOUT_TOP | LAYOUT_BOTTOM
519 };
520
522 static constexpr u32 ICON_FULL_SIZE_WIDTH = 16;
524 static constexpr u32 ICON_FULL_SIZE_HEIGHT = 16;
525
527 enum class MOUSE_CURSOR
528 {
529 ARROW = 0,
530 SIZEALL,
531 SIZEWE,
532 SIZENESW,
533 SIZENS,
534 SIZENWSE,
535 IBEAM,
536 MAX
537 };
538
540 static const GxColor WINDOW_FRAME_COLOR_DEFAULT;
542 static const GxColor WINDOW_BACK_COLOR_DEFAULT;
544 static const GxColor TEXT_COLOR_DEFAULT;
546 static const GxColor KEY_WORD_1_COLOR_DEFAULT;
548 static const GxColor KEY_WORD_2_COLOR_DEFAULT;
550 static const GxColor FOCUS_COLOR_DEFAULT;
552 static const GxRect EXPAND_FRAMERECT_DEFAULT;
554 static const GxSize MOUSE_CURSOR_SIZE;
555
557 enum class ICON_DOCKING_TYPE
558 {
559 // 子画面無し
560 LEFT_4 = 0,
561 TOP_4,
562 RIGHT_4,
563 BOTTOM_4,
564 LEFT_TOP_4,
565 RIGHT_TOP_4,
566 LEFT_BOTTOM_4,
567 RIGHT_BOTTOM_4,
568 // 子画面あり
569 LEFT_TOP_8,
570 TOP_8,
571 RIGHT_TOP_8,
572 LEFT_8,
573 RIGHT_8,
574 LEFT_BOTTOM_8,
575 BOTTOM_8,
576 RIGHT_BOTTOM_8,
577
578 LEFT_ALL_8,
579 RIGHT_ALL_8,
580 TOP_ALL_8,
581 BOTTOM_ALL_8,
582 MAX
583 };
584
585 // インナークラス
586 class GxIcon;
587 class GxMouseCursor;
588
590 //-----------------------------------------------------------
592 //-----------------------------------------------------------
594public:
596 GxGuiGraphics(void);
597
599 //-----------------------------------------------------------
601 //-----------------------------------------------------------
603public:
605 b32 initialize(void);
607 void cleanup(void) override;
609 void update(void) {}
610
611#if GX_DEVELOP
613 static GxGuiBase* createGui(GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index);
614#endif //GX_DEVELOP
615
617 void drawIconF( const GxRect& rect, GX_HANDLE handle, const GxColor& color = GxColor::WHITE );
619 void drawIconG( const GxRect& rect, GX_HANDLE handle, const GxColor& color0, const GxColor& color1, const GxColor& color2, const GxColor& color3 );
621 void drawIconF( const GxRect& rect, GX_HANDLE handle, const GxVector2& rotateCenter, const f32 rotateRadian, const GxColor& color = GxColor::WHITE );
623 void drawIconG( const GxRect& rect, GX_HANDLE handle, const GxVector2& rotateCenter, const f32 rotateRadian, const GxColor& color0, const GxColor& color1, const GxColor& color2, const GxColor& color3 );
624
626 static void drawFrame( const GxRect& frameRect,const GxColor& frameLeftColor, const GxColor& frameTopColor, const GxColor frameRightColor, const GxColor& frameBottomColor );
628 GX_FORCE_INLINE static void drawFrame( const GxRect& frameRect,const GxColor& frameLeftTopColor, const GxColor& frameRightBottomColor ){ drawFrame(frameRect,frameLeftTopColor,frameLeftTopColor,frameRightBottomColor,frameRightBottomColor); }
630 GX_FORCE_INLINE static void drawFrame( const GxRect& frameRect,const GxColor& frameColor ){ drawFrame(frameRect,frameColor,frameColor); }
631
633 static void drawFrame( const GxRect& frameRect, b32 in, const GxColor& color );
634
636 static void drawFrameRect( const GxRect& frameRect, b32 in, const GxColor& color );
637
641 GX_FORCE_INLINE void drawFrame( const GxRect& frameRect, b32 in = false ){ drawFrame( frameRect,in,getWindowFrameColor() ); }
642
646 GX_FORCE_INLINE void drawFrameRect( const GxRect& frameRect, b32 in = false ){ drawFrameRect( frameRect,in,getWindowFrameColor() ); }
647
650 void drawSelectedRect( const GxRect& rect );
651
653 static GxSize calculateStringSize( GX_CSTR string, u32 offset );
655 static GxSize calculateStringSize(GxString::GxTokenizer& tokenizer);
657 GX_FORCE_INLINE static GxSize calculateStringSize( GX_CSTR string){ return calculateStringSize(string, GX_STRLEN(string) ); }
659 static GxSize calculateStringSizeLine( GX_CSTR string, u32 offset );
661 GX_FORCE_INLINE static GxSize calculateStringSizeLine( GX_CSTR string){ return calculateStringSizeLine(string, GX_STRLEN(string) ); }
663 static u32 getStringOffset( GX_CSTR string, u32 length );
665 static u32 getStringOffsetUtf8( GX_CSTR string, u32 length );
667 static u32 getStringOffsetSjis( GX_CSTR string, u32 length );
668
670 GX_FORCE_INLINE static GxString clipString(GX_CSTR string, const GxSize& size, b32 clipTop = false) { GxString temporary(string); clipStringDirect(temporary, size, clipTop ); return temporary; }
672 static void clipStringDirect( GxString& string, const GxSize& size, b32 clipTop = false);
674 GX_FORCE_INLINE static GxString clipAndAddString( GX_CSTR string, const GxSize& size, b32 clipTop, GX_CSTR stringAdd){ GxString temporary(string); clipAndAddStringDirect(temporary, size, clipTop, stringAdd); return temporary; }
676 static void clipAndAddStringDirect(GxString&, const GxSize& size, b32 clipTop, GX_CSTR stringAdd);
678 static void clipAndAddStringDirectAndLineBreak( GxString& string, const GxSize& size, GX_CSTR stringAdd, u32 fontHeight );
680 static void drawLayoutString( const GxRect& rect, GX_CSTR string, const GxColor& color, const GxFlag32Bit& layout );
682 static GxRect calculateLayoutString( const GxRect& rect, GX_CSTR string, const GxFlag32Bit& layout );
684 static GxRect calculateLayout( const GxRect& rect, const GxSize &size, const GxFlag32Bit& layout );
685
686public:
688 const GxGuiGraphics::GxIcon* getIcon(GX_HANDLE handle) const;
689private:
691 void calcIconUV(const GxPoint2& uv0, const GxPoint2& uv1, GxVector2& dstUv0, GxVector2& dstUv1) const;
692
694 //-----------------------------------------------------------
696 //-----------------------------------------------------------
698public:
700 GX_FORCE_INLINE void setWindowFrameColor( const GxColor& windowFrameColor ){ _windowFrameColor = windowFrameColor; }
702 GX_FORCE_INLINE const GxColor& getWindowFrameColor( void ) const { return _windowFrameColor; }
703
705 GX_FORCE_INLINE void setWindowBackColor( const GxColor& windowBackColor ){ _windowBackColor = windowBackColor; }
707 GX_FORCE_INLINE const GxColor& getWindowBackColor( void ) const { return _windowBackColor; }
708
710 GX_FORCE_INLINE void setTextColor( const GxColor& textColor ){ _textColor = textColor; }
712 GX_FORCE_INLINE const GxColor& getTextColor( void ) const { return _textColor; }
713
715 GX_FORCE_INLINE void setKeyWord1Color( const GxColor& keyWord1Color ){ _keyWord1Color = keyWord1Color; }
717 GX_FORCE_INLINE const GxColor& getKeyWord1Color( void ) const { return _keyWord1Color; }
718
720 GX_FORCE_INLINE void setKeyWord2Color( const GxColor& keyWord2Color ){ _keyWord2Color = keyWord2Color; }
722 GX_FORCE_INLINE const GxColor& getKeyWord2Color( void ) const { return _keyWord2Color; }
723
725 GX_FORCE_INLINE void setSelectedColor( const GxColor& selectedColor ){ _selectedColor = selectedColor; }
727 GX_FORCE_INLINE const GxColor& getSelectedColor( void ) const { return _selectedColor; }
728
730 GX_FORCE_INLINE GxColor getGrayOutColor( void ) const { return GxColor::getLerp( _textColor, _windowBackColor, 0.5f ); }
731
732 // ドッキングガイドアイコンハンドル取得
733 constexpr GX_HANDLE getDockingGuideIconHandle( ICON_DOCKING_TYPE type ) const { return _hDockingIcon[static_cast<s32>(type)]; }
734
735 // システムアイコンハンドル取得
736 GX_HANDLE getSystemIconHandle(GxRtti::ICON_TYPE type, bool isSize64 = false) const;
737
739 GX_HANDLE createIcon( GxResTexture* pResTexture, const GxVector2& uv0, const GxVector2& uv1 );
740
742 GX_HANDLE createIcon( GxResTexture* pResTexture, const GxRect& uvRect );
743
745 void deleteIcon( GX_HANDLE handle );
746
748 void loadIcon( GX_CSTR pFilePath, GX_HANDLE* pHandles );
749
751 void drawMouseCursor( const GxPoint2& position ) const;
752
754 void createMouseCursor( MOUSE_CURSOR mouseCursor, GxResTexture* pResTexture, const GxRect& rect );
755
757 void createMouseCursor( MOUSE_CURSOR mouseCursor, GxResTexture* pResTexture, const GxVector2& uv0, const GxVector2& uv1 );
758
760 void loadMouseIcon(void);
761
763 constexpr void setMouseCursor( MOUSE_CURSOR mouseCursor ){ _mouseCursor = mouseCursor; }
764
765 // プロパティ表示時のフレーム枠設定
766 GX_FORCE_INLINE void setExpandFrameRect( const GxRect& rect ){ _expandFrameRect = rect; }
767
768 // プロパティ表示時のフレーム枠取得
769 GX_FORCE_INLINE const GxRect& getExpandFrameRect( void ) const { return _expandFrameRect; }
770
772 void setButtonOffColorDefault( void );
773
775 void setButtonOnColorDefault( void );
776
778 void setButtonOffColor( const GxColor& color0, f32 value0, const GxColor& color1, f32 value1, const GxColor& color2, f32 value2, const GxColor& color3, f32 value3 );
779
781 void setButtonOnColor( const GxColor& color0, f32 value0, const GxColor& color1, f32 value1, const GxColor& color2, f32 value2, const GxColor& color3, f32 value3 );
782
784 void getButtonOffColor( GxColor& color0, f32& value0, GxColor& color1, f32& value1, GxColor& color2, f32& value2, GxColor& color3, f32& value3 ) const;
785
787 void getButtonOnColor( GxColor& color0, f32& value0, GxColor& color1, f32& value1, GxColor& color2, f32& value2, GxColor& color3, f32& value3 ) const;
788
790 void getButtonOffColor( GxColor color[], const GxColor& baseColor ) const;
791
793 void getButtonOnColor( GxColor color[], const GxColor& baseColor ) const;
794
796 //-----------------------------------------------------------
798 //-----------------------------------------------------------
800protected:
801 GxColor _windowFrameColor;
802 GxColor _windowBackColor;
803 GxColor _textColor;
804 GxColor _keyWord1Color;
805 GxColor _keyWord2Color;
806 GxColor _selectedColor;
807
808 GxRect _expandFrameRect;
809
810 // OffColor
811 GxColor _buttonOffColor[ 4 ];
812 f32 _buttonOffColorRatio[ 4 ];
813
814 // OnColor
815 GxColor _buttonOnColor[ 4 ];
816 f32 _buttonOnColorRatio[ 4 ];
817
818 GX_HANDLE _hDockingIcon[static_cast<s32>(ICON_DOCKING_TYPE::MAX)];
819
820 GX_HANDLE _hSystemIcon[static_cast<s32>(GxRtti::ICON_TYPE::MAX)];
821 GX_HANDLE _hSystemIcon64[static_cast<s32>(GxRtti::ICON_TYPE_64::MAX)];
822
823 MOUSE_CURSOR _mouseCursor;
824 GxPoint2 _mouseCursorOffset;
825 GxSize _mouseCursorSize;
826
827 GxArrayClassBaseReference _systemIconList;
828 GxArrayClassBaseReference _mouseIconList;
829
831};
832
833//===========================================================================
835//===========================================================================
836class GxGuiGraphics::GxIcon : public GxClassBaseReference
837{
838 //-----------------------------------------------------------
840 //-----------------------------------------------------------
842public:
843 // RTTI
844 GX_RTTI_CLASS(GxIcon, GxClassBaseReference)
845 // GxClassBase継承クラス用禁止宣言
847 // new, delete定義
848 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
849
850
851 //-----------------------------------------------------------
853 //-----------------------------------------------------------
855public:
857 GxIcon(void);
859 GxIcon(GxResTexture* pResTexture, const GxVector2& uv0, const GxVector2& uv1);
860
862 void cleanup( void ) override;
863
865 //-----------------------------------------------------------
867 //-----------------------------------------------------------
869public:
870 GX_HANDLE _handle;
871 GxResTexture* _pResTexture;
872 GxVector2 _uv0;
873 GxVector2 _uv1;
874
876};
877
878//===========================================================================
880//===========================================================================
881class GxGuiGraphics::GxMouseCursor : public GxClassBaseReference
882{
883 //-----------------------------------------------------------
885 //-----------------------------------------------------------
887public:
888 // RTTI
889 GX_RTTI_CLASS(GxMouseCursor, GxClassBaseReference)
890 // GxClassBaseReference継承クラス用禁止宣言
892 // new, delete定義
893 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
894
895
896 //-----------------------------------------------------------
898 //-----------------------------------------------------------
900public:
902 GxMouseCursor(void);
904 GxMouseCursor(MOUSE_CURSOR icon, GxResTexture* pResTexture, const GxVector2& uv0, const GxVector2& uv1);
905
906 // 解放
907 void cleanup( void ) override;
908
910 //-----------------------------------------------------------
912 //-----------------------------------------------------------
914public:
915 MOUSE_CURSOR _id;
916 GxResTexture* _pResTexture;
917 GxVector2 _uv0;
918 GxVector2 _uv1;
919
921};
922
923// アクセスインターフェイス
924GX_FORCE_INLINE GxGuiGraphics* getGxGuiGraphics(void){ return GxGuiGraphics::getSingletonPointer(); }
925
926GX_CORE_NAMESPACE_END()
927
928#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
@ MAX
定義数
void GxTypedObject
その他
Definition GxDefine.h:213
u32 GX_HANDLE
ハンドル
Definition GxDefine.h:214
#define GX_STRLEN(__STRING__)
文字列の長さ取得
Definition GxString.h:604
参照カウンタ用配列クラス
Definition GxArrayClassBase.h:145
配列クラス
Definition GxArray.h:18
オブジェクト基底クラス
Definition GxBase.h:88
参照オブジェクト基底クラス
Definition GxBase.h:122
virtual void cleanup(void)
delete直前に呼び出される関数
Definition GxBase.cpp:248
基底クラス
Definition GxBase.h:51
constexpr GxClassBaseRoot & operator=(const GxClassBaseRoot &)
代入演算子
Definition GxBase.h:64
クリティカルセクションクラス
Definition GxThread.h:20
JSON解析用ノード
Definition GxJson.h:108
連結リストノードクラス
Definition GxList.h:106
連結リストクラス
Definition GxList.h:18
static constexpr u32 VALUE_512
512
Definition GxMath.h:128
static constexpr u32 VALUE_1M
1M
Definition GxMath.h:139
プロパティクラス
Definition GxProperty.h:48
テクスチャリソース
Definition GxResTexture.h:23
実行時型情報クラス
Definition GxRtti.h:154
ICON_TYPE
アイコンタイプ定義
Definition GxRtti.h:202
シングルトン基礎クラス
Definition GxSingleton.h:19
Definition GxColor.h:21
static GX_FORCE_INLINE GxColor getLerp(const GxColor color0, const GxColor color1, f32 t)
補間値を取得(互換用)
Definition GxColor.inl:468
static const GxColor WHITE
Definition GxColor.h:37
ビット指定型フラグ
Definition GxStruct.h:1338
インデックス指定型フラグ
Definition GxStruct.h:1294
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
トークン操作クラス
Definition GxString.h:337
文字列型クラス
Definition GxString.h:18
Definition GxBase.h:24
2次元ベクトル
Definition GxVector.h:34
32bitブーリアン
Definition GxDefine.h:173