Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
5017812e
Commit
5017812e
authored
Nov 09, 2007
by
g_harland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sizers now provided for what was the "Colors:" dialog (now the "Pcbnew Layer Colors:" dialog)
parent
b55b0abb
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
513 additions
and
278 deletions
+513
-278
3d_canvas.cpp
3d-viewer/3d_canvas.cpp
+1
-1
change_log.txt
change_log.txt
+13
-0
reglage.cpp.notused
pcbnew/reglage.cpp.notused
+0
-0
set_color.cpp
pcbnew/set_color.cpp
+348
-265
set_color.h
pcbnew/set_color.h
+151
-12
No files found.
3d-viewer/3d_canvas.cpp
View file @
5017812e
...
...
@@ -66,7 +66,7 @@ EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END,
END_EVENT_TABLE
()
/*************************************************************************/
Pcb3D_GLCanvas
::
Pcb3D_GLCanvas
(
WinEDA3D_DrawFrame
*
parent
,
wxWindowID
id
,
Pcb3D_GLCanvas
::
Pcb3D_GLCanvas
(
WinEDA3D_DrawFrame
*
parent
,
const
wxWindowID
id
,
int
*
gl_attrib
)
:
wxGLCanvas
(
parent
,
id
,
wxPoint
(
-
1
,
-
1
),
wxSize
(
-
1
,
-
1
),
0
,
wxT
(
"Pcb3D_glcanvas"
),
gl_attrib
)
...
...
change_log.txt
View file @
5017812e
...
...
@@ -4,6 +4,19 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Nov-09 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
+ 3d-viewer
* The 3d_canvas.cpp file has been updated to use a const parameter, as suggested
within (Bug) Request ID 1828487.
+ pcbnew
* Sizers have now been provided for the "Pcbnew Layer Colors:" dialog box (previously
identified as the "Colors:" dialog box), and tool tips have been provided for the
"Show All" and "Show None" buttons.
* The reglage.cpp file (which is not currently used) has been removed, and replaced
with reglage.cpp.notused.
2007-Nov-02 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ all
...
...
pcbnew/reglage.cpp
→
pcbnew/reglage.cpp
.notused
View file @
5017812e
File moved
pcbnew/set_color.cpp
View file @
5017812e
This diff is collapsed.
Click to expand it.
pcbnew/set_color.h
View file @
5017812e
/* Set up the button list for the color selection for pcbnew layers */
/***************/
/* set_color.h */
/***************/
static
ColorButton
Msg_Layers_Cu
=
#ifndef SET_COLOR_H
#define SET_COLOR_H
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "set_color.cpp"
#endif
#include "wx/statline.h"
class
wxBoxSizer
;
class
wxFlexGridSizer
;
class
wxStaticLine
;
class
wxStdDialogButtonSizer
;
// Specify how many elements are contained within laytool_list[]
const
int
NB_BUTT
=
44
;
// Specify how many elements are contained within laytool_index[]
const
int
BUTTON_GROUPS
=
3
;
// Specify the numbers associated with assorted controls
enum
col_sel_id
{
ID_DIALOG
=
1800
,
ID_COLOR_RESET_SHOW_LAYER_ON
,
ID_COLOR_RESET_SHOW_LAYER_OFF
,
ID_COLOR_CHECKBOX_ONOFF
,
ID_COLOR_SETUP
};
// Control identifiers
// #define SYMBOL_WINEDA_SETCOLORSFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_SETCOLORSFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_SETCOLORSFRAME_TITLE _("Pcbnew Layer Colors:")
#define SYMBOL_WINEDA_SETCOLORSFRAME_IDNAME ID_DIALOG
// #define SYMBOL_WINEDA_SETCOLORSFRAME_SIZE wxSize(400, 300)
// #define SYMBOL_WINEDA_SETCOLORSFRAME_POSITION wxDefaultPosition
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
// Specify the width and height of every (color-displaying / bitmap) button
const
int
BUTT_SIZE_X
=
25
;
const
int
BUTT_SIZE_Y
=
15
;
/* Macro utile : */
#define ADR( numlayer ) &g_DesignSettings.m_LayerColor[(numlayer)]
/**********************************/
/* Liste des menus de Menu_Layers */
/**********************************/
struct
ColorButton
{
_
(
"Copper Layers"
),
-
1
// Title
const
wxString
m_Title
;
int
m_LayerNumber
;
int
*
m_Color
;
///< pointer to color variable to manipulate
bool
m_NoDisplayIsColor
;
///< TRUE if bit ITEM_NOT_SHOW of the color variable should be manipulated
bool
*
m_NoDisplay
;
///< pointer to the on/off display control variable, if it is not the color variable
int
m_Id
;
wxBitmapButton
*
m_Button
;
// int m_State; // (Commented out until when it is actually used.)
wxCheckBox
*
m_CheckBox
;
///< Display ON/OFF toggle
};
struct
ButtonIndex
{
wxString
m_Name
;
// Title
int
m_Index
;
// Index to last bitmap button in group
};
static
ButtonIndex
Msg_Layers_Cu
=
{
_
(
"Copper Layers"
),
// Title
15
// Index to last bitmap button in group
};
static
ColorButton
Layer_1_Butt
=
...
...
@@ -134,9 +211,10 @@ static ColorButton Layer_16_Butt =
};
static
ColorButton
Msg_Layers_Tech
=
static
ButtonIndex
Msg_Layers_Tech
=
{
_
(
"Tech Layers"
),
-
1
// Title
_
(
"Tech Layers"
),
// Title
28
// Index to last bitmap button in group
};
static
ColorButton
Layer_17_Butt
=
...
...
@@ -244,9 +322,10 @@ static ColorButton Layer_29_Butt =
};
static
ColorButton
Msg_Others_Items
=
static
ButtonIndex
Msg_Others_Items
=
{
wxT
(
"Others"
),
-
1
// Title
wxT
(
"Others"
),
// Title
43
// Index to last bitmap button in group
};
static
ColorButton
VIA_THROUGH_Butt
=
...
...
@@ -377,7 +456,6 @@ static ColorButton Show_Modules_Cu_Butt =
static
ColorButton
*
laytool_list
[]
=
{
&
Msg_Layers_Cu
,
&
Layer_1_Butt
,
&
Layer_2_Butt
,
&
Layer_3_Butt
,
...
...
@@ -395,7 +473,6 @@ static ColorButton* laytool_list[] = {
&
Layer_15_Butt
,
&
Layer_16_Butt
,
&
Msg_Layers_Tech
,
&
Layer_17_Butt
,
&
Layer_18_Butt
,
&
Layer_19_Butt
,
...
...
@@ -413,7 +490,6 @@ static ColorButton* laytool_list[] = {
// &Layer_31_Butt,
// &Layer_32_Butt,
&
Msg_Others_Items
,
&
VIA_THROUGH_Butt
,
&
Via_Aveugle_Butt
,
&
BLIND_VIA_Butt
,
...
...
@@ -430,6 +506,69 @@ static ColorButton* laytool_list[] = {
&
Show_Pads_Noconnect_Butt
,
&
Show_Modules_Cmp_Butt
,
&
Show_Modules_Cu_Butt
,
NULL
};
static
ButtonIndex
*
laytool_index
[
BUTTON_GROUPS
]
=
{
&
Msg_Layers_Cu
,
&
Msg_Layers_Tech
,
&
Msg_Others_Items
};
/**************************************************************/
/* classe derivee pour la frame de Configuration des couleurs */
/**************************************************************/
class
WinEDA_SetColorsFrame
:
public
wxDialog
{
private
:
DECLARE_DYNAMIC_CLASS
(
WinEDA_SetColorsFrame
)
DECLARE_EVENT_TABLE
()
WinEDA_DrawFrame
*
m_Parent
;
wxBoxSizer
*
OuterBoxSizer
;
wxBoxSizer
*
MainBoxSizer
;
wxFlexGridSizer
*
FlexColumnBoxSizer
;
wxStaticText
*
Label
;
wxBoxSizer
*
RowBoxSizer
;
wxBitmapButton
*
BitmapButton
;
wxCheckBox
*
CheckBox
;
wxButton
*
Button
;
wxStaticLine
*
Line
;
wxStdDialogButtonSizer
*
StdDialogButtonSizer
;
// Creation
bool
Create
(
wxWindow
*
parent
,
wxWindowID
id
=
SYMBOL_WINEDA_SETCOLORSFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_SETCOLORSFRAME_TITLE
,
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxDefaultSize
,
long
style
=
SYMBOL_WINEDA_SETCOLORSFRAME_STYLE
);
// Initialises member variables
void
Init
();
// Creates the controls and sizers
void
CreateControls
();
wxBitmap
GetBitmapResource
(
const
wxString
&
name
);
wxIcon
GetIconResource
(
const
wxString
&
name
);
static
bool
ShowToolTips
();
void
SetColor
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
void
OnApplyClick
(
wxCommandEvent
&
event
);
void
UpdateLayerSettings
();
void
ResetDisplayLayersCu
(
wxCommandEvent
&
event
);
public
:
// Constructors and destructor
WinEDA_SetColorsFrame
();
WinEDA_SetColorsFrame
(
WinEDA_DrawFrame
*
parent
,
const
wxPoint
&
framepos
);
~
WinEDA_SetColorsFrame
();
};
#endif
// SET_COLOR_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment