14GX_CORE_NAMESPACE_BEGIN()
19class GxToolContentManager : public GxToolBase
32 class GxGuiAddressBar;
33 class GxGuiContentView;
42 GxToolContentManager(
void );
45 b32 initialize(
void )
override;
57 void onSize(
const GxSize& size )
override;
61 const GxString& getCurrentDirectory(
void)
const;
63 void setCurrentDirectory(
const GxString& directoryPath,
const GxString& fileName,
const GxString& extensionFilter );
66 void updateDisplay(
const GxString* pPath =
nullptr);
70 void updatePropertySearchStringCallback(
const GxString& value );
73 void getPropertyListViewFlag(
void*
const pValue );
75 void setPropertyListViewFlag(
const void*
const pValue );
84 GX_FORCE_INLINE
void resetSearchString(
void ) { _pGuiSearchBar->setSearchString(
""); }
92 GxGuiSplitter* _pGuiSplitterMain;
93 GxGuiSplitter* _pGuiSplitterSub;
95 GxGuiContentView* _pGuiContentView;
96 GxGuiPropertySearchBar* _pGuiSearchBar;
104class GxToolContentManager::GxGuiAddressBar :
public GxGuiForm
112 GX_RTTI_CLASS( GxToolContentManager::GxGuiAddressBar, GxGuiForm )
127 GxGuiAddressBar(
void );
129 GxGuiAddressBar( GxToolContentManager* pTool, GxGuiContentView* pGuiContentView );
132 b32 initialize(
void )
override;
134 void cleanup(
void )
override;
143 void update(
void )
override;
145 void onDraw(
void )
override;
148 void onClick(
const GxPoint2& position, u32 button )
override;
151 void onSize(
const GxSize& size )
override;
155 void updatePath(
void );
157 void clearPath(
void );
159 void updateDrawPath(
void );
167 GxToolContentManager* _pParentTool;
168 GxGuiContentView* _pGuiContentView;
170 GxAddressIcon* _pPreviousDirectoryIcon;
171 GxAddressIcon* _pNextDirectoryIcon;
184class GxToolContentManager::GxGuiAddressBar::GxAddressPath :
public GxClassBase
192 GX_RTTI_CLASS( GxToolContentManager::GxGuiAddressBar::GxAddressPath,
GxClassBase )
203 GxAddressPath(
void );
207 ~GxAddressPath(
void )
override {}
216 GX_FORCE_INLINE
b32 isDraw(
void )
const {
return _drawFlag; }
218 GX_FORCE_INLINE
void setDraw(
b32 flag ) { _drawFlag = flag; }
221 GX_FORCE_INLINE
const GxString& getPath(
void )
const {
return _path; }
223 GX_FORCE_INLINE
const GxString& getName(
void )
const {
return _name; }
225 GX_FORCE_INLINE
const GxSize getDrawSize(
void )
const {
return GxGuiGraphics::calculateStringSize( _name.getString() ); }
228 GX_FORCE_INLINE
const GxRect& getDrawRect(
void )
const {
return _drawRect; }
230 GX_FORCE_INLINE
void setDrawRect(
const GxPoint2& point ) { _drawRect =
GxRect( point, getDrawSize() ); }
251class GxToolContentManager::GxGuiAddressBar::GxAddressIcon :
public GxClassBase
259 GX_RTTI_CLASS( GxToolContentManager::GxGuiAddressBar::GxAddressIcon,
GxClassBase )
264 static const GxSize ICON_SIZE;
273 GxAddressIcon(
void );
275 ~GxAddressIcon(
void )
override {}
293 GX_FORCE_INLINE
const GxRect& getDrawRect(
void )
const {
return _drawRect; }
309class GxToolContentManager::GxGuiContentView :
public GxGuiForm
317 GX_RTTI_CLASS( GxToolContentManager::GxGuiContentView, GxGuiForm )
335 GxGuiContentView(
void );
337 GxGuiContentView( GxToolBase* pTool );
340 b32 initialize(
void )
override;
342 void cleanup(
void )
override;
351 void update(
void )
override;
355 void addHistoryDirectory(
const GxString& path );
357 void updatePreviousDirectory(
void );
359 void updateNextDirectory(
void );
361 b32 isUpdatePreviousDirectory(
void )
const;
363 b32 isUpdateNextDirectory(
void )
const;
365 b32 isExistPreviousDirectory(
void )
const;
367 b32 isExistNextDirectory(
void )
const;
369 void resetHistoryDirectory(
void );
378 constexpr u32 getItemCount(
void )
const {
return _itemCount; }
380 constexpr void setItemCount( u32 count ) { _itemCount = count; }
382 constexpr s32 getScrollOffsetY(
void )
const {
return _scrollOffsetY; }
384 constexpr void setScrollOffsetY( s32 offset ) { _scrollOffsetY = offset; }
387 GX_FORCE_INLINE
b32 isListView(
void )
const {
return _listViewFlag; }
389 GX_FORCE_INLINE
void setListView(
b32 flag ) { _listViewFlag = flag; }
392 GX_FORCE_INLINE
b32 isDirtyFileList(
void )
const {
return _dirtyFileList; }
394 GX_FORCE_INLINE
void setDirtyFileList(
b32 flag ) { _dirtyFileList = flag; }
397 GX_FORCE_INLINE
const GxString& getSearchString(
void )
const {
return _searchString; }
399 GX_FORCE_INLINE
void setSearchString(
const GxString&
string ) { _searchString = string; }
401 GX_FORCE_INLINE
const GxString& getSelectPath(
void )
const {
return _selectPath; }
403 GX_FORCE_INLINE
void setSelectPath(
const GxString& path ) { _selectPath = path; }
405 GX_FORCE_INLINE
const GxString& getSelectFileName(
void )
const {
return _selectFileName; }
407 GX_FORCE_INLINE
void setSelectFileName(
const GxString& fileName ) { _selectFileName = fileName; }
409 GX_FORCE_INLINE
const GxString& getSelectExtensionFilter(
void )
const {
return _selectExtensionFilter; }
411 GX_FORCE_INLINE
void setSelectExtensionFilter(
const GxString& filter ) { _selectExtensionFilter = filter; }
417 constexpr GxGuiSplitter* getGuiSplitter(
void ) {
return _pGuiSplitter; }
425 GxToolBase* _pParentTool;
427 GxGuiSplitter* _pGuiSplitter;
430 u32 _directoryHistoryCurrentIndex;
431 u32 _directoryHistoryTopIndex;
432 u32 _directoryHistoryTailIndex;
451class GxToolContentManager::GxGuiContentView::GxGuiFormBody :
public GxGuiForm
459 GX_RTTI_CLASS( GxToolContentManager::GxGuiContentView::GxGuiFormBody, GxGuiForm )
475 static constexpr u32 TILE_VIEW_REGION_HEIGHT = 96;
477 static constexpr u32 TILE_VIEW_ICON_SIZE = 54;
480 static const GX_CSTR CREATE_FOLDER_NAME;
482 static const GX_CSTR COPY_FILE_NAME_SUFFIX;
485 static const GX_CSTR IGNORE_DIRECTORY_NAME_LIST[];
487 static const GX_CSTR IGNORE_FILE_NAME_LIST[];
489 static const GX_CSTR IGNORE_EXTENSION_NAME_LIST[];
498 GxGuiFormBody(
void );
500 GxGuiFormBody( GxToolBase* pTool, GxGuiContentView* pGuiContentView );
503 b32 initialize(
void )
override;
505 void cleanup(
void )
override;
514 void onDragMouseUp( u32 button )
override;
518 void update(
void)
override;
521 void onDraw(
void )
override;
524 void onMouseMove(
const GxPoint2& position )
override;
526 void onMouseDown(
const GxPoint2& position, u32 button )
override;
528 void onMouseUp(
const GxPoint2& position, u32 button )
override;
530 void onDoubleClick(
const GxPoint2& position, u32 button )
override;
532 void onKeyDown( GxKeyboard::KEY key )
override;
535 void onMouseWheel(
const GxPoint2& position, s32 rotate )
override;
544 u32 getSameFileNameCount( GX_CSTR srcPath, GX_CSTR baseFileName, GX_CSTR fileExtension,
b32 isSearchDirectory );
547 void eventCreateDirectory(
void );
551 void eventRemoveConfirm(
void );
553 void callbackRemove(
void );
555 void removeFile( GX_CSTR rootPath, GX_CSTR srcPath, GX_CSTR deleteFilePath );
557 void removeDirectory( GX_CSTR rootPath, GX_CSTR srcPath,
GxArray& removeDirectoryList );
559 void eventCut(
void );
561 void eventCopy(
void );
563 void eventPaste( GX_CSTR newFileName =
"" );
565 void pasteCut( GX_CSTR rootPath, GX_CSTR srcPath,
const GxString& dstPath,
const GxString& cutFilePath, GX_CSTR newFileName,
GxArray& removeDirectoryList,
b32 isAddRemoveDirectory );
567 void pasteCopy( GX_CSTR rootPath, GX_CSTR srcPath,
const GxString& dstPath,
const GxString& copyFilePath );
568#if defined( _WINDOWS )
570 void eventRename(
void );
572 static LRESULT CALLBACK MyDialogProc( HWND handleDialogWindow, UINT message, WPARAM wParam, LPARAM lParam );
576 void convertGuidFilePath( GX_CSTR rootPath, GX_CSTR extension,
GxString& path );
579 void clearCutNode(
void );
581 void clearCopyNode(
void );
584 void updateDrawNode(
void );
588 void clearDrawNode(
void );
593 b32 isAllowDrawDirectoryName( GX_CSTR rootPath, GX_CSTR targetPath );
595 b32 isAllowDrawFileName( GX_CSTR rootPath, GX_CSTR targetPath );
597 b32 isAllowDrawExtensionName( GX_CSTR extension );
606 GX_FORCE_INLINE u32 getRegionHeight(
void )
const {
return _pGuiContentView->isListView() ? LIST_VIEW_REGION_HEIGHT : TILE_VIEW_REGION_HEIGHT; }
614 GxToolBase* _pParentTool;
615 GxGuiContentView* _pGuiContentView;
622 s32 _lastClickNodeIndex;
632class GxToolContentManager::GxGuiContentView::GxGuiFormBar :
public GxGuiForm
640 GX_RTTI_CLASS( GxToolContentManager::GxGuiContentView::GxGuiFormBar, GxGuiForm )
651 GxGuiFormBar(
void );
653 GxGuiFormBar( GxGuiContentView* pGuiContentView, GxGuiFormBody* pGuiContentViewBody );
662 void update(
void )
override;
665 void onMouseWheel(
const GxPoint2& position, s32 rotate )
override;
673 GxGuiContentView* _pGuiContentView;
674 GxGuiFormBody* _pGuiContentViewBody;
676 s32 _oldScrollOffsetY;
681GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
配列クラス
Definition GxArrayClassBase.h:18
配列クラス
Definition GxArray.h:18
オブジェクト基底クラス
Definition GxBase.h:88
ファイルパス管理クラス
Definition GxFile.h:376
static constexpr u32 VALUE_32
32
Definition GxMath.h:124
static constexpr u32 VALUE_1K
1K
Definition GxMath.h:129
static constexpr u32 VALUE_16
16
Definition GxMath.h:123
static constexpr u32 VALUE_64
64
Definition GxMath.h:125
プロパティテーブルクラス
Definition GxProperty.h:1641
ICON_TYPE
アイコンタイプ定義
Definition GxRtti.h:202
リソース実行時型情報クラス
Definition GxRttiResource.h:188
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173