2019-06-14 18:14:41 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2019 jp.charras at wanadoo.fr
|
|
|
|
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file design_inspector.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _DESIGN_INSPECTOR_H
|
|
|
|
#define _DESIGN_INSPECTOR_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2020-10-13 05:04:31 +00:00
|
|
|
class DIALOG_INSPECTOR_BASE;
|
|
|
|
class PL_EDITOR_FRAME;
|
2019-06-14 18:14:41 +00:00
|
|
|
|
|
|
|
/**
|
2020-01-10 14:31:00 +00:00
|
|
|
* DESIGN_INSPECTOR is the left window showing the list of items
|
2019-06-14 18:14:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class DIALOG_INSPECTOR : public DIALOG_INSPECTOR_BASE
|
|
|
|
{
|
|
|
|
friend class PL_EDITOR_FRAME;
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxGrid* GetGridList() const { return m_gridListItems; }
|
|
|
|
void onCellClicked( wxGridEvent& event ) override;
|
|
|
|
|
2021-05-30 22:56:24 +00:00
|
|
|
// The list of DS_DATA_ITEM found in drawing sheet
|
2021-02-22 23:47:17 +00:00
|
|
|
std::vector<DS_DATA_ITEM*> m_itemsList;
|
2019-06-14 18:14:41 +00:00
|
|
|
PL_EDITOR_FRAME* m_editorFrame;
|
|
|
|
|
|
|
|
public:
|
|
|
|
DIALOG_INSPECTOR( PL_EDITOR_FRAME* aParent );
|
|
|
|
~DIALOG_INSPECTOR();
|
|
|
|
|
|
|
|
void ReCreateDesignList();
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
/**
|
|
|
|
* @return the DS_DATA_ITEM item managed by the grid row
|
2019-06-14 18:14:41 +00:00
|
|
|
*/
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DATA_ITEM* GetDrawingSheetDataItem( int aRow ) const;
|
2019-06-14 18:14:41 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
// Select the tree item corresponding to the DS_DATA_ITEM aItem
|
|
|
|
void SelectRow( DS_DATA_ITEM* aItem );
|
2019-06-14 18:14:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _DESIGN_INSPECTOR_H */
|