Commit 01a8442b authored by jean-pierre charras's avatar jean-pierre charras

3d viewer: minor code cleaning (remove useless #include )

dialog_track_via_size: set minimal size  and make dialog resizable.
Update demo file.
parent 459ea885
......@@ -105,7 +105,7 @@ EDA_3D_CANVAS::~EDA_3D_CANVAS()
}
void EDA_3D_CANVAS::ClearLists( GLuint aGlList )
void EDA_3D_CANVAS::ClearLists( int aGlList )
{
if( aGlList )
{
......
......@@ -43,8 +43,7 @@
#endif
#include <3d_struct.h>
#include <convert_basic_shapes_to_polygon.h>
class BOARD_DESIGN_SETTINGS;
class EDA_3D_FRAME;
......@@ -91,8 +90,9 @@ private:
GLuint m_text_fake_shadow_back;
GLuint m_text_fake_shadow_board;
void Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture, GLuint aTexture_size, bool aDraw_body, int aBlurPasses );
void Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture,
GLuint aTexture_size, bool aDraw_body, int aBlurPasses );
public:
EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList = 0 );
~EDA_3D_CANVAS();
......@@ -107,7 +107,7 @@ public:
* @param aGlList = the list to clear.
* if 0 (default) all lists are cleared
*/
void ClearLists( GLuint aGlList = 0 );
void ClearLists( int aGlList = 0 );
// Event functions:
void OnPaint( wxPaintEvent& event );
......@@ -154,7 +154,7 @@ public:
/**
* Function BuildTechLayers3DView
* Called by CreateDrawGL_List()
* Populates the OpenGL GL_ID_BOARD draw list with items on tech layers
* Populates the OpenGL GL_ID_TECH_LAYERS draw list with items on tech layers
*/
void BuildTechLayers3DView();
......
......@@ -29,6 +29,7 @@
#include <fctsys.h>
#include <3d_viewer.h>
#include <3d_struct.h>
bool S3D_MASTER::IsOpenGlAllowed()
......
......@@ -253,7 +253,8 @@ void EDA_3D_CANVAS::Create_and_Render_Shadow_Buffer( GLuint *aDst_gl_texture,
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0, GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aTexture_size, aTexture_size, 0,
GL_RGBA, GL_UNSIGNED_BYTE, depthbufferRGBA );
glFlush();
glFinish();
......@@ -364,7 +365,8 @@ void EDA_3D_CANVAS::Redraw()
InitGL();
if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() && g_Parm_3D_Visu.HightQualityMode() )
if( g_Parm_3D_Visu.GetFlag( FL_MODULE ) && g_Parm_3D_Visu.IsRealisticMode() &&
g_Parm_3D_Visu.HightQualityMode() )
{
GenerateFakeShadowsTextures ();
}
......@@ -926,8 +928,8 @@ void EDA_3D_CANVAS::BuildBoard3DView(GLuint aBoardList, GLuint aBodyOnlyList)
// Merge polygons, remove holes
currLayerPolyset -= polysetHoles;
int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer );
int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer );
int thickness = g_Parm_3D_Visu.GetLayerObjectThicknessBIU( layer );
int zpos = g_Parm_3D_Visu.GetLayerZcoordBIU( layer );
if( realistic_mode )
{
......
......@@ -411,7 +411,7 @@ void EDA_3D_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_MENU3D_SOLDER_MASK_ONOFF:
g_Parm_3D_Visu.SetFlag( FL_SOLDERMASK, isChecked );
NewDisplay(GL_ID_TECH_LAYERS);
NewDisplay(GL_ID_TECH_LAYERS);
return;
case ID_MENU3D_SOLDER_PASTE_ONOFF:
......@@ -486,7 +486,7 @@ void EDA_3D_FRAME::On3DGridSelection( wxCommandEvent& event )
}
void EDA_3D_FRAME::NewDisplay( GLuint aGlList )
void EDA_3D_FRAME::NewDisplay( int aGlList )
{
m_reloadRequest = false;
......
......@@ -37,20 +37,6 @@
#endif
#include <wx/glcanvas.h>
#ifdef __WXMAC__
# ifdef __DARWIN__
# include <OpenGL/glu.h>
# else
# include <glu.h>
# endif
#else
# include <GL/glu.h>
#endif
#define KISYS3DMOD "KISYS3DMOD"
#include <3d_struct.h>
#define KISYS3DMOD "KISYS3DMOD"
......@@ -103,7 +89,7 @@ public:
* @param aGlList = the list to rebuild.
* if 0 (default) all lists are rebuilt
*/
void NewDisplay( GLuint aGlList = 0 );
void NewDisplay( int aGlList = 0 );
void SetDefaultFileName(const wxString &aFn) { m_defaultFileName = aFn; }
const wxString &GetDefaultFileName() const { return m_defaultFileName; }
......
......@@ -385,7 +385,7 @@ U 1 1 4791D59D
P 10450 3900
F 0 "R64" V 10530 3900 50 0000 C CNN
F 1 "3,3" V 10450 3900 50 0000 C CNN
F 2 "" H 10450 3900 60 0001 C CNN
F 2 "discret:R4" H 10450 3900 60 0001 C CNN
F 3 "" H 10450 3900 60 0001 C CNN
1 10450 3900
0 1 1 0
......@@ -470,7 +470,7 @@ U 1 1 46A76EB2
P 6600 1250
F 0 "P3" H 6600 1400 50 0000 C CNN
F 1 "CONN_2X2" H 6610 1120 40 0000 C CNN
F 2 "" H 6600 1250 60 0001 C CNN
F 2 "pin_array:PIN_ARRAY_2X2" H 6600 1250 60 0001 C CNN
F 3 "" H 6600 1250 60 0001 C CNN
1 6600 1250
-1 0 0 -1
......@@ -481,7 +481,7 @@ U 1 1 470F38BE
P 4550 4100
F 0 "U9" H 4600 4150 70 0000 C CNN
F 1 "XCR3256-TQ144" H 4550 500 60 0000 C CNN
F 2 "" H 4550 4100 60 0001 C CNN
F 2 "lib_smd:TQFP144" H 4550 4100 60 0001 C CNN
F 3 "" H 4550 4100 60 0001 C CNN
1 4550 4100
1 0 0 -1
......@@ -662,7 +662,7 @@ U 1 1 46ADE55A
P 9200 3050
F 0 "P4" H 9250 3100 60 0000 C CNN
F 1 "CONN_20X2" V 9200 3050 50 0000 C CNN
F 2 "" H 9200 3050 60 0001 C CNN
F 2 "pin_array:PIN_ARRAY_20X2" H 9200 3050 60 0001 C CNN
F 3 "" H 9200 3050 60 0001 C CNN
1 9200 3050
1 0 0 -1
......@@ -725,7 +725,7 @@ U 1 1 46A76BCA
P 3300 650
F 0 "R57" V 3380 650 50 0000 C CNN
F 1 "4K7" V 3300 650 50 0000 C CNN
F 2 "" H 3300 650 60 0001 C CNN
F 2 "lib_smd:SM0805" H 3300 650 60 0001 C CNN
F 3 "" H 3300 650 60 0001 C CNN
1 3300 650
0 1 1 0
......@@ -749,7 +749,7 @@ U 1 1 46A76BC4
P 9300 4950
F 0 "D8" H 9300 5050 50 0000 C CNN
F 1 "LED" H 9300 4850 50 0000 C CNN
F 2 "" H 9300 4950 60 0001 C CNN
F 2 "lib_smd:SM1206POL" H 9300 4950 60 0001 C CNN
F 3 "" H 9300 4950 60 0001 C CNN
1 9300 4950
1 0 0 -1
......@@ -760,7 +760,7 @@ U 1 1 46A76BC3
P 8800 4950
F 0 "R62" V 8880 4950 50 0000 C CNN
F 1 "1K" V 8800 4950 50 0000 C CNN
F 2 "" H 8800 4950 60 0001 C CNN
F 2 "lib_smd:SM0805" H 8800 4950 60 0001 C CNN
F 3 "" H 8800 4950 60 0001 C CNN
1 8800 4950
0 -1 -1 0
......@@ -793,7 +793,7 @@ U 1 1 46A76BBC
P 10650 6350
F 0 "C61" H 10700 6450 50 0000 L CNN
F 1 "100nF" H 10650 6250 50 0000 L CNN
F 2 "" H 10650 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 10650 6350 60 0001 C CNN
F 3 "" H 10650 6350 60 0001 C CNN
1 10650 6350
1 0 0 -1
......@@ -804,7 +804,7 @@ U 1 1 46A76BBB
P 10350 6350
F 0 "C60" H 10400 6450 50 0000 L CNN
F 1 "100nF" H 10350 6250 50 0000 L CNN
F 2 "" H 10350 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 10350 6350 60 0001 C CNN
F 3 "" H 10350 6350 60 0001 C CNN
1 10350 6350
1 0 0 -1
......@@ -815,7 +815,7 @@ U 1 1 46A76BBA
P 10050 6350
F 0 "C59" H 10100 6450 50 0000 L CNN
F 1 "100nF" H 10050 6250 50 0000 L CNN
F 2 "" H 10050 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 10050 6350 60 0001 C CNN
F 3 "" H 10050 6350 60 0001 C CNN
1 10050 6350
1 0 0 -1
......@@ -826,7 +826,7 @@ U 1 1 46A76BB5
P 8550 6350
F 0 "C54" H 8600 6450 50 0000 L CNN
F 1 "100nF" H 8550 6250 50 0000 L CNN
F 2 "" H 8550 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 8550 6350 60 0001 C CNN
F 3 "" H 8550 6350 60 0001 C CNN
1 8550 6350
1 0 0 -1
......@@ -837,7 +837,7 @@ U 1 1 46A76BB4
P 8250 6350
F 0 "C53" H 8300 6450 50 0000 L CNN
F 1 "100nF" H 8250 6250 50 0000 L CNN
F 2 "" H 8250 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 8250 6350 60 0001 C CNN
F 3 "" H 8250 6350 60 0001 C CNN
1 8250 6350
1 0 0 -1
......@@ -848,7 +848,7 @@ U 1 1 46A76BB3
P 7950 6350
F 0 "C52" H 8000 6450 50 0000 L CNN
F 1 "100nF" H 7950 6250 50 0000 L CNN
F 2 "" H 7950 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 7950 6350 60 0001 C CNN
F 3 "" H 7950 6350 60 0001 C CNN
1 7950 6350
1 0 0 -1
......@@ -859,7 +859,7 @@ U 1 1 46A76BB2
P 7650 6350
F 0 "C51" H 7700 6450 50 0000 L CNN
F 1 "100nF" H 7650 6250 50 0000 L CNN
F 2 "" H 7650 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 7650 6350 60 0001 C CNN
F 3 "" H 7650 6350 60 0001 C CNN
1 7650 6350
1 0 0 -1
......@@ -870,7 +870,7 @@ U 1 1 46A76BB1
P 9750 6350
F 0 "C58" H 9800 6450 50 0000 L CNN
F 1 "100nF" H 9750 6250 50 0000 L CNN
F 2 "" H 9750 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 9750 6350 60 0001 C CNN
F 3 "" H 9750 6350 60 0001 C CNN
1 9750 6350
1 0 0 -1
......@@ -881,7 +881,7 @@ U 1 1 46A76BB0
P 9450 6350
F 0 "C57" H 9500 6450 50 0000 L CNN
F 1 "100nF" H 9450 6250 50 0000 L CNN
F 2 "" H 9450 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 9450 6350 60 0001 C CNN
F 3 "" H 9450 6350 60 0001 C CNN
1 9450 6350
1 0 0 -1
......@@ -892,7 +892,7 @@ U 1 1 46A76BAF
P 9150 6350
F 0 "C56" H 9200 6450 50 0000 L CNN
F 1 "100nF" H 9150 6250 50 0000 L CNN
F 2 "" H 9150 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 9150 6350 60 0001 C CNN
F 3 "" H 9150 6350 60 0001 C CNN
1 9150 6350
1 0 0 -1
......@@ -903,7 +903,7 @@ U 1 1 46A76BAE
P 8850 6350
F 0 "C55" H 8900 6450 50 0000 L CNN
F 1 "100nF" H 8850 6250 50 0000 L CNN
F 2 "" H 8850 6350 60 0001 C CNN
F 2 "lib_smd:SM0805" H 8850 6350 60 0001 C CNN
F 3 "" H 8850 6350 60 0001 C CNN
1 8850 6350
1 0 0 -1
......@@ -929,7 +929,7 @@ U 1 1 46A76BA8
P 9300 5250
F 0 "D9" H 9300 5350 50 0000 C CNN
F 1 "LED" H 9300 5150 50 0000 C CNN
F 2 "" H 9300 5250 60 0001 C CNN
F 2 "lib_smd:SM1206POL" H 9300 5250 60 0001 C CNN
F 3 "" H 9300 5250 60 0001 C CNN
1 9300 5250
1 0 0 -1
......@@ -940,7 +940,7 @@ U 1 1 46A76BA7
P 8800 5250
F 0 "R63" V 8880 5250 50 0000 C CNN
F 1 "1K" V 8800 5250 50 0000 C CNN
F 2 "" H 8800 5250 60 0001 C CNN
F 2 "lib_smd:SM0805" H 8800 5250 60 0001 C CNN
F 3 "" H 8800 5250 60 0001 C CNN
1 8800 5250
0 -1 -1 0
......@@ -957,7 +957,7 @@ U 1 1 46A76BA6
P 2350 1050
F 0 "P1" V 2300 1050 60 0000 C CNN
F 1 "CONN_6" V 2400 1050 60 0000 C CNN
F 2 "" H 2350 1050 60 0001 C CNN
F 2 "pin_array:PIN_ARRAY-6X1" H 2350 1050 60 0001 C CNN
F 3 "" H 2350 1050 60 0001 C CNN
1 2350 1050
-1 0 0 1
......
......@@ -38,6 +38,7 @@ DIALOG_TRACK_VIA_SIZE::DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, PNS_ROUTING_SET
m_viaDrill->SetValue( To_User_Unit( m_viaDrill->GetUnits(), m_settings.GetViaDrill() ) );
m_trackWidth->SetFocus();
GetSizer()->SetSizeHints( this );
// Pressing ENTER when any of the text input fields is active applies changes
#if wxCHECK_VERSION( 3, 0, 0 )
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_shim.h"
#include "dialog_track_via_size_base.h"
///////////////////////////////////////////////////////////////////////////
......
......@@ -20,8 +20,10 @@
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
......@@ -42,8 +44,8 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_TRACK_VIA_SIZE_BASE</property>
<property name="pos"></property>
<property name="size">388,164</property>
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="size">388,162</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Track width and via size</property>
<property name="tooltip"></property>
......@@ -93,7 +95,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="1">
<property name="BottomDockable">1</property>
......@@ -145,7 +147,7 @@
<property name="settings"></property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass"></property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
......@@ -178,7 +180,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="1">
<property name="BottomDockable">1</property>
......@@ -263,7 +265,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="CustomControl" expanded="1">
<property name="BottomDockable">1</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include <wxunittext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
......@@ -46,7 +48,7 @@ class DIALOG_TRACK_VIA_SIZE_BASE : public wxDialog
public:
DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,164 ), long style = wxDEFAULT_DIALOG_STYLE );
DIALOG_TRACK_VIA_SIZE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Track width and via size"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 388,162 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_TRACK_VIA_SIZE_BASE();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment