Commit d188bf5a authored by charras's avatar charras
Browse files

better compatibility with wxWidgets 2.9. Markers enhancement in pcbnew (right...

better compatibility with wxWidgets 2.9. Markers enhancement in pcbnew (right click can display marker info)
parent 3be6ba42
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -63,12 +63,18 @@ END_EVENT_TABLE()

/*************************************************************************/
Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) :
    wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE )
    wxGLCanvas( parent, -1, NULL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE )
/*************************************************************************/
{
    m_init   = FALSE;
    m_gllist = 0;
    m_Parent = parent;

    // Explicitly create a new rendering context instance for this canvas.
    m_glRC = new wxGLContext(this);

    // Make the new context current (activate it for use) with this canvas.
    SetCurrent(*m_glRC);
    DisplayStatus();
}

@@ -79,6 +85,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas()
{
    ClearLists();
    m_init = FALSE;
    delete m_glRC;
}


@@ -484,6 +491,7 @@ void Pcb3D_GLCanvas::OnPaint( wxPaintEvent& event )
    const wxSize ClientSize = GetClientSize();

    glViewport( 0, 0, ClientSize.x, ClientSize.y );

    Redraw();
    event.Skip();
}
+1 −2
Original line number Diff line number Diff line
@@ -46,8 +46,7 @@ static GLfloat Get3DLayerSide( int act_layer );
void Pcb3D_GLCanvas::Redraw( bool finish )
/******************************************/
{
    SetCurrent();

    SetCurrent(*m_glRC);
    InitGL();

    glMatrixMode( GL_MODELVIEW );    /* position viewer */
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public:
private:
    bool   m_init;
    GLuint m_gllist;
    wxGLContext* m_glRC;

public:
    Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent );
+16 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "macros.h"
#include "class_drawpanel.h"
#include "class_marker_base.h"
#include "dialog_display_info_HTML_base.h"


// Default marquer shape:
@@ -170,3 +171,18 @@ void MARKER_BASE::DrawMarker( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode
                  m_Color       // fill collor
                  );
}


/** Function DisplayMarkerInfo()
 * Displays the full info of this marker, within an HTML window
 */
void MARKER_BASE::DisplayMarkerInfo( WinEDA_DrawFrame* aFrame )
{
    wxString msg = m_drc.ShowHtml();
    DIALOG_DISPLAY_HTML_TEXT_BASE
        infodisplay( (wxWindow*)aFrame, wxID_ANY, _("Marker Info"),
        wxGetMousePosition(), wxSize( 550, 140 ) );

    infodisplay.m_htmlWindow->SetPage( msg );
    infodisplay.ShowModal();
}
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ void DIALOG_LOAD_ERROR::ListClear(void)

/** Function ListSet
 * Add a list of items.
 * @param list = a pointer on a string containing items. Items are separated by '\n'
 * @param list = a string containing items. Items are separated by '\n'
 */
void DIALOG_LOAD_ERROR::ListSet(const wxString &list)
{
@@ -42,7 +42,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &list)

/** Function MessageSet
 * Add a message (in bold) to message list.
 * @param message = a pointer to the message
 * @param message = the message
 */
void DIALOG_LOAD_ERROR::MessageSet(const wxString &message)
{
Loading