Commit 1794a2ae authored by jean-pierre charras's avatar jean-pierre charras

Updated boost to version 1.34. Added boost::polygon (experimental).

Fixed some issues with wxWidgets 2.9.1 (fixed Gerbview and Pcbnew crashes under Linux when starting. Could explain also crashes under MACOSX)
Code cleaning.
pcbnew:
    Added experimental zone fill calculations with boost::polygon
    old file zones_convert_brd_items_to_polygons.cpp has now 2 versions:
    zones_convert_brd_items_to_polygons_with_Boost.cpp use boost::polygon to calculate filled areas
    zones_convert_brd_items_to_polygons_with_BKbool.cpp use kbool (code cleaned).
    >>> to use boost polygon version:
        call cmake with option: -DUSE_BOOST_POLYGON_LIBRARY=ON
Eeschema: added patches from Yuri Khalyavin
parents 5ae97bb3 60c1cbe8

Too many changes to show.

To preserve performance only 1200 of 1200+ files are displayed.

...@@ -4,6 +4,20 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,20 @@ KiCad ChangeLog 2010
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.
2010-jul-27, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++all:
Updated boost to version 1.34
Added boost::polygon (experimental)
++pcbnew:
Added experimental zone fill calculations with boost::polygon
old file zones_convert_brd_items_to_polygons.cpp has now 2 versions:
zones_convert_brd_items_to_polygons_with_Boost.cpp use boost::polygon to calculate filled areas
zones_convert_brd_items_to_polygons_with_BKbool.cpp use kbool (code cleaned).
>>> to use boost polygon version:
call cmake with option: -DUSE_BOOST_POLYGON_LIBRARY=ON
2010-jul-12, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2010-jul-12, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++pcbnew: ++pcbnew:
......
...@@ -24,6 +24,8 @@ option(USE_WX_ZOOM "Use wxDC to perform zooming (default OFF). Warning, this is ...@@ -24,6 +24,8 @@ option(USE_WX_ZOOM "Use wxDC to perform zooming (default OFF). Warning, this is
option(USE_WX_GRAPHICS_CONTEXT option(USE_WX_GRAPHICS_CONTEXT
"Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental") "Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental")
option(USE_BOOST_POLYGON_LIBRARY
"Use boost polygon library instead of Kbool to calculate filled areas in zones (default OFF). Warning, this is experimental")
#================================================ #================================================
# Set flags for GCC. # Set flags for GCC.
...@@ -58,6 +60,11 @@ if(USE_WX_GRAPHICS_CONTEXT) ...@@ -58,6 +60,11 @@ if(USE_WX_GRAPHICS_CONTEXT)
add_definitions(-DUSE_WX_GRAPHICS_CONTEXT) add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
endif(USE_WX_GRAPHICS_CONTEXT) endif(USE_WX_GRAPHICS_CONTEXT)
if(USE_BOOST_POLYGON_LIBRARY)
set( USE_BOOST_POLYGON_LIBRARY ON )
add_definitions(-DUSE_BOOST_POLYGON_LIBRARY)
endif(USE_WX_GRAPHICS_CONTEXT)
# Locations for install targets. # Locations for install targets.
set(KICAD_BIN bin set(KICAD_BIN bin
CACHE PATH "Location of KiCad binaries.") CACHE PATH "Location of KiCad binaries.")
......
...@@ -88,12 +88,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS ...@@ -88,12 +88,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
brightSizer->Add( m_buttonLoad, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); brightSizer->Add( m_buttonLoad, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonExportEeschema = new wxButton( this, wxID_ANY, _("Export to eeschema"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonExportEeschema = new wxButton( this, wxID_ANY, _("Export to eeschema"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonExportEeschema->SetToolTip( _("Create a lib file for Eeschema") ); m_buttonExportEeschema->SetToolTip( _("Create a library file for Eeschema\nThis library contains only one component: logo") );
brightSizer->Add( m_buttonExportEeschema, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); brightSizer->Add( m_buttonExportEeschema, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonExportPcbnew = new wxButton( this, wxID_ANY, _("Export to Pcbnew"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonExportPcbnew = new wxButton( this, wxID_ANY, _("Export to Pcbnew"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonExportPcbnew->SetToolTip( _("Create a footprint file for PcbNew") ); m_buttonExportPcbnew->SetToolTip( _("Create a footprint file for PcbNew\nThis footprint contains only one footprint: logo") );
brightSizer->Add( m_buttonExportPcbnew, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 ); brightSizer->Add( m_buttonExportPcbnew, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
...@@ -108,6 +108,8 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS ...@@ -108,6 +108,8 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP ); m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greysvale picture to the binary picture.") );
brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 );
......
...@@ -851,7 +851,7 @@ ...@@ -851,7 +851,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Create a lib file for Eeschema</property> <property name="tooltip">Create a library file for Eeschema&#x0A;This library contains only one component: logo</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -903,7 +903,7 @@ ...@@ -903,7 +903,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Create a footprint file for PcbNew</property> <property name="tooltip">Create a footprint file for PcbNew&#x0A;This footprint contains only one footprint: logo</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1060,7 +1060,7 @@ ...@@ -1060,7 +1060,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP</property> <property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Adjust the level to convert the greysvale picture to the binary picture.</property>
<property name="value">25</property> <property name="value">25</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
......
...@@ -364,28 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv ) ...@@ -364,28 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
} }
/* /** Function SetToolID
* Enables the icon of the selected tool in the vertical toolbar. * Enables the icon of the selected tool in the vertical toolbar.
* (Or tool ID_NO_SELECT_BUTT default if no new selection) * (Or tool ID_NO_SELECT_BUTT default if no new selection)
* if (id >= 0) * @param aId = new m_ID_current_state value (if aId >= 0)
* @param aCursor = the new cursor shape (0 = default cursor)
* @param aTitle = tool message in status bar
* if (aId >= 0)
* Updates all variables related: * Updates all variables related:
* Message m_ID_current_state, cursor * m_ID_current_state, cursor shape and message in status bar
* If (id < 0) * If (aId < 0)
* Only updates the variables message and cursor * Only updates the cursor shape and message in status bar
* (does not the current m_ID_current_state value
*/ */
void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, void WinEDA_DrawFrame::SetToolID( int aId, int aCursor,
const wxString& title ) const wxString& aToolMsg )
{ {
// Change Cursor // Keep default cursor in toolbars
SetCursor( wxNullCursor );
// Change Cursor in DrawPanel only
if( DrawPanel ) if( DrawPanel )
{ {
DrawPanel->m_PanelDefaultCursor = new_cursor_id; DrawPanel->m_PanelDefaultCursor = aCursor;
DrawPanel->SetCursor( new_cursor_id ); DrawPanel->SetCursor( aCursor );
} }
SetCursor( wxCURSOR_ARROW ); DisplayToolMsg( aToolMsg );
DisplayToolMsg( title );
if( id < 0 ) if( aId < 0 )
return; return;
// Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool. // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool.
...@@ -399,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, ...@@ -399,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
} }
else else
{ {
if( id ) if( aId )
{ {
if( m_VToolBar ) if( m_VToolBar )
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE ); m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
...@@ -411,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, ...@@ -411,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
} }
if( id ) if( aId )
{ {
if( m_VToolBar ) if( m_VToolBar )
m_VToolBar->ToggleTool( id, TRUE ); m_VToolBar->ToggleTool( aId, TRUE );
if( m_AuxVToolBar ) if( m_AuxVToolBar )
m_AuxVToolBar->ToggleTool( id, TRUE ); m_AuxVToolBar->ToggleTool( aId, TRUE );
} }
else if( m_VToolBar ) else if( m_VToolBar )
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE ); m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
m_ID_current_state = id; m_ID_current_state = aId;
if( m_VToolBar ) if( m_VToolBar )
m_VToolBar->Refresh( ); m_VToolBar->Refresh( );
} }
......
...@@ -164,7 +164,7 @@ void WinEDA_SelColorFrame::Init_Dialog( int aOldColor ) ...@@ -164,7 +164,7 @@ void WinEDA_SelColorFrame::Init_Dialog( int aOldColor )
iconDC.DrawRoundedRectangle( 0, 0, w, h, (double) h / 3 ); iconDC.DrawRoundedRectangle( 0, 0, w, h, (double) h / 3 );
BitmapButton = new wxBitmapButton( this, butt_ID, ButtBitmap, BitmapButton = new wxBitmapButton( this, butt_ID, ButtBitmap,
wxDefaultPosition, wxSize( w, h ) ); wxDefaultPosition, wxSize( w+8, h+6 ) );
FlexColumnBoxSizer->Add( BitmapButton, 0, FlexColumnBoxSizer->Add( BitmapButton, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL |
wxLEFT | wxBOTTOM, 5 ); wxLEFT | wxBOTTOM, 5 );
......
update=05/07/2010 19:03:21 update=22/07/2010 13:46:39
version=1 version=1
last_client=pcbnew last_client=pcbnew
[common] [common]
......
...@@ -199,7 +199,7 @@ void WinEDA_SetColorsFrame::CreateControls() ...@@ -199,7 +199,7 @@ void WinEDA_SetColorsFrame::CreateControls()
BitmapButton = BitmapButton =
new wxBitmapButton( this, butt_ID, ButtBitmap, wxDefaultPosition, new wxBitmapButton( this, butt_ID, ButtBitmap, wxDefaultPosition,
wxSize( BUTT_SIZE_X, BUTT_SIZE_Y ) ); wxSize( BUTT_SIZE_X+8, BUTT_SIZE_Y+6 ) );
RowBoxSizer->Add( BitmapButton, RowBoxSizer->Add( BitmapButton,
0, 0,
wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM,
......
...@@ -38,8 +38,8 @@ enum col_sel_id { ...@@ -38,8 +38,8 @@ enum col_sel_id {
#endif #endif
// Specify the width and height of every (color-displaying / bitmap) button // Specify the width and height of every (color-displaying / bitmap) button
const int BUTT_SIZE_X = 30; const int BUTT_SIZE_X = 16;
const int BUTT_SIZE_Y = 20; const int BUTT_SIZE_Y = 16;
// Macro utile : // Macro utile :
#define ADR( numlayer ) & (g_LayerDescr.LayerColor[numlayer]) #define ADR( numlayer ) & (g_LayerDescr.LayerColor[numlayer])
......
...@@ -106,6 +106,8 @@ static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' ); ...@@ -106,6 +106,8 @@ static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' );
static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' ); static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' );
static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ), static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ),
HK_ADD_NEW_COMPONENT, 'A' ); HK_ADD_NEW_COMPONENT, 'A' );
static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ),
HK_ADD_NOCONN_FLAG, 'Q' );
static Ki_HotkeyInfo HkMirrorYComponent( wxT( "Mirror Y Component" ), static Ki_HotkeyInfo HkMirrorYComponent( wxT( "Mirror Y Component" ),
HK_MIRROR_Y_COMPONENT, 'Y' ); HK_MIRROR_Y_COMPONENT, 'Y' );
static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ), static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ),
...@@ -146,11 +148,11 @@ static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find next DRC marker" ), HK_FIND ...@@ -146,11 +148,11 @@ static Ki_HotkeyInfo HkFindNextDrcMarker( wxT( "Find next DRC marker" ), HK_FIND
WXK_F5 + GR_KB_SHIFT ); WXK_F5 + GR_KB_SHIFT );
// Special keys for library editor: // Special keys for library editor:
static Ki_HotkeyInfo HkCreatePin( wxT( "Create Pin" ),
HK_LIBEDIT_CREATE_PIN, 'P' );
static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST, static Ki_HotkeyInfo HkInsertPin( wxT( "Repeat Pin" ), HK_REPEAT_LAST,
WXK_INSERT ); WXK_INSERT );
static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' ); static Ki_HotkeyInfo HkMovePin( wxT( "Move Pin" ), HK_LIBEDIT_MOVE_GRAPHIC_ITEM, 'M' );
static Ki_HotkeyInfo HkDeletePin( wxT( "Delete Pin" ), HK_DELETE_PIN,
WXK_DELETE );
// List of common hotkey descriptors // List of common hotkey descriptors
...@@ -190,16 +192,18 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] = ...@@ -190,16 +192,18 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
&HkEditComponentFootprint, &HkEditComponentFootprint,
&HkBeginWire, &HkBeginWire,
&HkAddLabel, &HkAddLabel,
&HkAddNoConn,
NULL NULL
}; };
// List of hotkey descriptors for library editor // List of hotkey descriptors for library editor
Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] = Ki_HotkeyInfo* s_LibEdit_Hotkey_List[] =
{ {
&HkCreatePin,
&HkInsertPin, &HkInsertPin,
&HkEdit, &HkEdit,
&HkMovePin, &HkMovePin,
&HkDeletePin, &HkDelete,
&HkRotate, &HkRotate,
&HkDrag, &HkDrag,
NULL NULL
...@@ -332,7 +336,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -332,7 +336,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK ) if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK )
{ {
RefreshToolBar = LocateAndDeleteItem( this, DC ); RefreshToolBar = LocateAndDeleteItem( this, DC );
OnModify( ); OnModify();
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
TestDanglingEnds( GetScreen()->EEDrawList, DC ); TestDanglingEnds( GetScreen()->EEDrawList, DC );
} }
...@@ -396,6 +400,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -396,6 +400,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break; break;
case HK_BEGIN_WIRE: case HK_BEGIN_WIRE:
/* An item is selected. If edited and not a wire, a new command is not /* An item is selected. If edited and not a wire, a new command is not
* possible */ * possible */
if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK ) if( !ItemInEdit && screen->m_BlockLocate.m_State == STATE_NO_BLOCK )
...@@ -419,6 +424,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -419,6 +424,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
} }
break; break;
case HK_ADD_NOCONN_FLAG: // Add a no connected flag
if( !ItemInEdit )
{
if( m_ID_current_state != ID_NOCONN_BUTT )
SetToolID( ID_NOCONN_BUTT, wxCURSOR_PENCIL,
_( "Add a no connected flag" ) );
OnLeftClick( DC, MousePos );
}
break;
case HK_ROTATE: // Component or other schematic item rotation case HK_ROTATE: // Component or other schematic item rotation
if( DrawStruct == NULL ) if( DrawStruct == NULL )
...@@ -831,8 +846,16 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -831,8 +846,16 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
} }
break; break;
case HK_LIBEDIT_CREATE_PIN:
{
wxCommandEvent evt;
evt.SetId( ID_LIBEDIT_PIN_BUTT );
Process_Special_Functions( evt );
break;
}
case HK_DELETE_PIN: case HK_DELETE:
m_drawItem = LocateItemUsingCursor(); m_drawItem = LocateItemUsingCursor();
if( m_drawItem ) if( m_drawItem )
......
...@@ -15,11 +15,10 @@ enum hotkey_id_commnand { ...@@ -15,11 +15,10 @@ enum hotkey_id_commnand {
HK_FIND_ITEM, HK_FIND_ITEM,
HK_DELETE, HK_DELETE,
HK_REPEAT_LAST, HK_REPEAT_LAST,
HK_EDIT_PIN,
HK_LIBEDIT_MOVE_GRAPHIC_ITEM, HK_LIBEDIT_MOVE_GRAPHIC_ITEM,
HK_LIBEDIT_ROTATE_PIN,
HK_DELETE_PIN,
HK_MOVEBLOCK_TO_DRAGBLOCK, HK_MOVEBLOCK_TO_DRAGBLOCK,
HK_LIBEDIT_CREATE_PIN,
HK_DELETE_PIN,
HK_ROTATE, HK_ROTATE,
HK_EDIT, HK_EDIT,
HK_EDIT_COMPONENT_VALUE, HK_EDIT_COMPONENT_VALUE,
...@@ -32,15 +31,19 @@ enum hotkey_id_commnand { ...@@ -32,15 +31,19 @@ enum hotkey_id_commnand {
HK_DRAG, HK_DRAG,
HK_ADD_NEW_COMPONENT, HK_ADD_NEW_COMPONENT,
HK_BEGIN_WIRE, HK_BEGIN_WIRE,
HK_ADD_LABEL HK_ADD_LABEL,
HK_ADD_NOCONN_FLAG
}; };
// List of hotkey descriptors for eeschema // List of hotkey descriptors for eeschema
extern struct Ki_HotkeyInfoSectionDescriptor s_Eeschema_Hokeys_Descr[]; extern struct Ki_HotkeyInfoSectionDescriptor s_Eeschema_Hokeys_Descr[];
// List of hotkey descriptors for the schematic editor only // List of hotkey descriptors for the schematic editor only
extern struct Ki_HotkeyInfoSectionDescriptor s_Schematic_Hokeys_Descr[]; extern struct Ki_HotkeyInfoSectionDescriptor s_Schematic_Hokeys_Descr[];
// List of hotkey descriptors for the lib editor only // List of hotkey descriptors for the lib editor only
extern struct Ki_HotkeyInfoSectionDescriptor s_Libedit_Hokeys_Descr[]; extern struct Ki_HotkeyInfoSectionDescriptor s_Libedit_Hokeys_Descr[];
// List of hotkey descriptors for the lib browser only // List of hotkey descriptors for the lib browser only
extern struct Ki_HotkeyInfoSectionDescriptor s_Viewlib_Hokeys_Descr[]; extern struct Ki_HotkeyInfoSectionDescriptor s_Viewlib_Hokeys_Descr[];
......
...@@ -99,7 +99,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -99,7 +99,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( DrawEntry->m_Flags == 0 ) if( DrawEntry->m_Flags == 0 )
{ {
msg = AddHotkeyName( _( "Delete Arc " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Arc " ), s_Libedit_Hokeys_Descr,
HK_DELETE_PIN ); HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_arc_xpm ); msg, delete_arc_xpm );
} }
...@@ -130,7 +130,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -130,7 +130,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( DrawEntry->m_Flags == 0 ) if( DrawEntry->m_Flags == 0 )
{ {
msg = AddHotkeyName( _( "Delete Circle " ), msg = AddHotkeyName( _( "Delete Circle " ),
s_Libedit_Hokeys_Descr, HK_DELETE_PIN ); s_Libedit_Hokeys_Descr, HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_circle_xpm ); msg, delete_circle_xpm );
} }
...@@ -161,7 +161,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -161,7 +161,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( DrawEntry->m_Flags == 0 ) if( DrawEntry->m_Flags == 0 )
{ {
msg = AddHotkeyName( _( "Delete Rectangle " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Rectangle " ), s_Libedit_Hokeys_Descr,
HK_DELETE_PIN ); HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_rectangle_xpm ); msg, delete_rectangle_xpm );
} }
...@@ -190,7 +190,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -190,7 +190,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( DrawEntry->m_Flags == 0 ) if( DrawEntry->m_Flags == 0 )
{ {
msg = AddHotkeyName( _( "Delete Text " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Text " ), s_Libedit_Hokeys_Descr,
HK_DELETE_PIN ); HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_text_xpm ); msg, delete_text_xpm );
} }
...@@ -223,7 +223,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -223,7 +223,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( DrawEntry->m_Flags == 0 ) if( DrawEntry->m_Flags == 0 )
{ {
msg = AddHotkeyName( _( "Delete Line " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Line " ), s_Libedit_Hokeys_Descr,
HK_DELETE_PIN ); HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_segment_xpm ); msg, delete_segment_xpm );
} }
...@@ -232,7 +232,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos, ...@@ -232,7 +232,7 @@ bool WinEDA_LibeditFrame::OnRightClick( const wxPoint& MousePos,
if( ( (LIB_POLYLINE*) DrawEntry )->GetCornerCount() > 2 ) if( ( (LIB_POLYLINE*) DrawEntry )->GetCornerCount() > 2 )
{ {
msg = AddHotkeyName( _( "Delete Segment " ), msg = AddHotkeyName( _( "Delete Segment " ),
s_Libedit_Hokeys_Descr, HK_DELETE_PIN ); s_Libedit_Hokeys_Descr, HK_DELETE );
ADD_MENUITEM( PopMenu, ADD_MENUITEM( PopMenu,
ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT, ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT,
msg, delete_segment_xpm ); msg, delete_segment_xpm );
...@@ -296,7 +296,7 @@ void AddMenusForPin( wxMenu* PopMenu, ...@@ -296,7 +296,7 @@ void AddMenusForPin( wxMenu* PopMenu,
if( not_in_move ) if( not_in_move )
{ {
msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr, msg = AddHotkeyName( _( "Delete Pin " ), s_Libedit_Hokeys_Descr,
HK_DELETE_PIN ); HK_DELETE );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM, ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_DELETE_ITEM,
msg, delete_pin_xpm ); msg, delete_pin_xpm );
} }
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
void WinEDA_SchematicFrame::ReCreateMenuBar() void WinEDA_SchematicFrame::ReCreateMenuBar()
{ {
wxString text; wxString text;
wxMenuItem *item; wxMenuItem* item;
wxMenuBar *menuBar = GetMenuBar(); wxMenuBar* menuBar = GetMenuBar();
/** /**
* Destroy the existing menu bar so it can be rebuilt. This allows * Destroy the existing menu bar so it can be rebuilt. This allows
...@@ -60,7 +60,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -60,7 +60,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu,
-1, _( "Open &Recent" ), -1, _( "Open &Recent" ),
_("Open a recent opened schematic project" ), _( "Open a recent opened schematic project" ),
open_project_xpm ); open_project_xpm );
/* Separator */ /* Separator */
...@@ -134,7 +134,8 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -134,7 +134,8 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, choice_plot_fmt, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, choice_plot_fmt,
ID_GEN_PLOT, _( "&Plot" ), ID_GEN_PLOT, _( "&Plot" ),
_( "Plot schematic sheet in HPGL, PostScript or SVG format" ), _(
"Plot schematic sheet in HPGL, PostScript or SVG format" ),
plot_xpm ); plot_xpm );
/* Quit on all platforms except WXMAC */ /* Quit on all platforms except WXMAC */
...@@ -148,14 +149,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -148,14 +149,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
#endif /* !defined( __WXMAC__) */ #endif /* !defined( __WXMAC__) */
/** /**
* Edit menu * Edit menu
*/ */
wxMenu* editMenu = new wxMenu; wxMenu* editMenu = new wxMenu;
/* Undo */ /* Undo */
text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO); text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO );
item = new wxMenuItem( editMenu, wxID_UNDO, text, item = new wxMenuItem( editMenu, wxID_UNDO, text,
HELP_UNDO, wxITEM_NORMAL ); HELP_UNDO, wxITEM_NORMAL );
...@@ -163,7 +163,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -163,7 +163,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
editMenu->Append( item ); editMenu->Append( item );
/* Redo */ /* Redo */
text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO); text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO );
item = new wxMenuItem( editMenu, wxID_REDO, text, item = new wxMenuItem( editMenu, wxID_REDO, text,
HELP_REDO, wxITEM_NORMAL ); HELP_REDO, wxITEM_NORMAL );
...@@ -200,14 +200,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -200,14 +200,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
editMenu->Append( item ); editMenu->Append( item );
/** /**
* View menu * View menu
*/ */
wxMenu* viewMenu = new wxMenu; wxMenu* viewMenu = new wxMenu;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar: /* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT * we cannot add hotkey shortcut here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command: * events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom * zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center * From here, zoomming is made around the screen center
...@@ -216,16 +215,20 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -216,16 +215,20 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
* *
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators * in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus * for Zoom in and Zoom out sub menus
* SO WE ADD THE NAME OF THE CORRESPONDING HOTKEY AS A COMMENT, NOT AS A SHORTCUT
* using in AddHotkeyName call the option "false" (not a shortcut)
*/ */
/* Zoom in */ /* Zoom in */
text =_( "Zoom In" ); text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_IN, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN,
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm ); item->SetBitmap( zoom_in_xpm );
viewMenu->Append( item ); viewMenu->Append( item );
/* Zoom out */ /* Zoom out */
text = _( "Zoom Out" ); text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_OUT, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT,
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm ); item->SetBitmap( zoom_out_xpm );
...@@ -252,7 +255,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -252,7 +255,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
viewMenu->Append( item ); viewMenu->Append( item );
/** /**
* Place menu * Place menu
* TODO: Unify the ID names! * TODO: Unify the ID names!
...@@ -260,7 +262,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -260,7 +262,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
/* Component */ /* Component */
item = new wxMenuItem( placeMenu, ID_COMPONENT_BUTT, _( "&Component" ), text = AddHotkeyName( _( "&Component" ), s_Schematic_Hokeys_Descr,
HK_ADD_NEW_COMPONENT, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_COMPONENT_BUTT, text,
HELP_PLACE_COMPONENTS, wxITEM_NORMAL ); HELP_PLACE_COMPONENTS, wxITEM_NORMAL );
item->SetBitmap( add_component_xpm ); item->SetBitmap( add_component_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
...@@ -272,7 +276,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -272,7 +276,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->Append( item ); placeMenu->Append( item );
/* Wire */ /* Wire */
item = new wxMenuItem( placeMenu, ID_WIRE_BUTT, _( "&Wire" ), text = AddHotkeyName( _( "&Wire" ), s_Schematic_Hokeys_Descr,
HK_BEGIN_WIRE, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_WIRE_BUTT, text,
HELP_PLACE_WIRE, wxITEM_NORMAL ); HELP_PLACE_WIRE, wxITEM_NORMAL );
item->SetBitmap( add_line_xpm ); item->SetBitmap( add_line_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
...@@ -298,20 +304,25 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -298,20 +304,25 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->Append( item ); placeMenu->Append( item );
/* No connect flag */ /* No connect flag */
item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, _( "No connect flag" ), text = AddHotkeyName( _( "No connect flag" ), s_Schematic_Hokeys_Descr,
HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, text,
HELP_PLACE_NC_FLAG, wxITEM_NORMAL ); HELP_PLACE_NC_FLAG, wxITEM_NORMAL );
item->SetBitmap( noconn_button ); item->SetBitmap( noconn_button );
placeMenu->Append( item ); placeMenu->Append( item );
/* Net name */ /* Net name */
item = new wxMenuItem( placeMenu, ID_LABEL_BUTT, _( "Label" ), text = AddHotkeyName( _( "Label" ), s_Schematic_Hokeys_Descr,
HK_ADD_LABEL, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_LABEL_BUTT, text,
HELP_PLACE_NETLABEL, wxITEM_NORMAL ); HELP_PLACE_NETLABEL, wxITEM_NORMAL );
item->SetBitmap( add_line_label_xpm ); item->SetBitmap( add_line_label_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
/* Global label */ /* Global label */
item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT, _( "Global label" ), item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT, _( "Global label" ),
_( "Place a global label. Warning: all global labels with the same name are connected in whole hierarchy" ), _(
"Place a global label. Warning: all global labels with the same name are connected in whole hierarchy" ),
wxITEM_NORMAL ); wxITEM_NORMAL );
item->SetBitmap( add_glabel_xpm ); item->SetBitmap( add_glabel_xpm );
placeMenu->Append( item ); placeMenu->Append( item );
...@@ -371,7 +382,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -371,7 +382,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->Append( item ); placeMenu->Append( item );
/** /**
* Preferences Menu * Preferences Menu
*/ */
...@@ -417,7 +427,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar() ...@@ -417,7 +427,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
configmenu->Append( item ); configmenu->Append( item );
/** /**
* Help Menu * Help Menu
*/ */
......
...@@ -104,13 +104,13 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -104,13 +104,13 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
GetScreen()->m_BlockLocate.ClearItemsList(); GetScreen()->m_BlockLocate.ClearItemsList();
} }
if( m_ID_current_state == 0 ) if( m_ID_current_state == 0 )
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString );
else else
SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor ); DrawPanel->SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
break; break;
default: default:
DrawPanel->UnManageCursor( 0, wxCURSOR_ARROW, wxEmptyString ); DrawPanel->UnManageCursor( 0, 0, wxEmptyString );
break; break;
} }
...@@ -146,7 +146,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -146,7 +146,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_CLOSE_CURRENT_TOOL: case ID_POPUP_CLOSE_CURRENT_TOOL:
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString ); SetToolID( 0, 0, wxEmptyString );
break; break;
case ID_POPUP_CANCEL_CURRENT_COMMAND: case ID_POPUP_CANCEL_CURRENT_COMMAND:
...@@ -172,8 +172,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -172,8 +172,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
gerber_layer->m_Selected_Tool = tool; gerber_layer->m_Selected_Tool = tool;
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( TRUE );
} }
else
DisplayError( this, _( "No layer selected" ) );
break; break;
case ID_GERBVIEW_SHOW_LIST_DCODES: case ID_GERBVIEW_SHOW_LIST_DCODES:
......
...@@ -131,10 +131,13 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father, ...@@ -131,10 +131,13 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
m_show_layer_manager_tools = true; m_show_layer_manager_tools = true;
m_Draw_Axis = true; // true to show X and Y axis on screen m_Draw_Axis = true; // true to show X and Y axis on screen
m_Draw_Sheet_Ref = FALSE; // TRUE for reference drawings. m_Draw_Sheet_Ref = false; // true for reference drawings.
m_HotkeysZoomAndGridList = s_Gerbview_Hokeys_Descr; m_HotkeysZoomAndGridList = s_Gerbview_Hokeys_Descr;
m_SelLayerBox = NULL;
m_SelLayerTool = NULL;
if( DrawPanel ) if( DrawPanel )
DrawPanel->m_Block_Enable = TRUE; DrawPanel->m_Block_Enable = true;
// Give an icon // Give an icon
#ifdef __WINDOWS__ #ifdef __WINDOWS__
...@@ -238,7 +241,8 @@ void WinEDA_GerberFrame::OnCloseWindow( wxCloseEvent& Event ) ...@@ -238,7 +241,8 @@ void WinEDA_GerberFrame::OnCloseWindow( wxCloseEvent& Event )
*/ */
void WinEDA_GerberFrame::SetToolbars() void WinEDA_GerberFrame::SetToolbars()
{ {
int layer = ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; PCB_SCREEN* screen = (PCB_SCREEN*) GetScreen();
int layer = screen->m_Active_Layer;
GERBER* gerber = g_GERBER_List[layer]; GERBER* gerber = g_GERBER_List[layer];
if( m_HToolBar == NULL ) if( m_HToolBar == NULL )
...@@ -246,26 +250,26 @@ void WinEDA_GerberFrame::SetToolbars() ...@@ -246,26 +250,26 @@ void WinEDA_GerberFrame::SetToolbars()
if( GetScreen()->m_BlockLocate.m_Command == BLOCK_MOVE ) if( GetScreen()->m_BlockLocate.m_Command == BLOCK_MOVE )
{ {
m_HToolBar->EnableTool( wxID_CUT, TRUE ); m_HToolBar->EnableTool( wxID_CUT, true );
m_HToolBar->EnableTool( wxID_COPY, TRUE ); m_HToolBar->EnableTool( wxID_COPY, true );
} }
else else
{ {
m_HToolBar->EnableTool( wxID_CUT, FALSE ); m_HToolBar->EnableTool( wxID_CUT, false );
m_HToolBar->EnableTool( wxID_COPY, FALSE ); m_HToolBar->EnableTool( wxID_COPY, false );
} }
if( m_SelLayerBox->GetSelection() != if( m_SelLayerBox && (m_SelLayerBox->GetSelection() != screen->m_Active_Layer) )
( (PCB_SCREEN*) GetScreen() )->m_Active_Layer )
{ {
m_SelLayerBox->SetSelection( m_SelLayerBox->SetSelection( screen->m_Active_Layer );
( (PCB_SCREEN*) GetScreen() )->m_Active_Layer );
} }
if( m_SelLayerTool )
{
if( gerber ) if( gerber )
{ {
int sel_index; int sel_index;
m_SelLayerTool->Enable( TRUE ); m_SelLayerTool->Enable( true );
if( gerber->m_Selected_Tool < FIRST_DCODE ) // No tool selected if( gerber->m_Selected_Tool < FIRST_DCODE ) // No tool selected
sel_index = 0; sel_index = 0;
else else
...@@ -279,7 +283,8 @@ void WinEDA_GerberFrame::SetToolbars() ...@@ -279,7 +283,8 @@ void WinEDA_GerberFrame::SetToolbars()
else else
{ {
m_SelLayerTool->SetSelection( 0 ); m_SelLayerTool->SetSelection( 0 );
m_SelLayerTool->Enable( FALSE ); m_SelLayerTool->Enable( false );
}
} }
if( m_OptionsToolBar ) if( m_OptionsToolBar )
...@@ -287,9 +292,9 @@ void WinEDA_GerberFrame::SetToolbars() ...@@ -287,9 +292,9 @@ void WinEDA_GerberFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( m_OptionsToolBar->ToggleTool(
ID_TB_OPTIONS_SELECT_UNIT_MM, ID_TB_OPTIONS_SELECT_UNIT_MM,
g_UserUnit == g_UserUnit ==
MILLIMETRES ? TRUE : FALSE ); MILLIMETRES ? true : false );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH,
g_UserUnit == INCHES ? TRUE : FALSE ); g_UserUnit == INCHES ? true : false );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_POLAR_COORD,
DisplayOpt.DisplayPolarCood ); DisplayOpt.DisplayPolarCood );
......
...@@ -105,7 +105,6 @@ bool WinEDA_App::OnInit() ...@@ -105,7 +105,6 @@ bool WinEDA_App::OnInit()
* main frame in order to display the * main frame in order to display the
* real hotkeys in menus or tool tips * real hotkeys in menus or tool tips
*/ */
frame = new WinEDA_GerberFrame( NULL, wxT( "GerbView" ), frame = new WinEDA_GerberFrame( NULL, wxT( "GerbView" ),
wxPoint( 0, 0 ), wxPoint( 0, 0 ),
wxSize( 600, 400 ) ); wxSize( 600, 400 ) );
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
/***************************************************/ /***************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "wx/wupdlock.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "macros.h" #include "macros.h"
...@@ -16,6 +18,8 @@ ...@@ -16,6 +18,8 @@
void WinEDA_GerberFrame::ReCreateMenuBar( void ) void WinEDA_GerberFrame::ReCreateMenuBar( void )
{ {
wxWindowUpdateLocker dummy(this);
wxMenuBar *menuBar = GetMenuBar(); wxMenuBar *menuBar = GetMenuBar();
/* Destroy the existing menu bar so it can be rebuilt. This allows /* Destroy the existing menu bar so it can be rebuilt. This allows
...@@ -143,6 +147,10 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) ...@@ -143,6 +147,10 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
if( m_HToolBar != NULL ) if( m_HToolBar != NULL )
return; return;
// we create m_SelLayerTool that have a lot of items,
// so create a wxWindowUpdateLocker is a good idea
wxWindowUpdateLocker dummy(this);
if( GetScreen() ) if( GetScreen() )
{ {
layer = GetScreen()->m_Active_Layer; layer = GetScreen()->m_Active_Layer;
...@@ -214,11 +222,12 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) ...@@ -214,11 +222,12 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
ID_TOOLBARH_GERBVIEW_SELECT_LAYER, ID_TOOLBARH_GERBVIEW_SELECT_LAYER,
wxDefaultPosition, wxSize( 150, -1 ), wxDefaultPosition, wxSize( 150, -1 ),
choices ); choices );
m_SelLayerBox->SetSelection( getActiveLayer() );
m_HToolBar->AddControl( m_SelLayerBox ); m_HToolBar->AddControl( m_SelLayerBox );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
choices.Clear(); choices.Clear();
choices.Alloc(MAX_TOOLS+1);
choices.Add( _( "No tool" ) ); choices.Add( _( "No tool" ) );
for( ii = 0; ii < MAX_TOOLS; ii++ ) for( ii = 0; ii < MAX_TOOLS; ii++ )
...@@ -227,7 +236,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) ...@@ -227,7 +236,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
msg = _( "Tool " ); msg << ii + FIRST_DCODE; msg = _( "Tool " ); msg << ii + FIRST_DCODE;
choices.Add( msg ); choices.Add( msg );
} }
m_SelLayerTool = new WinEDAChoiceBox( m_HToolBar, m_SelLayerTool = new WinEDAChoiceBox( m_HToolBar,
ID_TOOLBARH_GERBER_SELECT_TOOL, ID_TOOLBARH_GERBER_SELECT_TOOL,
wxDefaultPosition, wxSize( 150, -1 ), wxDefaultPosition, wxSize( 150, -1 ),
...@@ -238,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void ) ...@@ -238,7 +246,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
// after adding the buttons to the toolbar, must call Realize() to reflect // after adding the buttons to the toolbar, must call Realize() to reflect
// the changes // the changes
m_HToolBar->Realize(); m_HToolBar->Realize();
SetToolbars();
} }
...@@ -250,6 +257,8 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void ) ...@@ -250,6 +257,8 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
if( m_VToolBar ) if( m_VToolBar )
return; return;
wxWindowUpdateLocker dummy(this);
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE ); m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
// Set up toolbar // Set up toolbar
...@@ -262,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void ) ...@@ -262,7 +271,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
_( "Delete items" ) ); _( "Delete items" ) );
m_VToolBar->Realize(); m_VToolBar->Realize();
SetToolbars();
} }
...@@ -274,6 +282,8 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void ) ...@@ -274,6 +282,8 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
if( m_OptionsToolBar ) if( m_OptionsToolBar )
return; return;
wxWindowUpdateLocker dummy(this);
// creation of tool bar options // creation of tool bar options
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
ID_OPT_TOOLBAR, FALSE ); ID_OPT_TOOLBAR, FALSE );
...@@ -327,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void ) ...@@ -327,5 +337,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
m_OptionsToolBar->Realize(); m_OptionsToolBar->Realize();
SetToolbars();
} }
boost version: 1_40_0 boost version: 1_43_0
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
# include <boost/config.hpp>
# include <boost/detail/workaround.hpp>
// The old protocol used a constraints() member function in concept
// checking classes. If the compiler supports SFINAE, we can detect
// that function and seamlessly support the old concept checking
// classes. In this release, backward compatibility with the old
// concept checking classes is enabled by default, where available.
// The old protocol is deprecated, though, and backward compatibility
// will no longer be the default in the next release.
# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
&& !defined(BOOST_NO_SFINAE) \
\
&& !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \
&& !(BOOST_WORKAROUND(__GNUC__, == 2))
// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
// check for the presence of particularmember functions.
# define BOOST_OLD_CONCEPT_SUPPORT
# endif
# ifdef BOOST_MSVC
# include <boost/concept/detail/msvc.hpp>
# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# include <boost/concept/detail/borland.hpp>
# else
# include <boost/concept/detail/general.hpp>
# endif
// Usage, in class or function context:
//
// BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
//
# define BOOST_CONCEPT_ASSERT(ModelInParens) \
BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace concept {
template <class ModelFnPtr>
struct require;
template <class Model>
struct require<void(*)(Model)>
{
enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
};
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
boost::concept::require<ModelFnPtr>::instantiate \
}
}} // namespace boost::concept
#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
# include <boost/preprocessor/seq/for_each_i.hpp>
# include <boost/preprocessor/seq/enum.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/cat.hpp>
#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
// BOOST_concept(SomeName, (p1)(p2)...(pN))
//
// Expands to "template <class p1, class p2, ...class pN> struct SomeName"
//
// Also defines an equivalent SomeNameConcept for backward compatibility.
// Maybe in the next release we can kill off the "Concept" suffix for good.
#if BOOST_WORKAROUND(__GNUC__, <= 3)
# define BOOST_concept(name, params) \
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct name; /* forward declaration */ \
\
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct BOOST_PP_CAT(name,Concept) \
: name< BOOST_PP_SEQ_ENUM(params) > \
{ \
/* at least 2.96 and 3.4.3 both need this */ \
BOOST_PP_CAT(name,Concept)(); \
}; \
\
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct name
#else
# define BOOST_concept(name, params) \
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct name; /* forward declaration */ \
\
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct BOOST_PP_CAT(name,Concept) \
: name< BOOST_PP_SEQ_ENUM(params) > \
{ \
}; \
\
template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
struct name
#endif
// Helper for BOOST_concept, above.
# define BOOST_CONCEPT_typename(r, ignored, index, t) \
BOOST_PP_COMMA_IF(index) typename t
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# undef BOOST_concept_typename
# undef BOOST_concept
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
# include <boost/mpl/if.hpp>
# endif
// This implementation works on Comeau and GCC, all the way back to
// 2.95
namespace boost { namespace concept {
template <class ModelFn>
struct requirement_;
namespace detail
{
template <void(*)()> struct instantiate {};
}
template <class Model>
struct requirement
{
static void failed() { ((Model*)0)->~Model(); }
};
# ifdef BOOST_OLD_CONCEPT_SUPPORT
template <class Model>
struct constraint
{
static void failed() { ((Model*)0)->constraints(); }
};
template <class Model>
struct requirement_<void(*)(Model)>
: mpl::if_<
concept::not_satisfied<Model>
, constraint<Model>
, requirement<Model>
>::type
{};
# else
// For GCC-2.x, these can't have exactly the same name
template <class Model>
struct requirement_<void(*)(Model)>
: requirement<Model>
{};
# endif
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
typedef ::boost::concept::detail::instantiate< \
&::boost::concept::requirement_<ModelFnPtr>::failed> \
BOOST_PP_CAT(boost_concept_check,__LINE__)
}}
#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
# include <boost/mpl/bool.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace concept {
namespace detail
{
// Here we implement the metafunction that detects whether a
// constraints metafunction exists
typedef char yes;
typedef char (&no)[2];
template <class Model, void (Model::*)()>
struct wrap_constraints {};
#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
// Work around the following bogus error in Sun Studio 11, by
// turning off the has_constraints function entirely:
// Error: complex expression not allowed in dependent template
// argument expression
inline no has_constraints_(...);
#else
template <class Model>
inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
inline no has_constraints_(...);
#endif
}
// This would be called "detail::has_constraints," but it has a strong
// tendency to show up in error messages.
template <class Model>
struct not_satisfied
{
BOOST_STATIC_CONSTANT(
bool
, value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
typedef mpl::bool_<value> type;
};
}} // namespace boost::concept::detail
#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
# include <boost/preprocessor/cat.hpp>
# ifdef BOOST_OLD_CONCEPT_SUPPORT
# include <boost/concept/detail/has_constraints.hpp>
# include <boost/mpl/if.hpp>
# endif
namespace boost { namespace concept {
template <class Model>
struct check
{
virtual void failed(Model* x)
{
x->~Model();
}
};
# ifdef BOOST_OLD_CONCEPT_SUPPORT
namespace detail
{
// No need for a virtual function here, since evaluating
// not_satisfied below will have already instantiated the
// constraints() member.
struct constraint {};
}
template <class Model>
struct require
: mpl::if_c<
not_satisfied<Model>::value
, detail::constraint
, check<Model>
>::type
{};
# else
template <class Model>
struct require
: check<Model>
{};
# endif
# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
//
// The iterator library sees some really strange errors unless we
// do things this way.
//
template <class Model>
struct require<void(*)(Model)>
{
virtual void failed(Model*)
{
require<Model>();
}
};
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
sizeof(::boost::concept::require<ModelFnPtr>) \
}
# else // Not vc-7.1
template <class Model>
require<Model>
require_(void(*)(Model));
# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
enum \
{ \
BOOST_PP_CAT(boost_concept_check,__LINE__) = \
sizeof(::boost::concept::require_((ModelFnPtr)0)) \
}
# endif
}}
#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_REQUIRES_DWA2006430_HPP
# define BOOST_CONCEPT_REQUIRES_DWA2006430_HPP
# include <boost/config.hpp>
# include <boost/parameter/aux_/parenthesized_type.hpp>
# include <boost/concept/assert.hpp>
# include <boost/preprocessor/seq/for_each.hpp>
namespace boost {
// Template for use in handwritten assertions
template <class Model, class More>
struct requires_ : More
{
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef typename More::type type;
# endif
BOOST_CONCEPT_ASSERT((Model));
};
// Template for use by macros, where models must be wrapped in parens.
// This isn't in namespace detail to keep extra cruft out of resulting
// error messages.
template <class ModelFn>
struct _requires_
{
enum { value = 0 };
BOOST_CONCEPT_ASSERT_FN(ModelFn);
};
template <int check, class Result>
struct Requires_ : ::boost::parameter::aux::unaryfunptr_arg_type<Result>
{
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef typename ::boost::parameter::aux::unaryfunptr_arg_type<Result>::type type;
# endif
};
# if BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1010))
# define BOOST_CONCEPT_REQUIRES_(r,data,t) | (::boost::_requires_<void(*)t>::value)
# else
# define BOOST_CONCEPT_REQUIRES_(r,data,t) + (::boost::_requires_<void(*)t>::value)
# endif
#if defined(NDEBUG) || BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# define BOOST_CONCEPT_REQUIRES(models, result) \
typename ::boost::parameter::aux::unaryfunptr_arg_type<void(*)result>::type
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
// Same thing as below without the initial typename
# define BOOST_CONCEPT_REQUIRES(models, result) \
::boost::Requires_< \
(0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \
::boost::parameter::aux::unaryfunptr_arg_type<void(*)result> \
>::type
#else
// This just ICEs on MSVC6 :(
# define BOOST_CONCEPT_REQUIRES(models, result) \
typename ::boost::Requires_< \
(0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \
void(*)result \
>::type
#endif
// C++0x proposed syntax changed. This supports an older usage
#define BOOST_CONCEPT_WHERE(models,result) BOOST_CONCEPT_REQUIRES(models,result)
} // namespace boost::concept_check
#endif // BOOST_CONCEPT_REQUIRES_DWA2006430_HPP
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
# include <boost/concept/assert.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace concept {
# if BOOST_WORKAROUND(__GNUC__, == 2)
# define BOOST_CONCEPT_USAGE(model) ~model()
# else
template <class Model>
struct usage_requirements
{
~usage_requirements() { ((Model*)0)->~Model(); }
};
# if BOOST_WORKAROUND(__GNUC__, <= 3)
# define BOOST_CONCEPT_USAGE(model) \
model(); /* at least 2.96 and 3.4.3 both need this :( */ \
BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \
~model()
# else
# define BOOST_CONCEPT_USAGE(model) \
BOOST_CONCEPT_ASSERT((boost::concept::usage_requirements<model>)); \
~model()
# endif
# endif
}} // namespace boost::concept
#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
This diff is collapsed.
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
// Borland C++ Builder 6 and below: // Borland C++ Builder 6 and below:
#if (__BORLANDC__ <= 0x564) #if (__BORLANDC__ <= 0x564)
# define BOOST_NO_INTEGRAL_INT64_T
# ifdef NDEBUG # ifdef NDEBUG
// fix broken <cstring> so that Boost.test works: // fix broken <cstring> so that Boost.test works:
...@@ -121,6 +120,7 @@ ...@@ -121,6 +120,7 @@
#endif #endif
// Borland C++ Builder 2008 and below: // Borland C++ Builder 2008 and below:
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#endif #endif
// //
// versions check: // versions check:
// last known and checked version is 0x610 // last known and checked version is 0x620
#if (__CODEGEARC__ > 0x613) #if (__CODEGEARC__ > 0x620)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results" # error "Unknown compiler version - please run the configure tests and report the results"
# else # else
...@@ -30,20 +30,24 @@ ...@@ -30,20 +30,24 @@
// CodeGear C++ Builder 2009 // CodeGear C++ Builder 2009
#if (__CODEGEARC__ <= 0x613) #if (__CODEGEARC__ <= 0x613)
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_PRIVATE_IN_AGGREGATE # define BOOST_NO_PRIVATE_IN_AGGREGATE
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
# define BOOST_NO_USING_TEMPLATE
// we shouldn't really need this - but too many things choke // we shouldn't really need this - but too many things choke
// without it, this needs more investigation: // without it, this needs more investigation:
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
# define BOOST_SP_NO_SP_CONVERTIBLE # define BOOST_SP_NO_SP_CONVERTIBLE
#endif
// CodeGear C++ Builder 2010
#if (__CODEGEARC__ <= 0x620)
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
# define BOOST_NO_USING_TEMPLATE
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
// Temporary hack, until specific MPL preprocessed headers are generated // Temporary hack, until specific MPL preprocessed headers are generated
# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS # define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
...@@ -59,7 +63,6 @@ ...@@ -59,7 +63,6 @@
# endif # endif
#endif #endif
// //
// C++0x macros: // C++0x macros:
// //
......
...@@ -108,11 +108,8 @@ ...@@ -108,11 +108,8 @@
// //
#define BOOST_NO_CONSTEXPR #define BOOST_NO_CONSTEXPR
#define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_LAMBDAS
#define BOOST_NO_NULLPTR #define BOOST_NO_NULLPTR
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_TEMPLATE_ALIASES #define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_UNICODE_LITERALS
// C++0x features in 4.3.n and later // C++0x features in 4.3.n and later
// //
...@@ -168,6 +165,9 @@ ...@@ -168,6 +165,9 @@
// //
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
# define BOOST_NO_LAMBDAS
# define BOOST_NO_RAW_LITERALS
# define BOOST_NO_UNICODE_LITERALS
#endif #endif
// ConceptGCC compiler: // ConceptGCC compiler:
......
// (C) Copyright Eric Jourdanneau, Joel Falcou 2010
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
// NVIDIA CUDA C++ compiler setup
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
#endif
// NVIDIA Specific support
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
#define BOOST_GPU_ENABLED __host__ __device__
// Boost support macro for NVCC
// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
#define BOOST_MSVC6_MEMBER_TEMPLATES
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_STDINT_H
#define BOOST_HAS_SIGACTION
#define BOOST_HAS_SCHED_YIELD
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_PTHREAD_YIELD
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
#define BOOST_HAS_NRVO
#define BOOST_HAS_NL_TYPES_H
#define BOOST_HAS_NANOSLEEP
#define BOOST_HAS_LONG_LONG
#define BOOST_HAS_LOG1P
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_EXPM1
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_CLOCK_GETTIME
#define BOOST_NO_VARIADIC_TEMPLATES
#define BOOST_NO_UNICODE_LITERALS
#define BOOST_NO_TEMPLATE_ALIASES
#define BOOST_NO_STD_UNORDERED
#define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_RAW_LITERALS
#define BOOST_NO_NULLPTR
#define BOOST_NO_LAMBDAS
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_DELETED_FUNCTIONS
#define BOOST_NO_DEFAULTED_FUNCTIONS
#define BOOST_NO_DECLTYPE
#define BOOST_NO_CONSTEXPR
#define BOOST_NO_CONCEPTS
#define BOOST_NO_CHAR32_T
#define BOOST_NO_CHAR16_T
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_0X_HDR_UNORDERED_SET
#define BOOST_NO_0X_HDR_UNORDERED_MAP
#define BOOST_NO_0X_HDR_TYPE_TRAITS
#define BOOST_NO_0X_HDR_TUPLE
#define BOOST_NO_0X_HDR_THREAD
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
#define BOOST_NO_0X_HDR_REGEX
#define BOOST_NO_0X_HDR_RATIO
#define BOOST_NO_0X_HDR_RANDOM
#define BOOST_NO_0X_HDR_MUTEX
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
#define BOOST_NO_0X_HDR_FUTURE
#define BOOST_NO_0X_HDR_FORWARD_LIST
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
#define BOOST_NO_0X_HDR_CONCEPTS
#define BOOST_NO_0X_HDR_CODECVT
#define BOOST_NO_0X_HDR_CHRONO
#define BOOST_NO_0X_HDR_ARRAY
...@@ -16,11 +16,28 @@ ...@@ -16,11 +16,28 @@
// if no threading API is detected. // if no threading API is detected.
// //
#if (__PGIC__ >= 7) // PGI 10.x doesn't seem to define __PGIC__
// versions earlier than 10.x do define __PGIC__
#if __PGIC__ >= 10
// options requested by configure --enable-test
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_NRVO
#define BOOST_HAS_LONG_LONG
// options --enable-test wants undefined
#undef BOOST_NO_STDC_NAMESPACE
#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
#undef BOOST_DEDUCED_TYPENAME
#elif __PGIC__ >= 7
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_SWPRINTF #define BOOST_NO_SWPRINTF
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_AUTO_DECLARATIONS
#else #else
...@@ -32,8 +49,6 @@ ...@@ -32,8 +49,6 @@
// //
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
// //
#define BOOST_NO_AUTO_DECLARATIONS
#define BOOST_NO_AUTO_MULTIDECLARATIONS
#define BOOST_NO_CHAR16_T #define BOOST_NO_CHAR16_T
#define BOOST_NO_CHAR32_T #define BOOST_NO_CHAR32_T
#define BOOST_NO_CONCEPTS #define BOOST_NO_CONCEPTS
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
#if (_MSC_VER >= 1200) #if (_MSC_VER >= 1200)
# define BOOST_HAS_MS_INT64 # define BOOST_HAS_MS_INT64
#endif #endif
#if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS) #if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))
# define BOOST_HAS_LONG_LONG # define BOOST_HAS_LONG_LONG
#else #else
# define BOOST_NO_LONG_LONG # define BOOST_NO_LONG_LONG
......
// (C) Copyright Yuriy Krasnoschek 2009.
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001 - 2003.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
// symbian specific config options:
#define BOOST_PLATFORM "Symbian"
#define BOOST_SYMBIAN 1
#if defined(__S60_3X__)
// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL
# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK
// make sure we have __GLIBC_PREREQ if available at all
# include <cstdlib>
// boilerplate code:
# define BOOST_HAS_UNISTD_H
# include <boost/config/posix_features.hpp>
// S60 SDK defines _POSIX_VERSION as POSIX.1
# ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H
# endif
# ifndef BOOST_HAS_GETTIMEOFDAY
# define BOOST_HAS_GETTIMEOFDAY
# endif
# ifndef BOOST_HAS_DIRENT_H
# define BOOST_HAS_DIRENT_H
# endif
# ifndef BOOST_HAS_SIGACTION
# define BOOST_HAS_SIGACTION
# endif
# ifndef BOOST_HAS_PTHREADS
# define BOOST_HAS_PTHREADS
# endif
# ifndef BOOST_HAS_NANOSLEEP
# define BOOST_HAS_NANOSLEEP
# endif
# ifndef BOOST_HAS_SCHED_YIELD
# define BOOST_HAS_SCHED_YIELD
# endif
# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
# endif
# ifndef BOOST_HAS_LOG1P
# define BOOST_HAS_LOG1P
# endif
# ifndef BOOST_HAS_EXPM1
# define BOOST_HAS_EXPM1
# endif
# ifndef BOOST_POSIX_API
# define BOOST_POSIX_API
# endif
// endianess support
# include <sys/endian.h>
// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER
# ifndef __LITTLE_ENDIAN
# ifdef _LITTLE_ENDIAN
# define __LITTLE_ENDIAN _LITTLE_ENDIAN
# else
# define __LITTLE_ENDIAN 1234
# endif
# endif
# ifndef __BIG_ENDIAN
# ifdef _BIG_ENDIAN
# define __BIG_ENDIAN _BIG_ENDIAN
# else
# define __BIG_ENDIAN 4321
# endif
# endif
# ifndef __BYTE_ORDER
# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE
# endif
// Known limitations
# define BOOST_ASIO_DISABLE_SERIAL_PORT
# define BOOST_DATE_TIME_NO_LOCALE
# define BOOST_NO_STD_WSTRING
# define BOOST_EXCEPTION_DISABLE
# define BOOST_NO_EXCEPTIONS
#else // TODO: More platform support e.g. UIQ
# error "Unsuppoted Symbian SDK"
#endif
#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32)
# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro
#endif
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
# define BOOST_CXX_IBMCPP 0 # define BOOST_CXX_IBMCPP 0
# define BOOST_CXX_MSVC 0 # define BOOST_CXX_MSVC 0
# define BOOST_CXX_PGI 0 # define BOOST_CXX_PGI 0
# define BOOST_CXX_NVCC 0
// locate which compiler we are using and define // locate which compiler we are using and define
...@@ -40,6 +41,10 @@ ...@@ -40,6 +41,10 @@
// GCC-XML emulates other compilers, it has to appear first here! // GCC-XML emulates other compilers, it has to appear first here!
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
#elif defined __CUDACC__
// NVIDIA CUDA C++ compiler for GPU
# define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"
#elif defined __COMO__ #elif defined __COMO__
// Comeau C++ // Comeau C++
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
......
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
// vxWorks: // vxWorks:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" # define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
#elif defined(__SYMBIAN32__)
// Symbian:
# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
#else #else
# if defined(unix) \ # if defined(unix) \
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Copyright (c) 2002-2003 David Abrahams // Copyright (c) 2002-2003 David Abrahams
// Copyright (c) 2003 Gennaro Prota // Copyright (c) 2003 Gennaro Prota
// Copyright (c) 2003 Eric Friedman // Copyright (c) 2003 Eric Friedman
// // Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
// Distributed under the Boost Software License, Version 1.0. (See // Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at // accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt) // http://www.boost.org/LICENSE_1_0.txt)
...@@ -596,6 +596,11 @@ namespace boost{ ...@@ -596,6 +596,11 @@ namespace boost{
# endif # endif
# endif # endif
//
// Set some default values GPU support
//
# ifndef BOOST_GPU_ENABLED
# define BOOST_GPU_ENABLED
# endif
#endif #endif
...@@ -40,115 +40,30 @@ ...@@ -40,115 +40,30 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/algorithm/sort.hpp>
#include <boost/range/algorithm/stable_sort.hpp>
#include <boost/range/algorithm/find_if.hpp>
#include <boost/range/algorithm/count.hpp>
#include <boost/range/algorithm/count_if.hpp>
#include <boost/range/algorithm_ext/is_sorted.hpp>
#include <boost/range/algorithm_ext/iota.hpp>
namespace boost { namespace boost {
template <typename Iter1, typename Iter2>
Iter1 begin(const std::pair<Iter1, Iter2>& p) { return p.first; }
template <typename Iter1, typename Iter2>
Iter2 end(const std::pair<Iter1, Iter2>& p) { return p.second; }
template <typename Iter1, typename Iter2>
typename boost::detail::iterator_traits<Iter1>::difference_type
size(const std::pair<Iter1, Iter2>& p) {
return std::distance(p.first, p.second);
}
#if 0
// These seem to interfere with the std::pair overloads :(
template <typename Container>
typename Container::iterator
begin(Container& c) { return c.begin(); }
template <typename Container>
typename Container::const_iterator
begin(const Container& c) { return c.begin(); }
template <typename Container>
typename Container::iterator
end(Container& c) { return c.end(); }
template <typename Container>
typename Container::const_iterator
end(const Container& c) { return c.end(); }
template <typename Container>
typename Container::size_type
size(const Container& c) { return c.size(); }
#else
template <typename T>
typename std::vector<T>::iterator
begin(std::vector<T>& c) { return c.begin(); }
template <typename T>
typename std::vector<T>::const_iterator
begin(const std::vector<T>& c) { return c.begin(); }
template <typename T>
typename std::vector<T>::iterator
end(std::vector<T>& c) { return c.end(); }
template <typename T>
typename std::vector<T>::const_iterator
end(const std::vector<T>& c) { return c.end(); }
template <typename T>
typename std::vector<T>::size_type
size(const std::vector<T>& c) { return c.size(); }
#endif
template <class ForwardIterator, class T>
void iota(ForwardIterator first, ForwardIterator last, T value)
{
for (; first != last; ++first, ++value)
*first = value;
}
template <typename Container, typename T>
void iota(Container& c, const T& value)
{
iota(begin(c), end(c), value);
}
// Also do version with 2nd container?
template <typename Container, typename OutIter>
OutIter copy(const Container& c, OutIter result) {
return std::copy(begin(c), end(c), result);
}
template <typename Container1, typename Container2>
bool equal(const Container1& c1, const Container2& c2)
{
if (size(c1) != size(c2))
return false;
return std::equal(begin(c1), end(c1), begin(c2));
}
template <typename Container>
void sort(Container& c) { std::sort(begin(c), end(c)); }
template <typename Container, typename Predicate>
void sort(Container& c, const Predicate& p) {
std::sort(begin(c), end(c), p);
}
template <typename Container>
void stable_sort(Container& c) { std::stable_sort(begin(c), end(c)); }
template <typename Container, typename Predicate>
void stable_sort(Container& c, const Predicate& p) {
std::stable_sort(begin(c), end(c), p);
}
template <typename InputIterator, typename Predicate> template <typename InputIterator, typename Predicate>
bool any_if(InputIterator first, InputIterator last, Predicate p) bool any_if(InputIterator first, InputIterator last, Predicate p)
{ {
return std::find_if(first, last, p) != last; return std::find_if(first, last, p) != last;
} }
template <typename Container, typename Predicate> template <typename Container, typename Predicate>
bool any_if(const Container& c, Predicate p) bool any_if(const Container& c, Predicate p)
{ {
return any_if(begin(c), end(c), p); return any_if(boost::begin(c), boost::end(c), p);
} }
template <typename InputIterator, typename T> template <typename InputIterator, typename T>
...@@ -159,62 +74,7 @@ namespace boost { ...@@ -159,62 +74,7 @@ namespace boost {
template <typename Container, typename T> template <typename Container, typename T>
bool container_contains(const Container& c, const T& value) bool container_contains(const Container& c, const T& value)
{ {
return container_contains(begin(c), end(c), value); return container_contains(boost::begin(c), boost::end(c), value);
}
template <typename Container, typename T>
std::size_t count(const Container& c, const T& value)
{
return std::count(begin(c), end(c), value);
}
template <typename Container, typename Predicate>
std::size_t count_if(const Container& c, Predicate p)
{
return std::count_if(begin(c), end(c), p);
}
template <typename ForwardIterator>
bool is_sorted(ForwardIterator first, ForwardIterator last)
{
if (first == last)
return true;
ForwardIterator next = first;
for (++next; next != last; first = next, ++next) {
if (*next < *first)
return false;
}
return true;
}
template <typename ForwardIterator, typename StrictWeakOrdering>
bool is_sorted(ForwardIterator first, ForwardIterator last,
StrictWeakOrdering comp)
{
if (first == last)
return true;
ForwardIterator next = first;
for (++next; next != last; first = next, ++next) {
if (comp(*next, *first))
return false;
}
return true;
}
template <typename Container>
bool is_sorted(const Container& c)
{
return is_sorted(begin(c), end(c));
}
template <typename Container, typename StrictWeakOrdering>
bool is_sorted(const Container& c, StrictWeakOrdering comp)
{
return is_sorted(begin(c), end(c), comp);
} }
} // namespace boost } // namespace boost
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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