Commit fa9230e2 authored by jerryjacobs's avatar jerryjacobs

Changed 3D module author after mail contact. Cleanup of function...

Changed 3D module author after mail contact. Cleanup of function implementions. WinEDA_TextFrame color change (text black, background, white)
parent 8a5da43c
......@@ -41,4 +41,4 @@ Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
== Programm credits for icons and others
Icons by Iigo Zuluagaz <inigo_zuluaga@yahoo.es>
3D modules by Renie Marquet <reniemarquet@uol.com.br>
3D modules by Cyril Frausti <cyril.frausti@gmail.com>
3D modules by Christophe Boschat <nox454@hotmail.fr>
......@@ -140,5 +140,5 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
/* Add programm credits for icons */
info.AddArtist( wxT( "Icons by Iñigo Zuluagaz <inigo_zuluaga@yahoo.es>" ) );
info.AddArtist( SetMsg( wxT( "3D modules by Renie Marquet <reniemarquet@uol.com.br>" ) ) );
info.AddArtist( SetMsg( wxT( "3D modules by Cyril Frausti <cyril.frausti@gmail.com>" ) ) );
info.AddArtist( SetMsg( wxT( "3D modules by Christophe Boschat <nox454@hotmail.fr>" ) ) );
}
......@@ -53,7 +53,8 @@ BASE_SCREEN::~BASE_SCREEN()
/*******************************/
void BASE_SCREEN::InitDatas()
void
BASE_SCREEN::InitDatas()
/*******************************/
{
if( m_Center )
......@@ -79,19 +80,23 @@ void BASE_SCREEN::InitDatas()
m_FlagSave = 1; // Used in auto save: set when an auto save is made
}
/*
/**
* Get screen units scalar.
*
* Default implimentation returns scalar used for schematic screen. The
* internal units used by the schematic screen is 1 mil (0.001"). Override
* this in derived classes that require internal units other than 1 mil.
*/
int BASE_SCREEN::GetInternalUnits( void )
int
BASE_SCREEN::GetInternalUnits( void )
{
return EESCHEMA_INTERNAL_UNIT;
}
wxSize BASE_SCREEN::ReturnPageSize( void )
/************************************/
wxSize
BASE_SCREEN::ReturnPageSize( void )
/************************************/
{
int internal_units = GetInternalUnits();
......@@ -99,13 +104,16 @@ wxSize BASE_SCREEN::ReturnPageSize( void )
( m_CurrentSheetDesc->m_Size.y * internal_units ) / 1000 );
}
/******************************************************************/
wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
/******************************************************************/
/** Function CursorRealPosition
/**
* Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position co convert
*/
/******************************************************************/
wxPoint
BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
/******************************************************************/
{
wxPoint curpos = ScreenPos;
Unscale( curpos );
......
/******************************************************************/
/* basicframe.cpp - fonctions des classes du type WinEDA_BasicFrame */
/******************************************************************/
/**
* WinEDA_BasicFrame Class Functions
* @file basicframe.cpp
*/
#ifdef __GNUG__
#pragma implementation
# pragma implementation
#endif
/* wxWidgets about dialog */
#include <wx/aboutdlg.h>
#include <wx/fontdlg.h>
#include "wx/statline.h"
#include "wx/generic/aboutdlgg.h"
#include <wx/fontdlg.h>
#include "fctsys.h"
#include "appl_wxstruct.h"
......@@ -22,15 +23,18 @@
#include "wxstruct.h"
/*******************************************************/
/* Constructeur de WinEDA_BasicFrame: la fenetre generale */
/*******************************************************/
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, int idtype,
/*
* Class constructor for WinEDA_BasicFrame general options
*/
/**********************************************************/
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
int idtype,
const wxString& title,
const wxPoint& pos, const wxSize& size,
const wxPoint& pos,
const wxSize& size,
long style ) :
wxFrame( father, -1, title, pos, size, style )
/**********************************************************/
{
wxSize minsize;
......@@ -56,6 +60,9 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, int idtype,
}
/*
*
*/
/******************************************/
WinEDA_BasicFrame::~WinEDA_BasicFrame()
/******************************************/
......@@ -66,18 +73,22 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame()
}
/********************************************/
void WinEDA_BasicFrame::ReCreateMenuBar()
/********************************************/
// Virtual function
/*
* Virtual function
*/
/***********************************/
void
WinEDA_BasicFrame::ReCreateMenuBar()
/***********************************/
{
}
/*********************************************/
void WinEDA_BasicFrame::GetSettings()
/*********************************************/
/*******************************/
void
WinEDA_BasicFrame::GetSettings()
/*******************************/
{
wxString text;
int Ypos_min;
......@@ -110,9 +121,10 @@ void WinEDA_BasicFrame::GetSettings()
}
/*****************************************/
void WinEDA_BasicFrame::SaveSettings()
/*****************************************/
/********************************/
void
WinEDA_BasicFrame::SaveSettings()
/********************************/
{
wxString text;
wxConfig* config;
......@@ -137,19 +149,22 @@ void WinEDA_BasicFrame::SaveSettings()
/******************************************************/
void WinEDA_BasicFrame::PrintMsg( const wxString& text )
void
WinEDA_BasicFrame::PrintMsg( const wxString& text )
/******************************************************/
{
SetStatusText( text );
}
/*
* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/
/*************************************************************************/
void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
void
WinEDA_BasicFrame::DisplayActivity( int PerCent,
const wxString& Text )
/*************************************************************************/
/* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/
{
wxString Line;
......@@ -165,23 +180,26 @@ void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
}
/*
* Met a jour la liste des anciens projets
*/
/*******************************************************************/
void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
void
WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*******************************************************************/
/* Met a jour la liste des anciens projets
*/
{
wxGetApp().m_fileHistory.AddFileToHistory( FullFileName );
ReCreateMenuBar();
}
/**
/*
* Fetch the file name from the file history list.
*/
/*********************************************************************/
wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId,
const wxString& type )
/*********************************************************************/
{
wxString fn, msg;
size_t i;
......@@ -209,12 +227,18 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId,
}
/*
*
*/
/**************************************************************/
void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
void
WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
/**************************************************************/
{
wxString msg;
#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML
if( wxGetApp().m_HtmlCtrl == NULL )
{
wxGetApp().InitOnLineHelp();
......@@ -231,6 +255,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
msg.Printf( _( "Help file %s not found" ), wxGetApp().m_HelpFileName.GetData() );
DisplayError( this, msg );
}
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
// wxString fullfilename = FindKicadHelpPath() + wxGetApp().m_HelpFileName;
// if ( wxFileExists(fullfilename) )
......@@ -252,12 +277,17 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
GetAssociatedDocument( this, wxEmptyString, helpFile );
#else
#error Help files format not defined
# error Help files format not defined
#endif
}
/*
*
*/
/***********************************************************************/
void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
void
WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
/***********************************************************************/
{
wxAboutDialogInfo info;
......@@ -266,8 +296,12 @@ void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
}
/*
*
*/
/********************************************************************/
void WinEDA_BasicFrame::ProcessFontPreferences( int id )
void
WinEDA_BasicFrame::ProcessFontPreferences( int id )
/********************************************************************/
{
wxFont font;
......@@ -308,3 +342,4 @@ void WinEDA_BasicFrame::ProcessFontPreferences( int id )
break;
}
}
This diff is collapsed.
/*************************************************/
/* drawtxt.cpp : Function to draw and plot texts */
/*************************************************/
/**
* Functions to draw and plot text on screen
* @file drawtxt.cpp
*/
#include "fctsys.h"
#include "gr_basic.h"
......@@ -14,24 +14,12 @@
#include "class_base_screen.h"
#ifndef DEFAULT_SIZE_TEXT
#define DEFAULT_SIZE_TEXT 50
# define DEFAULT_SIZE_TEXT 50
#endif
#define EDA_DRAWBASE
#include "grfonte.h"
/* fonctions locales : */
/****************************************************************************************************/
void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
const wxPoint& aPos, EDA_Colors aColor, const wxString& aText,
int aOrient, const wxSize& aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth, bool aItalic,
void (* aCallback) (int x0, int y0, int xf, int yf))
/****************************************************************************************************/
/** Function DrawGraphicText
* Draw a graphic text (like module texts)
......@@ -50,6 +38,20 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
/****************************************************************************************************/
void DrawGraphicText( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aPos,
EDA_Colors aColor,
const wxString& aText,
int aOrient,
const wxSize& aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic,
void (* aCallback) (int x0, int y0, int xf, int yf))
/****************************************************************************************************/
{
int ii, kk, char_count, AsciiCode, endcar;
int x0, y0;
......@@ -313,8 +315,18 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
/* functions used to plot texts, using DrawGraphicText() with a call back function */
static void (*MovePenFct)( wxPoint pos, int state ); // a pointer to actual plot function (HPGL, PS, ..)
static bool s_Plotbegin; // Flag to init plot
/* The call back function */
static void s_Callback_plot(int x0, int y0, int xf, int yf)
/*
* The call back function
*/
/**********************/
static void
s_Callback_plot(int x0,
int y0,
int xf,
int yf)
/**********************/
{
static wxPoint PenLastPos;
wxPoint pstart;
......@@ -347,15 +359,6 @@ static void s_Callback_plot(int x0, int y0, int xf, int yf)
}
/******************************************************************************************/
void PlotGraphicText( int aFormat_plot, const wxPoint& aPos, enum EDA_Colors aColor,
const wxString& aText,
int aOrient, const wxSize& aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth, bool aItalic )
/******************************************************************************************/
/** Function PlotGraphicText
* same as DrawGraphicText, but plot graphic text insteed of draw it
* @param aFormat_plot = plot format (PLOT_FORMAT_POST, PLOT_FORMAT_HPGL, PLOT_FORMAT_GERBER)
......@@ -370,6 +373,18 @@ void PlotGraphicText( int aFormat_plot, const wxPoint& aPos, enum EDA_Colors aCo
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
*/
/******************************************************************************************/
void PlotGraphicText( int aFormat_plot,
const wxPoint& aPos,
enum EDA_Colors aColor,
const wxString& aText,
int aOrient,
const wxSize& aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic )
/******************************************************************************************/
{
// Initialise the actual function used to plot lines:
switch( aFormat_plot )
......@@ -403,3 +418,4 @@ void PlotGraphicText( int aFormat_plot, const wxPoint& aPos, enum EDA_Colors aCo
/* end text : pen UP ,no move */
MovePenFct( wxPoint( 0, 0 ), 'Z' );
}
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