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 ...@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. 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> 2008-Feb-22 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
......
...@@ -7,7 +7,7 @@ INCLUDE_DIRECTORIES( ...@@ -7,7 +7,7 @@ INCLUDE_DIRECTORIES(
SET(EESCHEMA_SRCS SET(EESCHEMA_SRCS
affiche.cpp affiche.cpp
annotate.cpp annotate.cpp
# annotate_dialog.cpp annotate_dialog.cpp
block.cpp block.cpp
block_libedit.cpp block_libedit.cpp
busentry.cpp busentry.cpp
......
This diff is collapsed.
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: annotate_dialog.h // Name: annotate_dialog.h
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 05/02/2006 12:31:28 // Created: 05/02/2006 12:31:28
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 05/02/2006 12:31:28
#ifndef _ANNOTATE_DIALOG_H_ #ifndef _ANNOTATE_DIALOG_H_
#define _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" #pragma interface "annotate_dialog.h"
#endif #endif
...@@ -22,39 +22,28 @@ ...@@ -22,39 +22,28 @@
* Includes * Includes
*/ */
////@begin includes
////@end includes
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h" #include "program.h"
#include "libcmp.h" #include "libcmp.h"
#include "general.h" #include "general.h"
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*! /*!
* Control identifiers * Control identifiers
*/ */
////@begin control identifiers #define ID_DIALOG 10000
#define ID_DIALOG 10000 #define ID_ENTIRE_SCHEMATIC 10001
#define ID_RADIOBOX 10001 #define ID_CURRENT_PAGE 10002
#define ID_RADIOBOX1 10002 #define ID_RESET_ANNOTATION 10003
#define ID_RADIOBOX2 10005 #define ID_SORT_BY_POSITION 10004
#define ID_ANNOTATE_CMP 10003 #define ID_SORT_BY_VALUE 10005
#define ID_DEANNOTATE_CMP 10004
#define SYMBOL_WINEDA_ANNOTATEFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER #define ANNOTATE_DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_ANNOTATEFRAME_TITLE _("EESchema Annotation") #define ANNOTATE_DIALOG_TITLE _( "Annotate" )
#define SYMBOL_WINEDA_ANNOTATEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ANNOTATEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ANNOTATEFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*! /*!
* Compatibility * Compatibility
...@@ -68,60 +57,59 @@ ...@@ -68,60 +57,59 @@
* WinEDA_AnnotateFrame class declaration * WinEDA_AnnotateFrame class declaration
*/ */
class WinEDA_AnnotateFrame: public wxDialog class WinEDA_AnnotateFrame : public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( WinEDA_AnnotateFrame ) DECLARE_DYNAMIC_CLASS( WinEDA_AnnotateFrame )
DECLARE_EVENT_TABLE()
public: public:
/// Constructors /// Constructors
WinEDA_AnnotateFrame( ); 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 /// 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 /// Creates the controls and sizers
void CreateControls(); 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 /// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name ); wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources /// Retrieves icon resources
wxIcon GetIconResource( const wxString& name ); wxIcon GetIconResource( const wxString& name );
////@end WinEDA_AnnotateFrame member function declarations
bool GetLevel( void );
bool GetResetItems( void );
bool GetSortOrder( void );
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
////@begin WinEDA_AnnotateFrame member variables WinEDA_SchematicFrame* m_Parent;
wxRadioBox* m_AnnotProjetCtrl;
wxRadioBox* m_AnnotNewCmpCtrl;
wxRadioBox* m_AnnotSortCmpCtrl;
////@end WinEDA_AnnotateFrame member variables
WinEDA_SchematicFrame * m_Parent;
bool m_Abort;
private: private:
void AnnotateComponents(wxCommandEvent& event); void OnClear( wxCommandEvent& event );
void DeleteAnnotation(wxCommandEvent& event); void OnApply( wxCommandEvent& event );
wxRadioButton* m_rbEntireSchematic;
wxRadioButton* m_rbSortByPosition;
wxCheckBox* m_cbResetAnnotation;
wxButton* m_btnClear;
DECLARE_EVENT_TABLE()
}; };
#endif #endif
// _ANNOTATE_DIALOG_H_
// _ANNOTATE_DIALOG_H_
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
/* GENERAL.H : declarations communes */ /* GENERAL.H : declarations communes */
/***************************************/ /***************************************/
#ifndef _GENERAL_H_
#define _GENERAL_H_
#ifndef eda_global #ifndef eda_global
#define eda_global extern #define eda_global extern
#endif #endif
...@@ -267,3 +270,5 @@ eda_global int g_PlotPSMinimunLineWidth; /* Minimum line (in EESCHEMA units) wid ...@@ -267,3 +270,5 @@ eda_global int g_PlotPSMinimunLineWidth; /* Minimum line (in EESCHEMA units) wid
/* Config keys */ /* Config keys */
#define MINI_DRAW_LINE_WIDTH_KEY wxT("MinimunDrawLineWidth") #define MINI_DRAW_LINE_WIDTH_KEY wxT("MinimunDrawLineWidth")
#define MINI_PLOTPS_LINE_WIDTH_KEY wxT("MinimunPlotPSLineWidth") #define MINI_PLOTPS_LINE_WIDTH_KEY wxT("MinimunPlotPSLineWidth")
#endif // _GENERAL_H_
...@@ -300,7 +300,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos); ...@@ -300,7 +300,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos);
/***************/ /***************/
void ReAnnotatePowerSymbolsOnly(); void ReAnnotatePowerSymbolsOnly();
void InstallAnnotateFrame(WinEDA_SchematicFrame * parent, wxPoint &pos); void InstallAnnotateFrame(WinEDA_SchematicFrame * parent);
int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly); int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
/* Retourne le nombre de composants non annotes ou erron�s /* Retourne le nombre de composants non annotes ou erron�s
Si OneSheetOnly : recherche sur le schema courant Si OneSheetOnly : recherche sur le schema courant
......
This diff is collapsed.
This diff is collapsed.
...@@ -438,6 +438,7 @@ public: ...@@ -438,6 +438,7 @@ public:
private: private:
void Process_Move_Item( EDA_BaseStruct* DrawStruct, wxDC* DC ); void Process_Move_Item( EDA_BaseStruct* DrawStruct, wxDC* DC );
void OnAnnotate ( wxCommandEvent& event );
// Bus Entry // Bus Entry
DrawBusEntryStruct* CreateBusEntry( wxDC* DC, int entry_type ); 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