Commit df7e6f37 authored by stambaughw's avatar stambaughw

annotate dialog HIGification, refactor and beautify associated

annotation code
parent d2fe629b
......@@ -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>
================================================================================
......
......@@ -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
......
This diff is collapsed.
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: annotate_dialog.h
// Purpose:
// Author: jean-pierre Charras
......@@ -9,12 +10,11 @@
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 05/02/2006 12:31:28
#ifndef _ANNOTATE_DIALOG_H_
#define _ANNOTATE_DIALOG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#if defined (__GNUG__) && !defined (NO_GCC_PRAGMA)
#pragma interface "annotate_dialog.h"
#endif
......@@ -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
......@@ -68,60 +57,59 @@
* WinEDA_AnnotateFrame class declaration
*/
class WinEDA_AnnotateFrame: public wxDialog
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_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;
WinEDA_SchematicFrame* m_Parent;
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_
// _ANNOTATE_DIALOG_H_
......@@ -2,6 +2,9 @@
/* GENERAL.H : declarations communes */
/***************************************/
#ifndef _GENERAL_H_
#define _GENERAL_H_
#ifndef eda_global
#define eda_global extern
#endif
......@@ -267,3 +270,5 @@ eda_global int g_PlotPSMinimunLineWidth; /* Minimum line (in EESCHEMA units) wid
/* Config keys */
#define MINI_DRAW_LINE_WIDTH_KEY wxT("MinimunDrawLineWidth")
#define MINI_PLOTPS_LINE_WIDTH_KEY wxT("MinimunPlotPSLineWidth")
#endif // _GENERAL_H_
......@@ -300,7 +300,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos);
/***************/
void ReAnnotatePowerSymbolsOnly();
void InstallAnnotateFrame(WinEDA_SchematicFrame * parent, wxPoint &pos);
void InstallAnnotateFrame(WinEDA_SchematicFrame * parent);
int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
/* Retourne le nombre de composants non annotes ou erron�s
Si OneSheetOnly : recherche sur le schema courant
......
This diff is collapsed.
This diff is collapsed.
......@@ -438,6 +438,7 @@ public:
private:
void Process_Move_Item( EDA_BaseStruct* DrawStruct, wxDC* DC );
void OnAnnotate ( wxCommandEvent& event );
// Bus Entry
DrawBusEntryStruct* CreateBusEntry( wxDC* DC, int entry_type );
......
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