28#include <wx/settings.h>
40#define PLATFORM_STYLE wxTR_LINES_AT_ROOT
42#define PLATFORM_STYLE wxTR_NO_LINES
47 PLATFORM_STYLE | wxTR_HAS_BUTTONS | wxTR_MULTIPLE, wxDefaultValidator,
48 wxT(
"EDATreeCtrl" ) ),
53 m_gitCommon = std::make_unique<KIGIT_COMMON>(
nullptr );
76 wxVector<wxBitmapBundle> images;
109 wxVector<wxBitmapBundle> stateImages;
110 stateImages.push_back( wxBitmapBundle( wxBitmap( 16, 16 ) ) );
118 stateImages.push_back( wxBitmapBundle( wxBitmap( 16, 16 ) ) );
120 SetStateImages( stateImages );
125 int logicSize = 24 * GetDPIScaleFactor() / GetContentScaleFactor();
126 int physSize = ToPhys( logicSize );
130 else if( physSize >= 48 )
132 else if( physSize >= 32 )
137 logicSize = std::min( logicSize, physSize );
138 int bmpsf = std::max( 1, physSize / logicSize );
140 logicSize = physSize / bmpsf;
142 auto toBitmap = [&](
BITMAPS aBmps )
144 wxBitmap bmp =
KiBitmap( aBmps, physSize );
145 bmp.SetScaleFactor( bmpsf );
146 wxASSERT(bmp.IsOk());
150 m_imageList =
new wxImageList( logicSize, logicSize,
true,
189 wxBitmap blank_bitmap( size, size );
213 wxTreeItemIdValue cookie;
214 wxTreeItemId child = GetFirstChild( aParentId, cookie );
216 while( child.IsOk() )
218 aItems.push_back( child );
220 child = GetNextChild( aParentId, cookie );
230 if( !myitem1 || !myitem2 )
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
BITMAPS
A list of all bitmap identifiers.
@ icon_pagelayout_editor_24
Handle one item (a file or a directory name) for the tree file.
const wxString & GetFileName() const
TREE_FILE_TYPE GetType() const
PROJECT_TREE_PANE Window to display the tree files.
PROJECT_TREE This is the class to show (as a tree) the files in the project directory.
PROJECT_TREE_PANE * m_projectTreePane
void GetItemsRecursively(const wxTreeItemId &aParentId, std::vector< wxTreeItemId > &aItems)
int OnCompareItems(const wxTreeItemId &item1, const wxTreeItemId &item2) override
wxImageList * m_statusImageList
PROJECT_TREE(PROJECT_TREE_PANE *parent)
std::unique_ptr< KIGIT_COMMON > m_gitCommon
wxImageList * m_imageList
KICOMMON_API wxFont GetControlFont(wxWindow *aWindow)