|
|
|
@ -19,19 +19,19 @@ |
|
|
|
|
|
|
|
//C++ guarantees that operator delete checks its argument for null-ness |
|
|
|
#ifndef SAFE_DELETE |
|
|
|
#define SAFE_DELETE(p) delete (p); (p) = NULL; |
|
|
|
#define SAFE_DELETE( p ) delete (p); (p) = NULL; |
|
|
|
#endif |
|
|
|
|
|
|
|
#define INTERNAL_UNIT_TYPE 0 // Internal unit = inch |
|
|
|
#define INTERNAL_UNIT_TYPE 0 // Internal unit = inch |
|
|
|
|
|
|
|
#ifndef EESCHEMA_INTERNAL_UNIT |
|
|
|
#define EESCHEMA_INTERNAL_UNIT 1000 |
|
|
|
#define EESCHEMA_INTERNAL_UNIT 1000 |
|
|
|
#endif |
|
|
|
|
|
|
|
// Option for dialog boxes |
|
|
|
// #define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP |
|
|
|
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT | \ |
|
|
|
MAYBE_RESIZE_BORDER |
|
|
|
MAYBE_RESIZE_BORDER |
|
|
|
|
|
|
|
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS |
|
|
|
|
|
|
|
@ -72,15 +72,15 @@ enum id_toolbar { |
|
|
|
TOOLBAR_MAIN = 1, // Main horizontal Toolbar |
|
|
|
TOOLBAR_TOOL, // Rigth vertical Toolbar (list of tools) |
|
|
|
TOOLBAR_OPTION, // Left vertical Toolbar (option toolbar |
|
|
|
TOOLBAR_AUX // Secondary horizontal Toolbar |
|
|
|
TOOLBAR_AUX // Secondary horizontal Toolbar |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/**********************/ |
|
|
|
/* Classes pour WXWIN */ |
|
|
|
/**********************/ |
|
|
|
/***********************************************/ |
|
|
|
/* Classes for basic main frames used in kicad */ |
|
|
|
/***********************************************/ |
|
|
|
|
|
|
|
#define MSG_PANEL_DEFAULT_HEIGHT ( 28 ) // height of the infos display window |
|
|
|
#define MSG_PANEL_DEFAULT_HEIGHT ( 28 ) // height of the infos display window |
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************/ |
|
|
|
@ -108,33 +108,33 @@ public: |
|
|
|
WinEDA_BasicFrame( wxWindow* father, int idtype, |
|
|
|
const wxString& title, |
|
|
|
const wxPoint& pos, const wxSize& size, |
|
|
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE); |
|
|
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE ); |
|
|
|
#ifdef KICAD_PYTHON |
|
|
|
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!! |
|
|
|
WinEDA_BasicFrame() { } // Should throw!! |
|
|
|
#endif |
|
|
|
~WinEDA_BasicFrame(); |
|
|
|
|
|
|
|
void GetKicadHelp( wxCommandEvent& event ); |
|
|
|
void GetKicadAbout( wxCommandEvent& event ); |
|
|
|
void PrintMsg( const wxString& text ); |
|
|
|
|
|
|
|
virtual void LoadSettings(); |
|
|
|
virtual void SaveSettings(); |
|
|
|
|
|
|
|
int WriteHotkeyConfigFile( const wxString& Filename, |
|
|
|
struct Ki_HotkeyInfoSectionDescriptor* DescList, |
|
|
|
bool verbose ); |
|
|
|
int ReadHotkeyConfigFile( const wxString& Filename, |
|
|
|
struct Ki_HotkeyInfoSectionDescriptor* DescList, |
|
|
|
bool verbose ); |
|
|
|
void SetLanguage( wxCommandEvent& event ); |
|
|
|
void ProcessFontPreferences( int id ); |
|
|
|
|
|
|
|
wxString GetFileFromHistory( int cmdId, const wxString& type ); |
|
|
|
void SetLastProject( const wxString& FullFileName ); |
|
|
|
void DisplayActivity( int PerCent, const wxString& Text ); |
|
|
|
virtual void ReCreateMenuBar(); |
|
|
|
void GetKicadHelp( wxCommandEvent& event ); |
|
|
|
void GetKicadAbout( wxCommandEvent& event ); |
|
|
|
void PrintMsg( const wxString& text ); |
|
|
|
|
|
|
|
virtual void LoadSettings(); |
|
|
|
virtual void SaveSettings(); |
|
|
|
|
|
|
|
int WriteHotkeyConfigFile( const wxString& Filename, |
|
|
|
struct Ki_HotkeyInfoSectionDescriptor* DescList, |
|
|
|
bool verbose ); |
|
|
|
int ReadHotkeyConfigFile( const wxString& Filename, |
|
|
|
struct Ki_HotkeyInfoSectionDescriptor* DescList, |
|
|
|
bool verbose ); |
|
|
|
void SetLanguage( wxCommandEvent& event ); |
|
|
|
void ProcessFontPreferences( int id ); |
|
|
|
|
|
|
|
wxString GetFileFromHistory( int cmdId, const wxString& type ); |
|
|
|
void SetLastProject( const wxString& FullFileName ); |
|
|
|
void DisplayActivity( int PerCent, const wxString& Text ); |
|
|
|
virtual void ReCreateMenuBar(); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -146,7 +146,7 @@ class WinEDA_DrawFrame : public WinEDA_BasicFrame |
|
|
|
{ |
|
|
|
public: |
|
|
|
WinEDA_DrawPanel* DrawPanel; // Draw area |
|
|
|
WinEDA_MsgPanel* MsgPanel; // Zone d'affichage de caracteristiques |
|
|
|
WinEDA_MsgPanel* MsgPanel; // Panel used to display some info (bottom of the screen) |
|
|
|
WinEDA_Toolbar* m_VToolBar; // Vertical (right side) Toolbar |
|
|
|
WinEDA_Toolbar* m_AuxVToolBar; // Auxiliary Vertical (right side) Toolbar |
|
|
|
WinEDA_Toolbar* m_OptionsToolBar; // Options Toolbar (left side) |
|
|
|
@ -155,26 +155,26 @@ public: |
|
|
|
WinEDAChoiceBox* m_SelGridBox; // Dialog box to choose the grid size |
|
|
|
WinEDAChoiceBox* m_SelZoomBox; // Dialog box to choose the Zoom value |
|
|
|
|
|
|
|
int m_CursorShape; // shape for cursor (0 = default cursor) |
|
|
|
int m_ID_current_state; // Id of active button on the vertical toolbar |
|
|
|
int m_HTOOL_current_state; // Id of active button on horizontal toolbar |
|
|
|
int m_CursorShape; // shape for cursor (0 = default cursor) |
|
|
|
int m_ID_current_state; // Id of active button on the vertical toolbar |
|
|
|
int m_HTOOL_current_state; // Id of active button on horizontal toolbar |
|
|
|
|
|
|
|
int m_InternalUnits; // nombre d'unites internes pour 1 pouce |
|
|
|
// = 1000 pour schema, = 10000 pour PCB |
|
|
|
int m_InternalUnits; // Internal units count in 1 inch |
|
|
|
// = 1000 for eeschema, = 10000 for PCBnew and Gerbview |
|
|
|
|
|
|
|
int m_UnitType; // Internal Unit type (0 = inch) |
|
|
|
bool m_Draw_Axis; // TRUE pour avoir les axes dessines |
|
|
|
bool m_Draw_Grid; // TRUE pour avoir la grille dessinee |
|
|
|
bool m_Draw_Sheet_Ref; // TRUE pour avoir le cartouche dessin� |
|
|
|
int m_UnitType; // Internal Unit type (0 = inch) |
|
|
|
bool m_Draw_Axis; // TRUE to show X and Y axis |
|
|
|
bool m_Draw_Grid; // TRUE to show the grid |
|
|
|
bool m_Draw_Sheet_Ref; // TRUE to show frame references |
|
|
|
|
|
|
|
bool m_Print_Sheet_Ref; // TRUE pour avoir le cartouche imprim� |
|
|
|
bool m_Draw_Auxiliary_Axis; // TRUE pour avoir les axes auxiliaires dessines |
|
|
|
wxPoint m_Auxiliary_Axis_Position; /* origine de l'axe auxiliaire (app: |
|
|
|
* dans la generation les fichiers de positionnement |
|
|
|
* des composants) */ |
|
|
|
bool m_Print_Sheet_Ref; // TRUE to print frame references |
|
|
|
bool m_Draw_Auxiliary_Axis; /* TRUE to show auxiliary axis. Used in pcbnew: |
|
|
|
* the auxiliary axis is the origin of coordinates for drill, gerber and component position files |
|
|
|
*/ |
|
|
|
wxPoint m_Auxiliary_Axis_Position; /* position of the auxiliary axis */ |
|
|
|
|
|
|
|
private: |
|
|
|
BASE_SCREEN* m_CurrentScreen; ///< current used SCREEN |
|
|
|
BASE_SCREEN* m_CurrentScreen; ///< current used SCREEN |
|
|
|
|
|
|
|
protected: |
|
|
|
void SetBaseScreen( BASE_SCREEN* aScreen ) { m_CurrentScreen = aScreen; } |
|
|
|
@ -189,66 +189,66 @@ public: |
|
|
|
|
|
|
|
~WinEDA_DrawFrame(); |
|
|
|
|
|
|
|
virtual wxString GetScreenDesc(); |
|
|
|
virtual wxString GetScreenDesc(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function GetBaseScreen |
|
|
|
* is virtual and returns a pointer to a BASE_SCREEN or one of its derivatives. |
|
|
|
* It may be overloaded by derived classes. |
|
|
|
*/ |
|
|
|
virtual BASE_SCREEN* GetBaseScreen() const { return m_CurrentScreen; } |
|
|
|
|
|
|
|
void OnMenuOpen( wxMenuEvent& event ); |
|
|
|
void OnMouseEvent( wxMouseEvent& event ); |
|
|
|
virtual void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); |
|
|
|
void AddFontSelectionMenu( wxMenu* main_menu ); |
|
|
|
void ProcessFontPreferences( wxCommandEvent& event ); |
|
|
|
|
|
|
|
|
|
|
|
void Affiche_Message( const wxString& message ); |
|
|
|
void EraseMsgBox(); |
|
|
|
void Process_PageSettings( wxCommandEvent& event ); |
|
|
|
void SetDrawBgColor( int color_num ); |
|
|
|
virtual void SetToolbars(); |
|
|
|
void SetLanguage( wxCommandEvent& event ); |
|
|
|
virtual void ReCreateHToolbar() = 0; |
|
|
|
virtual void ReCreateVToolbar() = 0; |
|
|
|
virtual void ReCreateMenuBar(); |
|
|
|
virtual void ReCreateAuxiliaryToolbar(); |
|
|
|
virtual void SetToolID( int id, int new_cursor_id, |
|
|
|
const wxString& title ); |
|
|
|
|
|
|
|
virtual void OnSelectGrid( wxCommandEvent& event ); |
|
|
|
virtual void OnSelectZoom( wxCommandEvent& event ); |
|
|
|
|
|
|
|
virtual void GeneralControle( wxDC* DC, wxPoint Mouse ){ /* dummy */ } |
|
|
|
virtual void OnSize( wxSizeEvent& event ); |
|
|
|
void OnEraseBackground( wxEraseEvent& SizeEvent ); |
|
|
|
virtual BASE_SCREEN* GetBaseScreen() const { return m_CurrentScreen; } |
|
|
|
|
|
|
|
void OnMenuOpen( wxMenuEvent& event ); |
|
|
|
void OnMouseEvent( wxMouseEvent& event ); |
|
|
|
virtual void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); |
|
|
|
void AddFontSelectionMenu( wxMenu* main_menu ); |
|
|
|
void ProcessFontPreferences( wxCommandEvent& event ); |
|
|
|
|
|
|
|
|
|
|
|
void Affiche_Message( const wxString& message ); |
|
|
|
void EraseMsgBox(); |
|
|
|
void Process_PageSettings( wxCommandEvent& event ); |
|
|
|
void SetDrawBgColor( int color_num ); |
|
|
|
virtual void SetToolbars(); |
|
|
|
void SetLanguage( wxCommandEvent& event ); |
|
|
|
virtual void ReCreateHToolbar() = 0; |
|
|
|
virtual void ReCreateVToolbar() = 0; |
|
|
|
virtual void ReCreateMenuBar(); |
|
|
|
virtual void ReCreateAuxiliaryToolbar(); |
|
|
|
virtual void SetToolID( int id, int new_cursor_id, |
|
|
|
const wxString& title ); |
|
|
|
|
|
|
|
virtual void OnSelectGrid( wxCommandEvent& event ); |
|
|
|
virtual void OnSelectZoom( wxCommandEvent& event ); |
|
|
|
|
|
|
|
virtual void GeneralControle( wxDC* DC, wxPoint Mouse ) { /* dummy */ } |
|
|
|
virtual void OnSize( wxSizeEvent& event ); |
|
|
|
void OnEraseBackground( wxEraseEvent& SizeEvent ); |
|
|
|
|
|
|
|
// void OnChar(wxKeyEvent& event); |
|
|
|
void SetToolbarBgColor( int color_num ); |
|
|
|
virtual void OnZoom( wxCommandEvent& event ); |
|
|
|
void OnGrid( int grid_type ); |
|
|
|
void Recadre_Trace( bool ToMouse ); |
|
|
|
void PutOnGrid( wxPoint* coord ); /* set the coordiante "coord" to the nearest grid coordinate */ |
|
|
|
void Zoom_Automatique( bool move_mouse_cursor ); |
|
|
|
void SetToolbarBgColor( int color_num ); |
|
|
|
virtual void OnZoom( wxCommandEvent& event ); |
|
|
|
void OnGrid( int grid_type ); |
|
|
|
void Recadre_Trace( bool ToMouse ); |
|
|
|
void PutOnGrid( wxPoint* coord ); /* set the coordiante "coord" to the nearest grid coordinate */ |
|
|
|
void Zoom_Automatique( bool move_mouse_cursor ); |
|
|
|
|
|
|
|
/* Set the zoom level to show the area Rect */ |
|
|
|
void Window_Zoom( EDA_Rect& Rect ); |
|
|
|
void Window_Zoom( EDA_Rect& Rect ); |
|
|
|
|
|
|
|
/* Return the zoom level which displays the full page on screen */ |
|
|
|
virtual int BestZoom() = 0; |
|
|
|
virtual int BestZoom() = 0; |
|
|
|
|
|
|
|
/* Return the current zoom level */ |
|
|
|
int GetZoom(void); |
|
|
|
int GetZoom( void ); |
|
|
|
|
|
|
|
void ToPrinter( wxCommandEvent& event ); |
|
|
|
void SVG_Print( wxCommandEvent& event ); |
|
|
|
void ToPrinter( wxCommandEvent& event ); |
|
|
|
void SVG_Print( wxCommandEvent& event ); |
|
|
|
|
|
|
|
void OnActivate( wxActivateEvent& event ); |
|
|
|
void ReDrawPanel(); |
|
|
|
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ); |
|
|
|
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen ); |
|
|
|
void OnActivate( wxActivateEvent& event ); |
|
|
|
void ReDrawPanel(); |
|
|
|
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ); |
|
|
|
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen ); |
|
|
|
|
|
|
|
/** Function GetXYSheetReferences |
|
|
|
* Return the X,Y sheet references where the point position is located |
|
|
|
@ -256,36 +256,36 @@ public: |
|
|
|
* @param aPosition = position to identify by YX ref |
|
|
|
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits) |
|
|
|
*/ |
|
|
|
wxString GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition ); |
|
|
|
|
|
|
|
void DisplayToolMsg( const wxString& msg ); |
|
|
|
void Process_Zoom( wxCommandEvent& event ); |
|
|
|
void Process_Grid( wxCommandEvent& event ); |
|
|
|
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0; |
|
|
|
virtual void Process_Special_Functions( wxCommandEvent& event ) = 0; |
|
|
|
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; |
|
|
|
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); |
|
|
|
virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; |
|
|
|
virtual void ToolOnRightClick( wxCommandEvent& event ); |
|
|
|
void AdjustScrollBars(); |
|
|
|
virtual void UpdateStatusBar(); /* Affichage des coord curseur, zoom .. */ |
|
|
|
void DisplayUnitsMsg(); |
|
|
|
wxString GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition ); |
|
|
|
|
|
|
|
void DisplayToolMsg( const wxString& msg ); |
|
|
|
void Process_Zoom( wxCommandEvent& event ); |
|
|
|
void Process_Grid( wxCommandEvent& event ); |
|
|
|
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0; |
|
|
|
virtual void Process_Special_Functions( wxCommandEvent& event ) = 0; |
|
|
|
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; |
|
|
|
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); |
|
|
|
virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; |
|
|
|
virtual void ToolOnRightClick( wxCommandEvent& event ); |
|
|
|
void AdjustScrollBars(); |
|
|
|
virtual void UpdateStatusBar(); /* Affichage des coord curseur, zoom .. */ |
|
|
|
void DisplayUnitsMsg(); |
|
|
|
|
|
|
|
/* Handlers for block commands */ |
|
|
|
virtual int ReturnBlockCommand( int key ); |
|
|
|
virtual void InitBlockPasteInfos(); |
|
|
|
virtual bool HandleBlockBegin( wxDC* DC, int cmd_type, const wxPoint& startpos ); |
|
|
|
virtual void HandleBlockPlace( wxDC* DC ); |
|
|
|
virtual int HandleBlockEnd( wxDC* DC ); |
|
|
|
virtual int ReturnBlockCommand( int key ); |
|
|
|
virtual void InitBlockPasteInfos(); |
|
|
|
virtual bool HandleBlockBegin( wxDC* DC, int cmd_type, const wxPoint& startpos ); |
|
|
|
virtual void HandleBlockPlace( wxDC* DC ); |
|
|
|
virtual int HandleBlockEnd( wxDC* DC ); |
|
|
|
|
|
|
|
void CopyToClipboard( wxCommandEvent& event ); |
|
|
|
void CopyToClipboard( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/* interprocess communication */ |
|
|
|
void OnSockRequest( wxSocketEvent& evt ); |
|
|
|
void OnSockRequestServer( wxSocketEvent& evt ); |
|
|
|
void OnSockRequest( wxSocketEvent& evt ); |
|
|
|
void OnSockRequestServer( wxSocketEvent& evt ); |
|
|
|
|
|
|
|
virtual void LoadSettings(); |
|
|
|
virtual void SaveSettings(); |
|
|
|
virtual void LoadSettings(); |
|
|
|
virtual void SaveSettings(); |
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE(); |
|
|
|
}; |
|
|
|
@ -296,8 +296,8 @@ public: |
|
|
|
/****************************************************/ |
|
|
|
|
|
|
|
/********************************************************* |
|
|
|
class WinEDA_MsgPanel : this is a panel to display various infos |
|
|
|
and messages on items in eeschema an pcbnew |
|
|
|
* class WinEDA_MsgPanel : this is a panel to display various infos |
|
|
|
* and messages on items in eeschema an pcbnew |
|
|
|
*********************************************************/ |
|
|
|
|
|
|
|
/** |
|
|
|
@ -307,12 +307,12 @@ and messages on items in eeschema an pcbnew |
|
|
|
*/ |
|
|
|
struct MsgItem |
|
|
|
{ |
|
|
|
int m_X; |
|
|
|
int m_UpperY; |
|
|
|
int m_LowerY; |
|
|
|
wxString m_UpperText; |
|
|
|
wxString m_LowerText; |
|
|
|
int m_Color; |
|
|
|
int m_X; |
|
|
|
int m_UpperY; |
|
|
|
int m_LowerY; |
|
|
|
wxString m_UpperText; |
|
|
|
wxString m_LowerText; |
|
|
|
int m_Color; |
|
|
|
|
|
|
|
/** |
|
|
|
* Function operator= |
|
|
|
@ -322,13 +322,14 @@ struct MsgItem |
|
|
|
*/ |
|
|
|
MsgItem& operator=( const MsgItem& rv ) |
|
|
|
{ |
|
|
|
m_X = rv.m_X; |
|
|
|
m_X = rv.m_X; |
|
|
|
m_UpperY = rv.m_UpperY; |
|
|
|
m_LowerY = rv.m_LowerY; |
|
|
|
m_UpperText = rv.m_UpperText; // overloaded operator=() |
|
|
|
m_LowerText = rv.m_LowerText; // overloaded operator=() |
|
|
|
m_Color = rv.m_Color; |
|
|
|
return *this; |
|
|
|
|
|
|
|
return * this; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@ -336,13 +337,13 @@ struct MsgItem |
|
|
|
class WinEDA_MsgPanel : public wxPanel |
|
|
|
{ |
|
|
|
protected: |
|
|
|
std::vector<MsgItem> m_Items; |
|
|
|
int m_last_x; ///< the last used x coordinate |
|
|
|
std::vector<MsgItem> m_Items; |
|
|
|
int m_last_x; ///< the last used x coordinate |
|
|
|
|
|
|
|
|
|
|
|
void showItem( wxDC& dc, const MsgItem& aItem ); |
|
|
|
void showItem( wxDC& dc, const MsgItem& aItem ); |
|
|
|
|
|
|
|
void erase( wxDC* DC ); |
|
|
|
void erase( wxDC* DC ); |
|
|
|
|
|
|
|
public: |
|
|
|
WinEDA_DrawFrame* m_Parent; |
|
|
|
@ -354,10 +355,10 @@ public: |
|
|
|
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size ); |
|
|
|
~WinEDA_MsgPanel(); |
|
|
|
|
|
|
|
void OnPaint( wxPaintEvent& event ); |
|
|
|
void EraseMsgBox(); |
|
|
|
void Affiche_1_Parametre( int pos_X, const wxString& texte_H, |
|
|
|
const wxString& texte_L, int color ); |
|
|
|
void OnPaint( wxPaintEvent& event ); |
|
|
|
void EraseMsgBox(); |
|
|
|
void Affiche_1_Parametre( int pos_X, const wxString& texte_H, |
|
|
|
const wxString& texte_L, int color ); |
|
|
|
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE() |
|
|
|
@ -389,10 +390,10 @@ public: |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
wxString GetValue(); |
|
|
|
void GetValue( char* buffer, int lenmax ); |
|
|
|
void SetValue( const wxString& new_text ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
wxString GetValue(); |
|
|
|
void GetValue( char* buffer, int lenmax ); |
|
|
|
void SetValue( const wxString& new_text ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
|
|
|
|
void SetFocus() { m_FrameText->SetFocus(); } |
|
|
|
void SetInsertionPoint( int n ) { m_FrameText->SetInsertionPoint( n ); } |
|
|
|
@ -425,14 +426,14 @@ public: |
|
|
|
|
|
|
|
~WinEDA_GraphicTextCtrl(); |
|
|
|
|
|
|
|
wxString GetText(); |
|
|
|
int GetTextSize(); |
|
|
|
void Enable( bool state ); |
|
|
|
void SetTitle( const wxString& title ); |
|
|
|
wxString GetText(); |
|
|
|
int GetTextSize(); |
|
|
|
void Enable( bool state ); |
|
|
|
void SetTitle( const wxString& title ); |
|
|
|
|
|
|
|
void SetFocus() { m_FrameText->SetFocus(); } |
|
|
|
void SetValue( const wxString& value ); |
|
|
|
void SetValue( int value ); |
|
|
|
void SetValue( const wxString& value ); |
|
|
|
void SetValue( int value ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function FormatSize |
|
|
|
@ -440,7 +441,7 @@ public: |
|
|
|
*/ |
|
|
|
static wxString FormatSize( int internalUnit, int units, int textSize ); |
|
|
|
|
|
|
|
static int ParseSize( const wxString& sizeText, int internalUnit, int units ); |
|
|
|
static int ParseSize( const wxString& sizeText, int internalUnit, int units ); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -474,9 +475,9 @@ public: |
|
|
|
}; |
|
|
|
|
|
|
|
/************************************************************* |
|
|
|
Class to edit/enter a size (pair of values for X and Y size) |
|
|
|
( INCHES or MM ) in dialog boxes |
|
|
|
***************************************************************/ |
|
|
|
* Class to edit/enter a size (pair of values for X and Y size) |
|
|
|
* ( INCHES or MM ) in dialog boxes |
|
|
|
***************************************************************/ |
|
|
|
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl |
|
|
|
{ |
|
|
|
public: |
|
|
|
@ -519,9 +520,9 @@ public: |
|
|
|
|
|
|
|
~WinEDA_ValueCtrl(); |
|
|
|
|
|
|
|
int GetValue(); |
|
|
|
void SetValue( int new_value ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
int GetValue(); |
|
|
|
void SetValue( int new_value ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
|
|
|
|
void SetToolTip( const wxString& text ) |
|
|
|
{ |
|
|
|
@ -548,9 +549,9 @@ public: |
|
|
|
|
|
|
|
~WinEDA_DFloatValueCtrl(); |
|
|
|
|
|
|
|
double GetValue(); |
|
|
|
void SetValue( double new_value ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
double GetValue(); |
|
|
|
void SetValue( double new_value ); |
|
|
|
void Enable( bool enbl ); |
|
|
|
|
|
|
|
void SetToolTip( const wxString& text ) |
|
|
|
{ |
|
|
|
@ -592,7 +593,7 @@ public: |
|
|
|
const wxChar** m_ItemList; |
|
|
|
|
|
|
|
private: |
|
|
|
void (*m_MoveFct)( wxString & Text ); |
|
|
|
void (*m_MoveFct)( wxString& Text ); |
|
|
|
|
|
|
|
public: |
|
|
|
WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title, |
|
|
|
@ -603,19 +604,19 @@ public: |
|
|
|
wxPoint dialog_position = wxDefaultPosition ); |
|
|
|
~WinEDAListBox(); |
|
|
|
|
|
|
|
void SortList(); |
|
|
|
void Append( const wxString& item ); |
|
|
|
void InsertItems( const wxArrayString& itemlist, int position = 0 ); |
|
|
|
void MoveMouseToOrigin(); |
|
|
|
wxString GetTextSelection(); |
|
|
|
void SortList(); |
|
|
|
void Append( const wxString& item ); |
|
|
|
void InsertItems( const wxArrayString& itemlist, int position = 0 ); |
|
|
|
void MoveMouseToOrigin(); |
|
|
|
wxString GetTextSelection(); |
|
|
|
|
|
|
|
private: |
|
|
|
void OnClose( wxCloseEvent& event ); |
|
|
|
void OnCancelClick( wxCommandEvent& event ); |
|
|
|
void OnOkClick( wxCommandEvent& event ); |
|
|
|
void ClickOnList( wxCommandEvent& event ); |
|
|
|
void D_ClickOnList( wxCommandEvent& event ); |
|
|
|
void OnKeyEvent( wxKeyEvent& event ); |
|
|
|
void OnClose( wxCloseEvent& event ); |
|
|
|
void OnCancelClick( wxCommandEvent& event ); |
|
|
|
void OnOkClick( wxCommandEvent& event ); |
|
|
|
void ClickOnList( wxCommandEvent& event ); |
|
|
|
void D_ClickOnList( wxCommandEvent& event ); |
|
|
|
void OnKeyEvent( wxKeyEvent& event ); |
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE() |
|
|
|
}; |
|
|
|
|