mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-18 17:19:17 +00:00
Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it being included by base_struct.h Only about 130 files actually use the XPM definitions defined there, and many of those already included bitmaps.h themselves, or via menu_helpers.h. However, touching bitmaps.h would result in over 400 rebuilt files for pcbnew alone. This commit moves the bitmap-related types like BITMAT_DEF out to a new header, which is still included by base_struct.h, which is less avoidable for now, it's it's used in the interface. The icon list is still in bitmaps.h. This has the side effect that's it's now easier to automatically generate this file. Many classes in pcbnew and eeschema needed some functions moved to the implementaitons from the headers too.
This commit is contained in:
parent
45cf772833
commit
a8eea6155a
3d-viewer
3d_cache/dialogs
3d_canvas
3d_viewer
cvpcb
eeschema
controle.cpp
dialogs
hierarch.cpplib_arc.cpplib_arc.hlib_circle.cpplib_circle.hlib_field.cpplib_field.hlib_polyline.cpplib_polyline.hlib_rectangle.cpplib_rectangle.hlib_text.cpplib_text.hsch_bitmap.cppsch_bitmap.hsch_bus_entry.cppsch_bus_entry.hsch_component.cppsch_component.hsch_field.cppsch_junction.cppsch_junction.hsch_marker.cppsch_marker.hsch_no_connect.cppsch_no_connect.hsch_sheet.cppsch_sheet.hsch_sheet_pin.cppsch_text.cppsch_text.htool_lib.cpptool_sch.cppviewlib_frame.cppgerbview
include
kicad
pagelayout_editor
pcbnew
class_dimension.cppclass_dimension.hclass_drawsegment.cppclass_drawsegment.hclass_edge_mod.cppclass_edge_mod.hclass_marker_pcb.cppclass_marker_pcb.hclass_mire.cppclass_mire.hclass_module.cppclass_module.hclass_pad.cppclass_pad.hclass_pcb_text.cppclass_pcb_text.hclass_text_mod.cppclass_text_mod.hclass_track.cppclass_track.hclass_zone.cppclass_zone.h
dialogs
dialog_edit_module_for_BoardEditor.cppdialog_edit_module_for_Modedit.cppdialog_pns_length_tuning_settings.cppwizard_add_fplib.cpp
footprint_wizard_frame.cppmenubar_modedit.cppmoduleframe.cppmodview_frame.cpponrightclick.cpppcbframe.cpprouter
tool_modedit.cpptool_pcb.cpptools
@ -32,6 +32,7 @@
|
||||
#include <common_ogl/cogl_att_list.h>
|
||||
#include <cstdlib>
|
||||
#include <limits.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <wx/valnum.h>
|
||||
#include <wx/tglbtn.h>
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "status_text_reporter.h"
|
||||
#include <gl_context_mgr.h>
|
||||
#include <profile.h> // To use GetRunningMicroSecs or an other profiling utility
|
||||
#include <bitmaps.h>
|
||||
|
||||
/**
|
||||
* Trace mask used to enable or disable the trace output of this class.
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "dialog_3D_view_option_base.h"
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <3d_canvas/cinfo3d_visu.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
class DIALOG_3D_VIEW_OPTIONS : public DIALOG_3D_VIEW_OPTIONS_BASE
|
||||
{
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "../common_ogl/cogl_att_list.h"
|
||||
#include <hotkeys_basic.h>
|
||||
#include <wx/toolbar.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
/**
|
||||
* Trace mask used to enable or disable the trace output of this class.
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <netlist_reader.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <cvpcb_mainframe.h>
|
||||
#include <cvpcb.h>
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <schframe.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <eeschema_id.h>
|
||||
#include <general.h>
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <fctsys.h>
|
||||
#include <schframe.h>
|
||||
#include <class_drawpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <invoke_sch_dialog.h>
|
||||
#include <dialog_annotate_base.h>
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <invoke_sch_dialog.h>
|
||||
#include <project.h>
|
||||
#include <kiface_i.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <netlist.h>
|
||||
#include <class_netlist_object.h>
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <macros.h>
|
||||
#include <gr_basic.h>
|
||||
#include <base_units.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <libeditframe.h>
|
||||
#include <class_libentry.h>
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <confirm.h>
|
||||
#include <id.h>
|
||||
#include <schframe.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <sch_sheet.h>
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <richio.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <lib_arc.h>
|
||||
@ -580,6 +581,12 @@ wxString LIB_ARC::GetSelectMenuText() const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_ARC::GetMenuImage() const
|
||||
{
|
||||
return add_arc_xpm;
|
||||
}
|
||||
|
||||
|
||||
void LIB_ARC::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
|
||||
{
|
||||
wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return add_arc_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <richio.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <lib_circle.h>
|
||||
@ -297,6 +298,12 @@ wxString LIB_CIRCLE::GetSelectMenuText() const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_CIRCLE::GetMenuImage() const
|
||||
{
|
||||
return add_circle_xpm;
|
||||
}
|
||||
|
||||
|
||||
void LIB_CIRCLE::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
|
||||
{
|
||||
wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return add_circle_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <trigo.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <class_libentry.h>
|
||||
@ -800,3 +801,9 @@ void LIB_FIELD::GetMsgPanelInfo( MSG_PANEL_ITEMS& aList )
|
||||
// Display field text:
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Value" ), GetShownText(), BROWN ) );
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_FIELD::GetMenuImage() const
|
||||
{
|
||||
return move_field_xpm;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return move_field_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <richio.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <lib_polyline.h>
|
||||
@ -420,6 +421,12 @@ wxString LIB_POLYLINE::GetSelectMenuText() const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_POLYLINE::GetMenuImage() const
|
||||
{
|
||||
return add_polygon_xpm;
|
||||
}
|
||||
|
||||
|
||||
void LIB_POLYLINE::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
|
||||
{
|
||||
wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return add_polygon_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <richio.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <lib_rectangle.h>
|
||||
@ -337,6 +338,12 @@ wxString LIB_RECTANGLE::GetSelectMenuText() const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_RECTANGLE::GetMenuImage() const
|
||||
{
|
||||
return add_rectangle_xpm;
|
||||
}
|
||||
|
||||
|
||||
void LIB_RECTANGLE::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
|
||||
{
|
||||
wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED | IS_RESIZED ) ) != 0,
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return add_rectangle_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <richio.h>
|
||||
#include <base_units.h>
|
||||
#include <msgpanel.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <lib_draw_item.h>
|
||||
#include <general.h>
|
||||
@ -509,6 +510,12 @@ wxString LIB_TEXT::GetSelectMenuText() const
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF LIB_TEXT::GetMenuImage() const
|
||||
{
|
||||
return add_text_xpm;
|
||||
}
|
||||
|
||||
|
||||
void LIB_TEXT::BeginEdit( STATUS_FLAGS aEditMode, const wxPoint aPosition )
|
||||
{
|
||||
wxCHECK_RET( ( aEditMode & ( IS_NEW | IS_MOVED ) ) != 0,
|
||||
|
@ -129,7 +129,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override;
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return add_text_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
EDA_ITEM* Clone() const override;
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <class_drawpanel.h>
|
||||
#include <trigo.h>
|
||||
#include <macros.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <sch_bitmap.h>
|
||||
|
||||
#include <wx/mstream.h>
|
||||
@ -309,3 +311,9 @@ void SCH_BITMAP::Plot( PLOTTER* aPlotter )
|
||||
{
|
||||
m_image->PlotImage( aPlotter, m_pos, GetLayerColor( GetLayer() ), GetPenSize() );
|
||||
}
|
||||
|
||||
|
||||
BITMAP_DEF SCH_BITMAP::GetMenuImage() const
|
||||
{
|
||||
return image_xpm;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
|
||||
wxString GetSelectMenuText() const override { return wxString( _( "Image" ) ); }
|
||||
|
||||
BITMAP_DEF GetMenuImage() const override { return image_xpm; }
|
||||
BITMAP_DEF GetMenuImage() const override;
|
||||
|
||||
wxPoint GetPosition() const override { return m_pos; }
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <common.h>
|
||||
#include <richio.h>
|
||||
#include <plot_common.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
#include <eeschema_config.h>
|
||||
#include <general.h>
|
||||
@ -340,6 +341,11 @@ wxString SCH_BUS_BUS_ENTRY::GetSelectMenuText() const
|
||||
return wxString( _( "Bus to Bus Entry" ) );
|
||||
}
|
||||
|
||||
BITMAP_DEF SCH_BUS_ENTRY_BASE::GetMenuImage() const
|
||||
{
|
||||
return add_entry_xpm;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_BUS_ENTRY_BASE::HitTest( const wxPoint& aPosition, int aAccuracy ) const
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user