Omitted MS rebar option.
This commit is contained in:
parent
f33649c76f
commit
d1c008912d
|
@ -1,52 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Name: wxCoolBar
|
|
||||||
// Purpose: header of wxCoolBar an related classes for wxMSW
|
|
||||||
// Author: Martin Simon
|
|
||||||
// Modified by:
|
|
||||||
// Copyright: (c) Martin Simon - martin.simon@planet-berlin-it.de
|
|
||||||
// Licence: wxWidgets licence
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
WXWINDOWS LIBRARY LICENCE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU Library General Public Licence as published by
|
|
||||||
the Free Software Foundation; either version 2 of the Licence, or (at
|
|
||||||
your option) any later version.
|
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful, but
|
|
||||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
|
|
||||||
General Public Licence for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public Licence
|
|
||||||
along with this software, usually in a file named COPYING.LIB. If not,
|
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
||||||
Boston, MA 02111-1307 USA.
|
|
||||||
|
|
||||||
EXCEPTION NOTICE
|
|
||||||
|
|
||||||
1. As a special exception, the copyright holders of this library give
|
|
||||||
permission for additional uses of the text contained in this release of
|
|
||||||
the library as licenced under the wxWindows Library Licence, applying
|
|
||||||
either version 3.1 of the Licence, or (at your option) any later version of
|
|
||||||
the Licence as published by the copyright holders of version
|
|
||||||
3.1 of the Licence document.
|
|
||||||
|
|
||||||
2. The exception is that you may use, copy, link, modify and distribute
|
|
||||||
under your own terms, binary object code versions of works based
|
|
||||||
on the Library.
|
|
||||||
|
|
||||||
3. If you copy code from files distributed under the terms of the GNU
|
|
||||||
General Public Licence or the GNU Library General Public Licence into a
|
|
||||||
copy of this library, as this licence permits, the exception does not
|
|
||||||
apply to the code that you add in this way. To avoid misleading anyone as
|
|
||||||
to the status of such modified files, you must delete this exception
|
|
||||||
notice from such code and/or adjust the licensing conditions notice
|
|
||||||
accordingly.
|
|
||||||
|
|
||||||
4. If you write modifications of your own for this library, it is your
|
|
||||||
choice whether to permit this exception to apply to your modifications.
|
|
||||||
If you do not wish that, you must delete the exception notice from such
|
|
||||||
code and/or adjust the licensing conditions notice accordingly.
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2005-2007 Gerald Schmidt.
|
|
||||||
*
|
|
||||||
* This file is part of Xml Copy Editor.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Xml Copy Editor; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//mymenubar.cpp
|
|
||||||
|
|
||||||
#include "mymenubar.h"
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE ( MyMenuBar, wxMenuBar )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
MyMenuBar::MyMenuBar ( long style ) : wxMenuBar ( style )
|
|
||||||
{
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
wxWindow *window = ( wxWindow * ) this;
|
|
||||||
HWND handle = ( HWND ) window->GetHandle();
|
|
||||||
if ( !handle )
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2005-2007 Gerald Schmidt.
|
|
||||||
*
|
|
||||||
* This file is part of Xml Copy Editor.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Xml Copy Editor; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// mymenubar.h
|
|
||||||
|
|
||||||
#ifndef MY_MENU_BAR
|
|
||||||
#define MY_MENU_BAR
|
|
||||||
|
|
||||||
#include <wx/wx.h>
|
|
||||||
#include <wx/dcbuffer.h>
|
|
||||||
|
|
||||||
class MyMenuBar : public wxMenuBar
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MyMenuBar ( long style = 0 );
|
|
||||||
private:
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,112 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2005-2007 Gerald Schmidt.
|
|
||||||
*
|
|
||||||
* This file is part of Xml Copy Editor.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Xml Copy Editor; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//mytoolbar.cpp
|
|
||||||
|
|
||||||
#include "mytoolbar.h"
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE ( MyToolBar, wxToolBar )
|
|
||||||
EVT_ERASE_BACKGROUND ( MyToolBar::OnEraseBG )
|
|
||||||
END_EVENT_TABLE()
|
|
||||||
|
|
||||||
// taken from wxStyledNotebook (c) Eran Ifrah <eranif@bezeqint.net>
|
|
||||||
static wxColor LightColour ( const wxColour& color, int percent )
|
|
||||||
{
|
|
||||||
int rd, gd, bd, high = 0;
|
|
||||||
wxColor end_color = wxT ( "WHITE" );
|
|
||||||
rd = end_color.Red() - color.Red();
|
|
||||||
gd = end_color.Green() - color.Green();
|
|
||||||
bd = end_color.Blue() - color.Blue();
|
|
||||||
high = 100;
|
|
||||||
|
|
||||||
// We take the percent way of the color from color --> white
|
|
||||||
int i = percent;
|
|
||||||
int r = color.Red() + ( ( i*rd*100 ) /high ) /100;
|
|
||||||
int g = color.Green() + ( ( i*gd*100 ) /high ) /100;
|
|
||||||
int b = color.Blue() + ( ( i*bd*100 ) /high ) /100;
|
|
||||||
return wxColor ( r, g, b );
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToolBar::MyToolBar (
|
|
||||||
wxFrame *parent,
|
|
||||||
int id,
|
|
||||||
const wxPoint& pos,
|
|
||||||
const wxSize& size,
|
|
||||||
long style ) :
|
|
||||||
wxToolBar ( parent, id, pos, size, style )
|
|
||||||
{
|
|
||||||
/// Override colors
|
|
||||||
m_colorTo = LightColour ( wxSystemSettings::GetColour ( wxSYS_COLOUR_3DFACE ), 0 );
|
|
||||||
m_colorFrom = LightColour ( wxSystemSettings::GetColour ( wxSYS_COLOUR_3DFACE ), 80 );//60);
|
|
||||||
//m_colorFrom = LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENU), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyToolBar::OnEraseBG ( wxEraseEvent& event )
|
|
||||||
{
|
|
||||||
wxDC* DC = event.GetDC();
|
|
||||||
wxWindow *Window = dynamic_cast<wxWindow *> ( event.GetEventObject() );
|
|
||||||
assert ( Window );
|
|
||||||
int x, y, w, h;
|
|
||||||
x = y = 0;
|
|
||||||
Window->GetSize ( &w, &h );
|
|
||||||
wxRect rect ( x, y, w, h );
|
|
||||||
PaintStraightGradientBox ( DC, rect, m_colorFrom, m_colorTo );
|
|
||||||
}
|
|
||||||
|
|
||||||
// adapted from wxFlatNotebook (c) Eran Ifrah
|
|
||||||
void MyToolBar::PaintStraightGradientBox ( wxDC *dc, const wxRect& rect, const wxColour& startColor, const wxColour& endColor, bool vertical )
|
|
||||||
{
|
|
||||||
int rd, gd, bd, high = 0;
|
|
||||||
rd = endColor.Red() - startColor.Red();
|
|
||||||
gd = endColor.Green() - startColor.Green();
|
|
||||||
bd = endColor.Blue() - startColor.Blue();
|
|
||||||
|
|
||||||
/// Save the current pen and brush
|
|
||||||
wxPen savedPen = dc->GetPen();
|
|
||||||
wxBrush savedBrush = dc->GetBrush();
|
|
||||||
|
|
||||||
if ( vertical )
|
|
||||||
high = rect.GetHeight()-1;
|
|
||||||
else
|
|
||||||
high = rect.GetWidth()-1;
|
|
||||||
|
|
||||||
if ( high < 1 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
for ( int i = 0; i <= high; ++i )
|
|
||||||
{
|
|
||||||
int r = startColor.Red() + ( ( i*rd*100 ) /high ) /100;
|
|
||||||
int g = startColor.Green() + ( ( i*gd*100 ) /high ) /100;
|
|
||||||
int b = startColor.Blue() + ( ( i*bd*100 ) /high ) /100;
|
|
||||||
|
|
||||||
wxPen p ( wxColor ( r, g, b ) );
|
|
||||||
dc->SetPen ( p );
|
|
||||||
|
|
||||||
if ( vertical )
|
|
||||||
dc->DrawLine ( rect.x, rect.y+i, rect.x+rect.width, rect.y+i );
|
|
||||||
else
|
|
||||||
dc->DrawLine ( rect.x+i, rect.y, rect.x+i, rect.y+rect.height );
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Restore the pen and brush
|
|
||||||
dc->SetPen ( savedPen );
|
|
||||||
dc->SetBrush ( savedBrush );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2005-2007 Gerald Schmidt.
|
|
||||||
*
|
|
||||||
* This file is part of Xml Copy Editor.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; version 2 of the License.
|
|
||||||
*
|
|
||||||
* Xml Copy Editor is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Xml Copy Editor; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
// mytoolbar.h
|
|
||||||
|
|
||||||
#ifndef MY_TOOLBAR
|
|
||||||
#define MY_TOOLBAR
|
|
||||||
|
|
||||||
#include <wx/wx.h>
|
|
||||||
#include <wx/dcbuffer.h>
|
|
||||||
|
|
||||||
class MyToolBar : public wxToolBar
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MyToolBar (
|
|
||||||
wxFrame *parent,
|
|
||||||
int id = wxID_ANY,
|
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
|
||||||
const wxSize& size = wxDefaultSize,
|
|
||||||
long style = 0 );
|
|
||||||
void OnEraseBG ( wxEraseEvent& event );
|
|
||||||
private:
|
|
||||||
wxColour m_colorFrom, m_colorTo, m_colorBorder;
|
|
||||||
|
|
||||||
//void FillGradientColor(wxDC *dc, const wxRect& rect);
|
|
||||||
void PaintStraightGradientBox (
|
|
||||||
wxDC *dc,
|
|
||||||
const wxRect& rect,
|
|
||||||
const wxColour& startColor,
|
|
||||||
const wxColour& endColor,
|
|
||||||
bool vertical = true );
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -60,9 +60,7 @@
|
||||||
#include "findreplacepanel.h"
|
#include "findreplacepanel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
#include <wx/msw/uxtheme.h>
|
|
||||||
#else
|
|
||||||
#include "wrapxerces.h"
|
#include "wrapxerces.h"
|
||||||
#include "xpm/appicon.xpm"
|
#include "xpm/appicon.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
@ -546,10 +544,6 @@ MyFrame::MyFrame (
|
||||||
_T ( "Bitstream Vera Sans" );
|
_T ( "Bitstream Vera Sans" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
coolBar = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool findMatchCase;
|
bool findMatchCase;
|
||||||
|
|
||||||
// fetch configuration
|
// fetch configuration
|
||||||
|
@ -663,9 +657,6 @@ MyFrame::MyFrame (
|
||||||
showInsertEntityPane = config->Read ( _T ( "showInsertEntityPane" ), true );
|
showInsertEntityPane = config->Read ( _T ( "showInsertEntityPane" ), true );
|
||||||
expandInternalEntities = config->Read ( _T ( "expandInternalEntities" ), true );
|
expandInternalEntities = config->Read ( _T ( "expandInternalEntities" ), true );
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
useCoolBar = config->Read ( _T ( "useCoolBar" ), true );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else // config not found
|
else // config not found
|
||||||
{
|
{
|
||||||
|
@ -715,9 +706,6 @@ MyFrame::MyFrame (
|
||||||
commandOutput = ID_COMMAND_OUTPUT_IGNORE;
|
commandOutput = ID_COMMAND_OUTPUT_IGNORE;
|
||||||
commandString = wxEmptyString;
|
commandString = wxEmptyString;
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
useCoolBar = true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
largeFileProperties.completion = false;
|
largeFileProperties.completion = false;
|
||||||
|
@ -790,10 +778,6 @@ MyFrame::MyFrame (
|
||||||
stylePosition = aboutPosition = wxDefaultPosition;
|
stylePosition = aboutPosition = wxDefaultPosition;
|
||||||
styleSize = wxSize ( 720, 540 );
|
styleSize = wxSize ( 720, 540 );
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
useCoolBarOnStart = useCoolBar;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
showTopBars ( toolbarVisible );
|
showTopBars ( toolbarVisible );
|
||||||
|
|
||||||
long style = wxAUI_NB_TOP |
|
long style = wxAUI_NB_TOP |
|
||||||
|
@ -980,10 +964,6 @@ MyFrame::~MyFrame()
|
||||||
config->Write ( _T ( "commandOutput" ), commandPanel->getOutput() );
|
config->Write ( _T ( "commandOutput" ), commandPanel->getOutput() );
|
||||||
config->Write ( _T ( "commandString" ), commandPanel->getCommand() );
|
config->Write ( _T ( "commandString" ), commandPanel->getCommand() );
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
config->Write ( _T ( "useCoolBar" ), useCoolBar );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
config->Write ( _T ( "restoreLayout" ), restoreLayout );
|
config->Write ( _T ( "restoreLayout" ), restoreLayout );
|
||||||
|
|
||||||
|
|
||||||
|
@ -1035,32 +1015,6 @@ wxString MyFrame::getLinuxBrowser()
|
||||||
|
|
||||||
void MyFrame::showTopBars ( bool b )
|
void MyFrame::showTopBars ( bool b )
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
|
||||||
if ( useCoolBarOnStart )
|
|
||||||
{
|
|
||||||
if ( coolBar )
|
|
||||||
{
|
|
||||||
manager.DetachPane ( coolBar );
|
|
||||||
manager.Update();
|
|
||||||
coolBar->ShowBand ( 1, b );
|
|
||||||
manager.AddPane ( coolBar, wxAuiPaneInfo().Top().CaptionVisible ( false ).Name ( _T ( "coolBar" ) ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
toolBar = getToolBar();
|
|
||||||
SetToolBar ( NULL );
|
|
||||||
if ( toolBar && protectTags )
|
|
||||||
toolBar->ToggleTool ( ID_PROTECT_TAGS, protectTags );
|
|
||||||
menuBar = getMenuBar();
|
|
||||||
coolBar = new wxCoolBar ( this, -1 );
|
|
||||||
coolBar->AddBand ( menuBar, false, wxEmptyString, true );
|
|
||||||
coolBar->AddBand ( toolBar, true, wxEmptyString, true );
|
|
||||||
coolBar->ShowBand ( 1, b );
|
|
||||||
manager.AddPane ( coolBar, wxAuiPaneInfo().Top().CaptionVisible ( false ).Name ( _T ( "coolBar" ) ) );
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if ( !menuBar )
|
if ( !menuBar )
|
||||||
{
|
{
|
||||||
SetToolBar ( NULL );
|
SetToolBar ( NULL );
|
||||||
|
@ -2349,9 +2303,6 @@ void MyFrame::OnOptions ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
expandInternalEntities,
|
expandInternalEntities,
|
||||||
showFullPathOnFrame,
|
showFullPathOnFrame,
|
||||||
lang,
|
lang,
|
||||||
#ifdef __WXMSW__
|
|
||||||
useCoolBar,
|
|
||||||
#endif
|
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
title ) );
|
title ) );
|
||||||
if ( mpsd->ShowModal() == wxID_OK )
|
if ( mpsd->ShowModal() == wxID_OK )
|
||||||
|
@ -2369,9 +2320,6 @@ void MyFrame::OnOptions ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
expandInternalEntities = mpsd->getExpandInternalEntities();
|
expandInternalEntities = mpsd->getExpandInternalEntities();
|
||||||
showFullPathOnFrame = mpsd->getShowFullPathOnFrame();
|
showFullPathOnFrame = mpsd->getShowFullPathOnFrame();
|
||||||
lang = mpsd->getLang();
|
lang = mpsd->getLang();
|
||||||
#ifdef __WXMSW__
|
|
||||||
useCoolBar = mpsd->getUseCoolBar();
|
|
||||||
#endif
|
|
||||||
updatePaths();
|
updatePaths();
|
||||||
}
|
}
|
||||||
if ( doc )
|
if ( doc )
|
||||||
|
@ -4217,14 +4165,7 @@ void MyFrame::OnToolbarVisible ( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if ( !viewMenu )
|
if ( !viewMenu )
|
||||||
return;
|
return;
|
||||||
#ifdef __WXMSW__
|
|
||||||
if ( useCoolBarOnStart )
|
|
||||||
toolbarVisible = ( viewMenu->IsChecked ( ID_TOOLBAR_VISIBLE ) ) ? false : true;
|
|
||||||
else
|
|
||||||
toolbarVisible = ( toolbarVisible ) ? false : true;
|
toolbarVisible = ( toolbarVisible ) ? false : true;
|
||||||
#else
|
|
||||||
toolbarVisible = ( toolbarVisible ) ? false : true;
|
|
||||||
#endif
|
|
||||||
viewMenu->Check ( ID_TOOLBAR_VISIBLE, toolbarVisible );
|
viewMenu->Check ( ID_TOOLBAR_VISIBLE, toolbarVisible );
|
||||||
showTopBars ( toolbarVisible );
|
showTopBars ( toolbarVisible );
|
||||||
manager.Update();
|
manager.Update();
|
||||||
|
@ -4274,15 +4215,7 @@ void MyFrame::OnProtectTags ( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if ( !xmlMenu )
|
if ( !xmlMenu )
|
||||||
return;
|
return;
|
||||||
#ifdef __WXMSW__
|
|
||||||
if ( useCoolBarOnStart )
|
|
||||||
protectTags = ( xmlMenu->IsChecked ( ID_PROTECT_TAGS ) ) ? false : true;
|
|
||||||
else
|
|
||||||
|
|
||||||
protectTags = ( protectTags ) ? false : true;
|
protectTags = ( protectTags ) ? false : true;
|
||||||
#else
|
|
||||||
protectTags = ( protectTags ) ? false : true;
|
|
||||||
#endif
|
|
||||||
if ( xmlMenu )
|
if ( xmlMenu )
|
||||||
xmlMenu->Check ( ID_PROTECT_TAGS, protectTags );
|
xmlMenu->Check ( ID_PROTECT_TAGS, protectTags );
|
||||||
if ( toolBar )
|
if ( toolBar )
|
||||||
|
@ -4856,21 +4789,12 @@ void MyFrame::displaySavedStatus ( int bytes )
|
||||||
statusProgress ( msg );
|
statusProgress ( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MyFrame::xpThemeActive()
|
|
||||||
{
|
|
||||||
#ifndef __WXMSW__
|
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
return ( wxUxThemeEngine::Get() && wxUxThemeEngine::Get()->IsThemeActive() );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MyFrame::getHandleCommandLineFlag()
|
bool MyFrame::getHandleCommandLineFlag()
|
||||||
{
|
{
|
||||||
return handleCommandLineFlag;
|
return handleCommandLineFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyMenuBar *MyFrame::getMenuBar()
|
wxMenuBar *MyFrame::getMenuBar()
|
||||||
{
|
{
|
||||||
fileMenu = new wxMenu; // use class-wide data member
|
fileMenu = new wxMenu; // use class-wide data member
|
||||||
updateFileMenu ( false );
|
updateFileMenu ( false );
|
||||||
|
@ -5236,7 +5160,7 @@ MyMenuBar *MyFrame::getMenuBar()
|
||||||
helpMenu->AppendSeparator();
|
helpMenu->AppendSeparator();
|
||||||
helpMenu->Append ( aboutItem );
|
helpMenu->Append ( aboutItem );
|
||||||
|
|
||||||
MyMenuBar *menuBar = new MyMenuBar ( wxMB_DOCKABLE );
|
wxMenuBar *menuBar = new wxMenuBar ( wxMB_DOCKABLE );
|
||||||
menuBar->Append ( fileMenu, _ ( "&File" ) );
|
menuBar->Append ( fileMenu, _ ( "&File" ) );
|
||||||
menuBar->Append ( editMenu, _ ( "&Edit" ) );
|
menuBar->Append ( editMenu, _ ( "&Edit" ) );
|
||||||
menuBar->Append ( viewMenu, _ ( "&View" ) );
|
menuBar->Append ( viewMenu, _ ( "&View" ) );
|
||||||
|
@ -5328,9 +5252,9 @@ void MyFrame::updateFileMenu ( bool deleteExisting )
|
||||||
fileMenu->Append ( exitItem );
|
fileMenu->Append ( exitItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
MyToolBar *MyFrame::getToolBar()
|
wxToolBar *MyFrame::getToolBar()
|
||||||
{
|
{
|
||||||
MyToolBar *myToolBar = new MyToolBar (
|
wxToolBar *toolBar = new wxToolBar (
|
||||||
this,
|
this,
|
||||||
ID_TOOLBAR,
|
ID_TOOLBAR,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
|
@ -5344,40 +5268,40 @@ MyToolBar *MyFrame::getToolBar()
|
||||||
#else
|
#else
|
||||||
w = h = 24;
|
w = h = 24;
|
||||||
#endif
|
#endif
|
||||||
myToolBar->SetToolBitmapSize ( wxSize ( w, h ) );
|
toolBar->SetToolBitmapSize ( wxSize ( w, h ) );
|
||||||
|
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
wxID_NEW,
|
wxID_NEW,
|
||||||
_ ( "New" ),
|
_ ( "New" ),
|
||||||
newBitmap,
|
newBitmap,
|
||||||
_ ( "New" ) );
|
_ ( "New" ) );
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
wxID_OPEN,
|
wxID_OPEN,
|
||||||
_ ( "Open" ),
|
_ ( "Open" ),
|
||||||
openBitmap,
|
openBitmap,
|
||||||
_ ( "Open" ) );
|
_ ( "Open" ) );
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
wxID_SAVE,
|
wxID_SAVE,
|
||||||
_ ( "Save" ),
|
_ ( "Save" ),
|
||||||
saveBitmap,
|
saveBitmap,
|
||||||
wxNullBitmap,
|
wxNullBitmap,
|
||||||
wxITEM_NORMAL,
|
wxITEM_NORMAL,
|
||||||
_ ( "Save" ) );
|
_ ( "Save" ) );
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
ID_PRINT,
|
ID_PRINT,
|
||||||
_ ( "Print" ),
|
_ ( "Print" ),
|
||||||
printBitmap,
|
printBitmap,
|
||||||
wxNullBitmap,
|
wxNullBitmap,
|
||||||
wxITEM_NORMAL,
|
wxITEM_NORMAL,
|
||||||
_ ( "Print" ) );
|
_ ( "Print" ) );
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
ID_BROWSER,
|
ID_BROWSER,
|
||||||
_ ( "Browser" ),
|
_ ( "Browser" ),
|
||||||
internetBitmap,
|
internetBitmap,
|
||||||
wxNullBitmap,
|
wxNullBitmap,
|
||||||
wxITEM_NORMAL,
|
wxITEM_NORMAL,
|
||||||
_ ( "Browser" ) );
|
_ ( "Browser" ) );
|
||||||
myToolBar->AddTool (
|
toolBar->AddTool (
|
||||||
ID_SPELL,
|
ID_SPELL,
|
||||||
_ ( "Spelling and Style" ),
|
_ ( "Spelling and Style" ),
|
||||||
spellingBitmap,
|
spellingBitmap,
|
||||||
|
@ -5385,17 +5309,17 @@ MyToolBar *MyFrame::getToolBar()
|
||||||
wxITEM_NORMAL,
|
wxITEM_NORMAL,
|
||||||
_ ( "Spelling and Style" ) );
|
_ ( "Spelling and Style" ) );
|
||||||
|
|
||||||
myToolBar->AddCheckTool (
|
toolBar->AddCheckTool (
|
||||||
ID_PROTECT_TAGS,
|
ID_PROTECT_TAGS,
|
||||||
_ ( "Lock Tags" ),
|
_ ( "Lock Tags" ),
|
||||||
hyperlinkBitmap,
|
hyperlinkBitmap,
|
||||||
wxNullBitmap,
|
wxNullBitmap,
|
||||||
_ ( "Lock Tags" ) );
|
_ ( "Lock Tags" ) );
|
||||||
myToolBar->ToggleTool (
|
toolBar->ToggleTool (
|
||||||
ID_PROTECT_TAGS, protectTags );
|
ID_PROTECT_TAGS, protectTags );
|
||||||
|
|
||||||
myToolBar->Realize();
|
toolBar->Realize();
|
||||||
return myToolBar;
|
return toolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlDoc *MyFrame::getActiveDocument()
|
XmlDoc *MyFrame::getActiveDocument()
|
||||||
|
@ -5407,11 +5331,6 @@ XmlDoc *MyFrame::getActiveDocument()
|
||||||
|
|
||||||
void MyFrame::addSafeSeparator ( wxToolBar *toolBar )
|
void MyFrame::addSafeSeparator ( wxToolBar *toolBar )
|
||||||
{
|
{
|
||||||
if ( xpThemeActive() )
|
|
||||||
{
|
|
||||||
toolBar->AddSeparator();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wxStaticText *staticControl = new wxStaticText (
|
wxStaticText *staticControl = new wxStaticText (
|
||||||
toolBar,
|
toolBar,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
|
@ -5911,6 +5830,8 @@ void MyFrame::loadBitmaps()
|
||||||
helpBitmap = wxBITMAP ( stock_help_16 );
|
helpBitmap = wxBITMAP ( stock_help_16 );
|
||||||
#else
|
#else
|
||||||
// toolbar icons
|
// toolbar icons
|
||||||
|
|
||||||
|
|
||||||
newBitmap.LoadFile ( pngDir + _T ( "stock_new.png" ), wxBITMAP_TYPE_PNG );
|
newBitmap.LoadFile ( pngDir + _T ( "stock_new.png" ), wxBITMAP_TYPE_PNG );
|
||||||
openBitmap.LoadFile ( pngDir + _T ( "stock_open.png" ), wxBITMAP_TYPE_PNG );
|
openBitmap.LoadFile ( pngDir + _T ( "stock_open.png" ), wxBITMAP_TYPE_PNG );
|
||||||
saveBitmap.LoadFile ( pngDir + _T ( "stock_save.png" ), wxBITMAP_TYPE_PNG );
|
saveBitmap.LoadFile ( pngDir + _T ( "stock_save.png" ), wxBITMAP_TYPE_PNG );
|
||||||
|
|
|
@ -53,14 +53,8 @@
|
||||||
#include "xmlencodinghandler.h"
|
#include "xmlencodinghandler.h"
|
||||||
#include "myipc.h"
|
#include "myipc.h"
|
||||||
#include "xmlcopyeditorcopy.h"
|
#include "xmlcopyeditorcopy.h"
|
||||||
#include "mytoolbar.h"
|
|
||||||
#include "mymenubar.h"
|
|
||||||
#include <wx/aui/framemanager.h>
|
#include <wx/aui/framemanager.h>
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
#include "wxcoolbar.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
STATUS_HIDDEN = 1,
|
STATUS_HIDDEN = 1,
|
||||||
|
@ -342,8 +336,8 @@ private:
|
||||||
std::auto_ptr<wxHtmlHelpController> helpController;
|
std::auto_ptr<wxHtmlHelpController> helpController;
|
||||||
|
|
||||||
wxBoxSizer *frameSizer;
|
wxBoxSizer *frameSizer;
|
||||||
MyMenuBar *menuBar;
|
wxMenuBar *menuBar;
|
||||||
MyToolBar *toolBar;
|
wxToolBar *toolBar;
|
||||||
LocationPanel *locationPanel;
|
LocationPanel *locationPanel;
|
||||||
InsertPanel *insertChildPanel, *insertSiblingPanel, *insertEntityPanel;
|
InsertPanel *insertChildPanel, *insertSiblingPanel, *insertEntityPanel;
|
||||||
|
|
||||||
|
@ -460,9 +454,6 @@ private:
|
||||||
wxFileHistory history;
|
wxFileHistory history;
|
||||||
wxFindReplaceData findData;
|
wxFindReplaceData findData;
|
||||||
XmlCtrlProperties properties, largeFileProperties;
|
XmlCtrlProperties properties, largeFileProperties;
|
||||||
#ifdef __WXMSW__
|
|
||||||
wxCoolBar *coolBar;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// member functions
|
// member functions
|
||||||
bool panelHasFocus();
|
bool panelHasFocus();
|
||||||
|
@ -470,7 +461,6 @@ private:
|
||||||
XmlDoc *doc,
|
XmlDoc *doc,
|
||||||
wxString& fileName,
|
wxString& fileName,
|
||||||
bool checkLastModified = true );
|
bool checkLastModified = true );
|
||||||
bool xpThemeActive();
|
|
||||||
int getFileType ( const wxString& fileName );
|
int getFileType ( const wxString& fileName );
|
||||||
long getNotebookStyleMask();
|
long getNotebookStyleMask();
|
||||||
wxString getLinuxBrowser();
|
wxString getLinuxBrowser();
|
||||||
|
@ -502,8 +492,8 @@ private:
|
||||||
bool isXml = true );
|
bool isXml = true );
|
||||||
void removeUtf8Bom ( std::string& buffer );
|
void removeUtf8Bom ( std::string& buffer );
|
||||||
std::string getAuxPath ( const std::string& fileName );
|
std::string getAuxPath ( const std::string& fileName );
|
||||||
MyMenuBar *getMenuBar();
|
wxMenuBar *getMenuBar();
|
||||||
MyToolBar *getToolBar();
|
wxToolBar *getToolBar();
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%define name xmlcopyeditor
|
%define name xmlcopyeditor
|
||||||
%define version 1.1.0.1
|
%define version 1.1.0.3
|
||||||
%define release 1
|
%define release 1
|
||||||
%define author Gerald Schmidt <gnschmidt@users.sourceforge.net>
|
%define author Gerald Schmidt <gnschmidt@users.sourceforge.net>
|
||||||
%define prefix /usr/local
|
%define prefix /usr/local
|
||||||
|
|
|
@ -36,5 +36,5 @@
|
||||||
"License along with this program; if not, write to the Free\n"\
|
"License along with this program; if not, write to the Free\n"\
|
||||||
"Software Foundation, Inc., 59 Temple Place, Suite 330,\n"\
|
"Software Foundation, Inc., 59 Temple Place, Suite 330,\n"\
|
||||||
"Boston, MA 02111-1307 USA.")
|
"Boston, MA 02111-1307 USA.")
|
||||||
#define ABOUT_VERSION _T("1.1.0.2")
|
#define ABOUT_VERSION _T("1.1.0.3")
|
||||||
#define XMLCE_VAR _T("XMLCE_VAR")
|
#define XMLCE_VAR _T("XMLCE_VAR")
|
||||||
|
|
Loading…
Reference in New Issue