Commit df7e6f37 authored by stambaughw's avatar stambaughw
Browse files

annotate dialog HIGification, refactor and beautify associated

annotation code
parent d2fe629b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.

2008-Feb-25 UPDATE   Wayne Stambaugh <stambaughw{at}verizon{dot}net>
================================================================================
+eeschema
  * converted annotate_dialog layout to Gnome HIG per UIPolicy.txt factor
    out dialog code from annotate.cpp.
  * refactor and uncrustify schframe.cpp and schedit.cpp
  * modify eeschema CMakeList.txt to reflect code changes.


2008-Feb-22 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ INCLUDE_DIRECTORIES(
SET(EESCHEMA_SRCS
    affiche.cpp
    annotate.cpp
#   annotate_dialog.cpp
    annotate_dialog.cpp
    block.cpp
    block_libedit.cpp
    busentry.cpp
+293 −306

File changed.

Preview size limit exceeded, changes collapsed.

+211 −112
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////

// Name:        annotate_dialog.cpp
// Purpose:
// Author:      jean-pierre Charras
// Modified by: 
// Modified by: Wayne Stambaugh
//
// Created:     05/02/2006 12:31:28
// Modified     02/21/2008 13:47:10
// RCS-ID:
// Copyright:   License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 05/02/2006 12:31:28

#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
#pragma implementation "annotate_dialog.h"
@@ -26,13 +28,15 @@
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "annotate_dialog.h"

////@begin XPM images
////@end XPM images
extern void DeleteAnnotation( WinEDA_SchematicFrame* parent,
                              bool annotateSchematic );
extern void AnnotateComponents( WinEDA_SchematicFrame* parent,
                                bool annotateSchematic,
                                bool sortByPosition,
                                bool resetAnnotation );


/*!
 * WinEDA_AnnotateFrame type definition
@@ -45,16 +49,8 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_AnnotateFrame, wxDialog )
 */

BEGIN_EVENT_TABLE( WinEDA_AnnotateFrame, wxDialog )

////@begin WinEDA_AnnotateFrame event table entries
    EVT_BUTTON( ID_ANNOTATE_CMP, WinEDA_AnnotateFrame::OnAnnotateCmpClick )

    EVT_BUTTON( ID_DEANNOTATE_CMP, WinEDA_AnnotateFrame::OnDeannotateCmpClick )

    EVT_BUTTON( wxID_CANCEL, WinEDA_AnnotateFrame::OnCancelClick )

////@end WinEDA_AnnotateFrame event table entries

    EVT_BUTTON( wxID_CLEAR, WinEDA_AnnotateFrame::OnClear )
    EVT_BUTTON( wxID_APPLY, WinEDA_AnnotateFrame::OnApply )
END_EVENT_TABLE()

/*!
@@ -63,29 +59,36 @@ END_EVENT_TABLE()

WinEDA_AnnotateFrame::WinEDA_AnnotateFrame()
{
    m_rbEntireSchematic = NULL;
    m_cbResetAnnotation = NULL;
    m_rbSortByPosition = NULL;
    m_btnClear = NULL;
}

WinEDA_AnnotateFrame::WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )

WinEDA_AnnotateFrame::WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent,
                                            wxWindowID id,
                                            const wxString& caption,
                                            const wxPoint& pos,
                                            const wxSize& size,
                                            long style )
{
    m_Parent = parent;
	m_Abort = FALSE;
    Create( parent, id, caption, pos, size, style );
	m_AnnotNewCmpCtrl->SetSelection(1);
}


/*!
 * WinEDA_AnnotateFrame creator
 */

bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
bool WinEDA_AnnotateFrame::Create( wxWindow* parent,
                                   wxWindowID id,
                                   const wxString& caption,
                                   const wxPoint& pos,
                                   const wxSize& size,
                                   long style )
{
////@begin WinEDA_AnnotateFrame member initialisation
    m_AnnotProjetCtrl = NULL;
    m_AnnotNewCmpCtrl = NULL;
    m_AnnotSortCmpCtrl = NULL;
////@end WinEDA_AnnotateFrame member initialisation

////@begin WinEDA_AnnotateFrame creation
    SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
    wxDialog::Create( parent, id, caption, pos, size, style );

@@ -95,70 +98,121 @@ bool WinEDA_AnnotateFrame::Create( wxWindow* parent, wxWindowID id, const wxStri
        GetSizer()->SetSizeHints( this );
    }
    Centre();
////@end WinEDA_AnnotateFrame creation

    return true;
}


/*!
 * Control creation for WinEDA_AnnotateFrame
 */

void WinEDA_AnnotateFrame::CreateControls()
{
	SetFont(*g_DialogFont);

////@begin WinEDA_AnnotateFrame content construction
    // Generated by DialogBlocks, 07/11/2007 08:19:55 (unregistered)

    WinEDA_AnnotateFrame* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);

    wxArrayString m_AnnotProjetCtrlStrings;
    m_AnnotProjetCtrlStrings.Add(_("Hierarchy"));
    m_AnnotProjetCtrlStrings.Add(_("Current sheet"));
    m_AnnotProjetCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("annotate:"), wxDefaultPosition, wxDefaultSize, m_AnnotProjetCtrlStrings, 1, wxRA_SPECIFY_COLS );
    m_AnnotProjetCtrl->SetSelection(0);
    itemBoxSizer3->Add(m_AnnotProjetCtrl, 0, wxGROW|wxALL, 5);

    wxArrayString m_AnnotNewCmpCtrlStrings;
    m_AnnotNewCmpCtrlStrings.Add(_("all components"));
    m_AnnotNewCmpCtrlStrings.Add(_("new components only"));
    m_AnnotNewCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("select items:"), wxDefaultPosition, wxDefaultSize, m_AnnotNewCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
    m_AnnotNewCmpCtrl->SetSelection(0);
    itemBoxSizer3->Add(m_AnnotNewCmpCtrl, 0, wxGROW|wxALL, 5);

    wxArrayString m_AnnotSortCmpCtrlStrings;
    m_AnnotSortCmpCtrlStrings.Add(_("by position"));
    m_AnnotSortCmpCtrlStrings.Add(_("by value"));
    m_AnnotSortCmpCtrl = new wxRadioBox( itemDialog1, ID_RADIOBOX2, _("sorting:"), wxDefaultPosition, wxDefaultSize, m_AnnotSortCmpCtrlStrings, 1, wxRA_SPECIFY_COLS );
    m_AnnotSortCmpCtrl->SetSelection(0);
    itemBoxSizer3->Add(m_AnnotSortCmpCtrl, 0, wxGROW|wxALL, 5);

    wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL);
    itemBoxSizer2->Add(itemBoxSizer7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton8 = new wxButton( itemDialog1, ID_ANNOTATE_CMP, _("&Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton8->SetDefault();
    itemButton8->SetForegroundColour(wxColour(198, 0, 0));
    itemBoxSizer7->Add(itemButton8, 0, wxGROW|wxALL, 5);

    wxButton* itemButton9 = new wxButton( itemDialog1, ID_DEANNOTATE_CMP, _("&Del Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
    itemButton9->SetForegroundColour(wxColour(0, 0, 230));
    itemBoxSizer7->Add(itemButton9, 0, wxGROW|wxALL, 5);

    wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer7->Add(itemButton10, 0, wxGROW|wxALL, 5);

////@end WinEDA_AnnotateFrame content construction

	m_AnnotSortCmpCtrl->SetSelection(SortByPosition ? 0 : 1);
    wxFont fontBold = this->GetFont();
    fontBold.SetWeight(wxFONTWEIGHT_BOLD);

    wxBoxSizer* sizerTop = new wxBoxSizer( wxVERTICAL );

    /* Sizer flags for setting up the spacing of the controls in the dialog
     * box.  These eventually should be moved to a file with a header in
     * the common directory so all of the dialogs share the same layout
     * spacing */

    /* Spacing for grouping labels in a dialog box. */
    wxSizerFlags flagsLabelSpacing( 0 );
    flagsLabelSpacing.Align( wxALIGN_TOP | wxALIGN_LEFT );
    flagsLabelSpacing.Border( wxLEFT | wxTOP, 6 );

    /* Spacing for grouping radio buttons inside the grouping sizer. */
    wxSizerFlags flagsRadioButtonSpacing( 0 );
    flagsRadioButtonSpacing.Align( wxALIGN_LEFT );
    flagsRadioButtonSpacing.Border( wxTOP | wxLEFT | wxRIGHT, 6 );

    /* Spacing for the radio button sizer inside the group sizer. */
    wxSizerFlags flagsRadioButtonSizerSpacing( 0 );
    flagsRadioButtonSizerSpacing.Align( wxALIGN_TOP | wxALIGN_LEFT );
    flagsRadioButtonSizerSpacing.Border( wxLEFT, 20 );

    /* Spacing for the vertical group sizers. */
    wxSizerFlags flagsGroupSizerSpacing( 1 );
    flagsGroupSizerSpacing.Align( wxALIGN_TOP | wxALIGN_LEFT );
    flagsGroupSizerSpacing.Border( wxTOP | wxLEFT | wxRIGHT, 12 );

    /* Spacing for dialog button sizer. */
    wxSizerFlags flagsDialogButtonSizerSpacing( 0 );
    flagsDialogButtonSizerSpacing.Border( wxALL, 12 );

    /* Spacing for the dialog buttons. */
    wxSizerFlags flagsDialogButtonSpacing( 0 );
    flagsDialogButtonSpacing.Border( wxLEFT | wxRIGHT, 3 );

    /* Annotate scope sizers, label, and radio buttons. */
    wxBoxSizer* sizerAnnotate = new wxBoxSizer( wxVERTICAL );
    wxStaticText* labelAnnotate = new wxStaticText( this, -1,
                                                    _( "Scope" ) );
    labelAnnotate->SetFont( fontBold );
    sizerAnnotate->Add( labelAnnotate, flagsLabelSpacing );
    wxBoxSizer* sizerAnnotateItems = new wxBoxSizer( wxVERTICAL );
    m_rbEntireSchematic =
        new wxRadioButton( this, ID_ENTIRE_SCHEMATIC,
                           _( "Annotate the entire schematic" ),
                           wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
    wxRadioButton* rbCurrentPage =
        new wxRadioButton( this, ID_CURRENT_PAGE,
                           _( "Annotate the current page only" ) );
    m_rbEntireSchematic->SetValue( true );
    m_cbResetAnnotation = new wxCheckBox( this, ID_RESET_ANNOTATION,
                                          _( "Reset existing annotation" ) );

    sizerAnnotateItems->Add( m_rbEntireSchematic, flagsRadioButtonSpacing );
    sizerAnnotateItems->Add( rbCurrentPage, flagsRadioButtonSpacing );
    sizerAnnotateItems->Add( m_cbResetAnnotation, flagsRadioButtonSpacing );
    sizerAnnotate->Add( sizerAnnotateItems, flagsRadioButtonSizerSpacing );
    sizerTop->Add( sizerAnnotate, flagsGroupSizerSpacing );

    /* Annotation sort order sizers, label, and radio buttons. */
    wxBoxSizer* sizerSort = new wxBoxSizer( wxVERTICAL );
    wxStaticText* labelSort = new wxStaticText( this, wxID_ANY,
                                                _( "Order" ) );
    labelSort->SetFont( fontBold );
    sizerSort->Add( labelSort, flagsLabelSpacing );
    wxBoxSizer* sizerSortItems = new wxBoxSizer( wxVERTICAL );
    m_rbSortByPosition = new wxRadioButton( this,
                                            ID_SORT_BY_POSITION,
                                            _( "Sort components by position" ),
                                            wxDefaultPosition,
                                            wxDefaultSize,
                                            wxRB_GROUP );
    wxRadioButton* rbSortByValue =
        new wxRadioButton( this, ID_SORT_BY_VALUE,
                           _( "Sort components by value" ) );
    sizerSortItems->Add( m_rbSortByPosition, flagsRadioButtonSpacing );
    sizerSortItems->Add( rbSortByValue, flagsRadioButtonSpacing );
    sizerSort->Add( sizerSortItems, flagsRadioButtonSizerSpacing );
    sizerTop->Add( sizerSort, flagsGroupSizerSpacing );

    /* Standard dialog buttons and sizer. */
    wxBoxSizer* sizerDialogButtons = new wxBoxSizer( wxHORIZONTAL );
    wxButton* btnClose = new wxButton( this, wxID_CANCEL, _( "Close" ) );
    /* TODO: Check if there is any existing annotation and enable/disable
     *       the clear button accordingly.  Probably should also enable/
     *       disable new components radio button if all of the components
     *       are already annotated.  Some low level work on the DrawSheetList
     *       class will need to be done to accomadate this.
     */
    m_btnClear = new wxButton( this, wxID_CLEAR );
    wxButton* btnApply = new wxButton( this, wxID_APPLY );
    sizerDialogButtons->Add( btnClose, flagsDialogButtonSpacing );
    sizerDialogButtons->Add( new wxBoxSizer( wxHORIZONTAL ),
                             wxSizerFlags( 1 ).Expand( ) );
    sizerDialogButtons->Add( m_btnClear, flagsDialogButtonSpacing );
    sizerDialogButtons->Add( btnApply, flagsDialogButtonSpacing );
    sizerTop->Add( sizerDialogButtons, flagsDialogButtonSizerSpacing );
    SetSizer( sizerTop );
}


/*!
 * Should we show tooltips?
 */
@@ -168,6 +222,7 @@ bool WinEDA_AnnotateFrame::ShowToolTips()
    return true;
}


/*!
 * Get bitmap resources
 */
@@ -175,12 +230,11 @@ bool WinEDA_AnnotateFrame::ShowToolTips()
wxBitmap WinEDA_AnnotateFrame::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin WinEDA_AnnotateFrame bitmap retrieval
    wxUnusedVar( name );
    return wxNullBitmap;
////@end WinEDA_AnnotateFrame bitmap retrieval
}


/*!
 * Get icon resources
 */
@@ -188,34 +242,79 @@ wxBitmap WinEDA_AnnotateFrame::GetBitmapResource( const wxString& name )
wxIcon WinEDA_AnnotateFrame::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin WinEDA_AnnotateFrame icon retrieval
    wxUnusedVar( name );
    return wxNullIcon;
////@end WinEDA_AnnotateFrame icon retrieval
}
/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ANNOTATE_CMP
 */

void WinEDA_AnnotateFrame::OnAnnotateCmpClick( wxCommandEvent& event )
void WinEDA_AnnotateFrame::OnClear( wxCommandEvent& event )
{
	AnnotateComponents(event);
    int response;

    wxString message = _( "Clear the existing annotation for " );
    if( GetLevel() )
        message += _( "the entire schematic?" );
    else
        message += _( "the current sheet?" );

    message += _( "\n\nThis operation will clear the existing annotation " \
                  "and cannot be undone." );
    response = wxMessageBox( message, _( "" ),
                             wxICON_EXCLAMATION | wxOK | wxCANCEL );
    if (response == wxCANCEL)
        return;
    DeleteAnnotation( m_Parent, GetLevel() );
    m_btnClear->Enable(false);
}

/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DEANNOTATE_CMP
 */
void WinEDA_AnnotateFrame::OnApply( wxCommandEvent& event )
{
    int response;
    wxButton* btn;
    wxString message;

    if( GetResetItems() )
        message = _( "Clear and annotate all of the components " );
    else
        message = _( "Annotate only the unannotated components " );
    if( GetLevel() )
        message += _( "on the entire schematic?" );
    else
        message += _( "on the current sheet?" );

    message += _( "\n\nThis operation will change the current annotation and " \
                  "cannot be undone." );
    response = wxMessageBox( message, _( "" ),
                             wxICON_EXCLAMATION | wxOK | wxCANCEL );
    if (response == wxCANCEL)
        return;
    AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(),
                        GetResetItems() );
    m_btnClear->Enable();
}

void WinEDA_AnnotateFrame::OnDeannotateCmpClick( wxCommandEvent& event )
bool WinEDA_AnnotateFrame::GetLevel( void )
{
	DeleteAnnotation(event);
    wxASSERT_MSG( ((m_rbEntireSchematic != NULL) &&
                   m_rbEntireSchematic->IsKindOf( CLASSINFO( wxRadioButton ) )),
                  wxT( "m_rbEntireSchematic pointer was NULL." ) );

    return m_rbEntireSchematic->GetValue();
}

/*!
 * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
 */
bool WinEDA_AnnotateFrame::GetResetItems( void )
{
    wxASSERT_MSG( (m_cbResetAnnotation != NULL) &&
                  m_cbResetAnnotation->IsKindOf( CLASSINFO( wxCheckBox ) ),
                  wxT( "m_cbResetAnnotation pointer was NULL." ) );

void WinEDA_AnnotateFrame::OnCancelClick( wxCommandEvent& event )
    return m_cbResetAnnotation->IsChecked();
}

bool WinEDA_AnnotateFrame::GetSortOrder( void )
{
    EndModal( -1 );
    wxASSERT_MSG( (m_rbSortByPosition != NULL) &&
                  m_rbSortByPosition->IsKindOf( CLASSINFO( wxRadioButton ) ),
                  wxT( "m_rbSortByPosition pointer was NULL." ) );

    return m_rbSortByPosition->GetValue();
}
+51 −63
Original line number Diff line number Diff line
/////////////////////////////////////////////////////////////////////////////

// Name:        annotate_dialog.h
// Purpose:
// Author:      jean-pierre Charras
@@ -9,7 +10,6 @@
// Licence:
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 05/02/2006 12:31:28

#ifndef _ANNOTATE_DIALOG_H_
#define _ANNOTATE_DIALOG_H_
@@ -22,39 +22,28 @@
 * Includes
 */

////@begin includes
////@end includes

#include "fctsys.h"

#include "common.h"
#include "program.h"
#include "libcmp.h"
#include "general.h"
/*!
 * Forward declarations
 */

////@begin forward declarations
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_DIALOG                10000
#define ID_RADIOBOX 10001
#define ID_RADIOBOX1 10002
#define ID_RADIOBOX2 10005
#define ID_ANNOTATE_CMP 10003
#define ID_DEANNOTATE_CMP 10004
#define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation")
#define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition
////@end control identifiers
#define ID_ENTIRE_SCHEMATIC      10001
#define ID_CURRENT_PAGE          10002
#define ID_RESET_ANNOTATION      10003
#define ID_SORT_BY_POSITION      10004
#define ID_SORT_BY_VALUE         10005

#define ANNOTATE_DIALOG_STYLE    wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER
#define ANNOTATE_DIALOG_TITLE    _( "Annotate" )


/*!
 * Compatibility
@@ -71,57 +60,56 @@
class WinEDA_AnnotateFrame : public wxDialog
{
    DECLARE_DYNAMIC_CLASS( WinEDA_AnnotateFrame )
    DECLARE_EVENT_TABLE()

public:

    /// Constructors
    WinEDA_AnnotateFrame();
    WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ANNOTATEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ANNOTATEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ANNOTATEFRAME_SIZE, long style = SYMBOL_WINEDA_ANNOTATEFRAME_STYLE );
    WinEDA_AnnotateFrame( WinEDA_SchematicFrame* parent,
                          wxWindowID id = wxID_ANY,
                          const wxString& caption = ANNOTATE_DIALOG_TITLE,
                          const wxPoint& pos = wxDefaultPosition,
                          const wxSize& size = wxDefaultSize,
                          long style = ANNOTATE_DIALOG_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ANNOTATEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ANNOTATEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ANNOTATEFRAME_SIZE, long style = SYMBOL_WINEDA_ANNOTATEFRAME_STYLE );
    bool Create( wxWindow* parent,
                 wxWindowID id = wxID_ANY,
                 const wxString& caption = ANNOTATE_DIALOG_TITLE,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = ANNOTATE_DIALOG_STYLE );

    /// Creates the controls and sizers
    void    CreateControls();

////@begin WinEDA_AnnotateFrame event handler declarations

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ANNOTATE_CMP
    void OnAnnotateCmpClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DEANNOTATE_CMP
    void OnDeannotateCmpClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
    void OnCancelClick( wxCommandEvent& event );

////@end WinEDA_AnnotateFrame event handler declarations

////@begin WinEDA_AnnotateFrame member function declarations

    /// Retrieves bitmap resources
    wxBitmap    GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon      GetIconResource( const wxString& name );
////@end WinEDA_AnnotateFrame member function declarations

    bool GetLevel( void );
    bool GetResetItems( void );
    bool GetSortOrder( void );

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin WinEDA_AnnotateFrame member variables
    wxRadioBox* m_AnnotProjetCtrl;
    wxRadioBox* m_AnnotNewCmpCtrl;
    wxRadioBox* m_AnnotSortCmpCtrl;
////@end WinEDA_AnnotateFrame member variables

    WinEDA_SchematicFrame* m_Parent;
	bool m_Abort;

private:
	void AnnotateComponents(wxCommandEvent& event);
	void DeleteAnnotation(wxCommandEvent& event);
    void OnClear( wxCommandEvent& event );
    void OnApply( wxCommandEvent& event );

    wxRadioButton* m_rbEntireSchematic;
    wxRadioButton* m_rbSortByPosition;
    wxCheckBox* m_cbResetAnnotation;
    wxButton* m_btnClear;

    DECLARE_EVENT_TABLE()
};

#endif

// _ANNOTATE_DIALOG_H_
Loading