26#include <wx/imaglist.h>
27#include <wx/wupdlock.h>
171 void Draw( wxGrid& aGrid, wxGridCellAttr& aAttr,
172 wxDC& aDc,
const wxRect& aRect,
173 int aRow,
int aCol,
bool aIsSelected)
override;
208 wxWindowUpdateLocker
dummy(
this );
217 wxFileName fn(
static_cast<PL_EDITOR_FRAME*
>( GetParent() )->GetCurrentFileName() );
219 if( fn.GetName().IsEmpty() )
220 SetTitle(
"<default drawing sheet>" );
222 SetTitle( fn.GetName() );
233 wxString::Format(
_(
"Size: %.1fx%.1fmm" ),
245 const char** img =
nullptr;
247 switch( item->GetType() )
275 wxString::Format(
"%d", item->m_RepeatCount ) );
289 int cols_to_resize[] =
294 for(
int ii = 0; ; ii++ )
296 int col = cols_to_resize[ii];
303 #define BITMAP_SIZE 16
320 for(
unsigned row = 1; row <
m_itemsList.size(); ++row )
340 int row =
event.GetRow();
359 wxDC& aDc,
const wxRect& aRect,
360 int aRow,
int aCol,
bool aIsSelected )
362 wxGridCellStringRenderer::Draw( aGrid, aAttr, aDc, aRect, aRow, aCol, aIsSelected );
364 aDc.DrawBitmap( bm,aRect.GetX()+5, aRect.GetY()+2,
true );
constexpr EDA_IU_SCALE drawSheetIUScale
const char ** m_BitmapXPM
BitmapGridCellRenderer(const char **aBitmapXPM)
void Draw(wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDc, const wxRect &aRect, int aRow, int aCol, bool aIsSelected) override
Class DIALOG_INSPECTOR_BASE.
DESIGN_INSPECTOR is the left window showing the list of items.
void ReCreateDesignList()
void onCellClicked(wxGridEvent &event) override
DS_DATA_ITEM * GetDrawingSheetDataItem(int aRow) const
wxGrid * GetGridList() const
void SelectRow(DS_DATA_ITEM *aItem)
DIALOG_INSPECTOR(PL_EDITOR_FRAME *aParent)
PL_EDITOR_FRAME * m_editorFrame
std::vector< DS_DATA_ITEM * > m_itemsList
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Drawing sheet structure type definitions.
const std::vector< DS_DRAW_ITEM_BASE * > & GetDrawItems() const
Handle the graphic items list to draw/plot the frame and title block.
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
std::vector< DS_DATA_ITEM * > & GetItems()
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
Describe the page size and margins of a paper page on which to eventually print or plot.
const wxString & GetType() const
The main window used in the drawing sheet editor.
void ShowDesignInspector()
Show the dialog displaying the list of DS_DATA_ITEM items in the page layout.
const VECTOR2I GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
PROPERTIES_FRAME * GetPropertiesFrame()
const PL_EDITOR_LAYOUT & GetPageLayout() const
PL_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PAGE_INFO & GetPageSettings()
void CopyPrmsFromItemToPanel(DS_DATA_ITEM *aItem)
static const char * poly_xpm[]
static const char * root_xpm[]
static const char * text_xpm[]
static const char * rect_xpm[]
static const char * line_xpm[]
static const char * img_xpm[]
std::vector< FAB_LAYER_COLOR > dummy
constexpr double IUTomm(int iu) const