KiCad PCB EDA Suite
load_select_footprint.cpp File Reference

Footprints selection and loading functions. More...

#include <functional>
#include <fctsys.h>
#include <class_drawpanel.h>
#include <pcb_draw_panel_gal.h>
#include <confirm.h>
#include <eda_doc.h>
#include <kicad_string.h>
#include <pgm_base.h>
#include <kiway.h>
#include <pcb_edit_frame.h>
#include <dialog_helpers.h>
#include <filter_reader.h>
#include <gr_basic.h>
#include <macros.h>
#include <fp_lib_table.h>
#include <lib_id.h>
#include <footprint_tree_pane.h>
#include <class_board.h>
#include <class_module.h>
#include <io_mgr.h>
#include <pcbnew.h>
#include <footprint_edit_frame.h>
#include <footprint_info.h>
#include <footprint_info_impl.h>
#include <dialog_choose_footprint.h>
#include <footprint_viewer_frame.h>
#include <wildcards_and_files_ext.h>
#include <widgets/progress_reporter.h>
#include <widgets/lib_tree.h>
#include "fp_tree_model_adapter.h"

Go to the source code of this file.

Functions

static void AddModuleToHistory (const wxString &aName)
 
static void clearModuleItemFlags (BOARD_ITEM *aItem)
 

Variables

static wxArrayString s_ModuleHistoryList
 
static unsigned s_ModuleHistoryMaxCount = 8
 

Detailed Description

Footprints selection and loading functions.

Definition in file load_select_footprint.cpp.

Function Documentation

static void AddModuleToHistory ( const wxString &  aName)
static

Definition at line 69 of file load_select_footprint.cpp.

References s_ModuleHistoryList, and s_ModuleHistoryMaxCount.

Referenced by PCB_BASE_FRAME::SelectFootprintFromLibTree().

70 {
71  // Remove duplicates
72  for( int ii = s_ModuleHistoryList.GetCount() - 1; ii >= 0; --ii )
73  {
74  if( s_ModuleHistoryList[ ii ] == aName )
75  s_ModuleHistoryList.RemoveAt( (size_t) ii );
76  }
77 
78  // Add the new name at the beginning of the history list
79  s_ModuleHistoryList.Insert( aName, 0 );
80 
81  // Remove extra names
82  while( s_ModuleHistoryList.GetCount() >= s_ModuleHistoryMaxCount )
83  s_ModuleHistoryList.RemoveAt( s_ModuleHistoryList.GetCount() - 1 );
84 }
static unsigned s_ModuleHistoryMaxCount
static wxArrayString s_ModuleHistoryList
static void clearModuleItemFlags ( BOARD_ITEM aItem)
static

Definition at line 87 of file load_select_footprint.cpp.

References EDA_ITEM::ClearFlags().

Referenced by FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD().

88 {
89  aItem->ClearFlags();
90 }
void ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
Definition: base_struct.h:257

Variable Documentation

wxArrayString s_ModuleHistoryList
static
unsigned s_ModuleHistoryMaxCount = 8
static

Definition at line 67 of file load_select_footprint.cpp.

Referenced by AddModuleToHistory().