KiCad PCB EDA Suite
panel_board_stackup.cpp File Reference
#include <macros.h>
#include <pcb_edit_frame.h>
#include <board.h>
#include <board_design_settings.h>
#include <dialogs/dialog_color_picker.h>
#include <widgets/paged_dialog.h>
#include <widgets/layer_box_selector.h>
#include <wx/log.h>
#include <wx/rawbmp.h>
#include <math/util.h>
#include "panel_board_stackup.h"
#include <panel_setup_layers.h>
#include "board_stackup_reporter.h"
#include <bitmaps.h>
#include <wx/clipbrd.h>
#include <wx/dataobj.h>
#include "dialog_dielectric_list_manager.h"
#include <wx/wupdlock.h>
#include <wx/richmsgdlg.h>
#include <wx/dcclient.h>
#include <wx/treebook.h>
#include <wx/textdlg.h>
#include <locale_io.h>
#include <eda_list_dialog.h>
#include <string_utils.h>

Go to the source code of this file.

Macros

#define ID_INCREMENT   256
 

Enumerations

enum  WIDGETS_IDS { ID_ITEM_MATERIAL = 10000, ID_ITEM_THICKNESS = ID_ITEM_MATERIAL + ID_INCREMENT, ID_ITEM_THICKNESS_LOCKED = ID_ITEM_THICKNESS + ID_INCREMENT, ID_ITEM_COLOR = ID_ITEM_THICKNESS_LOCKED + ID_INCREMENT }
 

Functions

static wxColor copperColor (220, 180, 30)
 
static wxColor dielectricColor (75, 120, 75)
 
static wxColor pasteColor (200, 200, 200)
 
static void drawBitmap (wxBitmap &aBitmap, wxColor aColor)
 
wxString getColourAsHexString (const wxColour aColour)
 

Macro Definition Documentation

◆ ID_INCREMENT

#define ID_INCREMENT   256

Definition at line 55 of file panel_board_stackup.cpp.

Enumeration Type Documentation

◆ WIDGETS_IDS

Enumerator
ID_ITEM_MATERIAL 
ID_ITEM_THICKNESS 
ID_ITEM_THICKNESS_LOCKED 
ID_ITEM_COLOR 

Definition at line 59 of file panel_board_stackup.cpp.

Function Documentation

◆ copperColor()

static wxColor copperColor ( 220  ,
180  ,
30   
)
static

◆ dielectricColor()

static wxColor dielectricColor ( 75  ,
120  ,
75   
)
static

◆ drawBitmap()

void drawBitmap ( wxBitmap &  aBitmap,
wxColor  aColor 
)
static

Definition at line 1531 of file panel_board_stackup.cpp.

1532 {
1533  wxNativePixelData data( aBitmap );
1534  wxNativePixelData::Iterator p( data );
1535 
1536  for( int yy = 0; yy < data.GetHeight(); yy++ )
1537  {
1538  wxNativePixelData::Iterator rowStart = p;
1539 
1540  for( int xx = 0; xx < data.GetWidth(); xx++ )
1541  {
1542  p.Red() = aColor.Red();
1543  p.Green() = aColor.Green();
1544  p.Blue() = aColor.Blue();
1545  ++p;
1546  }
1547 
1548  p = rowStart;
1549  p.OffsetY( data, 1 );
1550  }
1551 }

Referenced by PANEL_SETUP_BOARD_STACKUP::updateIconColor().

◆ getColourAsHexString()

wxString getColourAsHexString ( const wxColour  aColour)

Definition at line 76 of file panel_board_stackup.cpp.

77 {
78  // NB: wxWidgets 3.0's color.GetAsString( wxC2S_HTML_SYNTAX ) pukes on alpha
79  return wxString::Format( wxT("#%02X%02X%02X%02X" ),
80  aColour.Red(),
81  aColour.Green(),
82  aColour.Blue(),
83  aColour.Alpha() );
84 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format().

Referenced by PANEL_SETUP_BOARD_STACKUP::createColorBox(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), and PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup().

◆ pasteColor()

static wxColor pasteColor ( 200  ,
200  ,
200   
)
static