Commit a6278c25 authored by charras's avatar charras
Browse files

removed warn compil., updated CMakefiles for macosx and removed obsolete makefile.macosx

parent fb25b5c4
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@
#include "trackball.h"
#include "trackball.h"


/* Tool and button Bitmaps */
/* Tool and button Bitmaps */
#define XPM_3D_MAIN
#include "bitmaps.h"
#include "bitmaps.h"


enum onrclick_id {
enum onrclick_id {
@@ -63,10 +62,8 @@ EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END,
END_EVENT_TABLE()
END_EVENT_TABLE()


/*************************************************************************/
/*************************************************************************/
Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, const wxWindowID id,
Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) :
                                int* gl_attrib ) :
    wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE )
    wxGLCanvas( parent, id,
                wxPoint( -1, -1 ), wxSize( -1, -1 ), wxFULL_REPAINT_ON_RESIZE )
/*************************************************************************/
/*************************************************************************/
{
{
    m_init   = FALSE;
    m_init   = FALSE;
@@ -91,7 +88,6 @@ void Pcb3D_GLCanvas::ClearLists()
{
{
    if( m_gllist > 0 )
    if( m_gllist > 0 )
        glDeleteLists( m_gllist, 1 );
        glDeleteLists( m_gllist, 1 );
//    m_init   = FALSE;
    m_gllist = 0;
    m_gllist = 0;
}
}


+1 −7
Original line number Original line Diff line number Diff line
@@ -32,12 +32,6 @@ double ZBottom;
double ZTop;
double ZTop;
double DataScale3D;  // coeff de conversion unites utilsateut -> unites 3D
double DataScale3D;  // coeff de conversion unites utilsateut -> unites 3D


int gl_attrib[] =
{
    WX_GL_RGBA, WX_GL_MIN_RED, 8, WX_GL_MIN_GREEN, 8, WX_GL_MIN_BLUE, 8,
    WX_GL_DEPTH_SIZE, 16, WX_GL_DOUBLEBUFFER, GL_NONE
};



BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
    EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
    EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
@@ -84,7 +78,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent,


    // Make a Pcb3D_GLCanvas
    // Make a Pcb3D_GLCanvas


    m_Canvas = new Pcb3D_GLCanvas( this, -1, gl_attrib );
    m_Canvas = new Pcb3D_GLCanvas( this );


    /* init OpenGL once */
    /* init OpenGL once */
    m_Canvas->InitGL();
    m_Canvas->InitGL();
+1 −2
Original line number Original line Diff line number Diff line
@@ -80,8 +80,7 @@ private:
    GLuint m_gllist;
    GLuint m_gllist;


public:
public:
    Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent, const wxWindowID id = -1,
    Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent );
                    int* gl_attrib = NULL);
    ~Pcb3D_GLCanvas();
    ~Pcb3D_GLCanvas();


    void ClearLists();
    void ClearLists();

3d-viewer/makefile.macosx

deleted100644 → 0
+0 −29
Original line number Original line Diff line number Diff line
## Makefile for 3d-viewer.a

include ../libs.macosx

TARGET = 3d-viewer.a

all: $(TARGET)

deps:
	$(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null

include makefile.include
-include *.d

CPPFLAGS += -DPCBNEW  -I../pcbnew
EDACPPFLAGS = $(CPPFLAGS)

$(TARGET): $(OBJECTS3D) makefile.macosx makefile.include
	rm -f $@
	ar -rv $@ $(OBJECTS3D)
	ranlib $@


clean:
	rm -f *.o; rm -f *~
	rm -f $(TARGET)


+77 −67
Original line number Original line Diff line number Diff line
@@ -248,6 +248,7 @@ bool EDA_TextStruct::HitTest( EDA_Rect& refArea )
/*******************************/
/*******************************/
int EDA_TextStruct::Pitch( int aMinTickness )
int EDA_TextStruct::Pitch( int aMinTickness )
/*******************************/
/*******************************/

/**
/**
 * Function Pitch
 * Function Pitch
 * @return distance between 2 characters
 * @return distance between 2 characters
@@ -264,6 +265,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
                           int aDrawMode,
                           int aDrawMode,
                           GRFillMode aDisplayMode, EDA_Colors aAnchor_color )
                           GRFillMode aDisplayMode, EDA_Colors aAnchor_color )
/***************************************************************/
/***************************************************************/

/** Function Draw
/** Function Draw
 *  @param aPanel = the current DrawPanel
 *  @param aPanel = the current DrawPanel
 *  @param aDC = the current Device Context
 *  @param aDC = the current Device Context
@@ -278,18 +280,25 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
    wxPoint        pos  = m_Pos;
    wxPoint        pos  = m_Pos;
    wxArrayString* list = wxStringSplit( m_Text, '\n' );
    wxArrayString* list = wxStringSplit( m_Text, '\n' );


    for( int i=0;i<list->Count();i++)
    for( unsigned i = 0; i<list->Count(); i++ )
    {
    {
        wxString txt  = list->Item( i );
        wxString txt  = list->Item( i );
       wxSize size=DrawOneLine(aPanel,aDC,aOffset,aColor,aDrawMode,aDisplayMode,aAnchor_color,txt,pos);
        wxSize   size = DrawOneLine( aPanel,
                                     aDC,
                                     aOffset,
                                     aColor,
                                     aDrawMode,
                                     aDisplayMode,
                                     aAnchor_color,
                                     txt,
                                     pos );
        pos.y += 1.5 * (size.y);
        pos.y += 1.5 * (size.y);
    }
    }
    delete (list);


    delete (list);
}
}





wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC,
wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC,
                                    const wxPoint& aOffset, EDA_Colors aColor,
                                    const wxPoint& aOffset, EDA_Colors aColor,
                                    int aDrawMode,
                                    int aDrawMode,
@@ -297,6 +306,7 @@ wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC,
                                    wxString txt, wxPoint pos )
                                    wxString txt, wxPoint pos )
{
{
    int width = m_Width;
    int width = m_Width;

    if( aDisplayMode == FILAIRE )
    if( aDisplayMode == FILAIRE )
        width = 0;
        width = 0;


@@ -328,7 +338,6 @@ wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC,
        size.x = -size.x;
        size.x = -size.x;




      
    DrawGraphicText( aPanel, aDC,
    DrawGraphicText( aPanel, aDC,
                     aOffset + pos, aColor, txt,
                     aOffset + pos, aColor, txt,
                     m_Orient, size,
                     m_Orient, size,
@@ -336,6 +345,7 @@ wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC,
    return size;
    return size;
}
}



/******************/
/******************/
/* Class EDA_Rect */
/* Class EDA_Rect */
/******************/
/******************/
Loading