Win32 Library update for 1.1.0.3
This commit is contained in:
parent
9a5e1b16ec
commit
be97fa595e
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
|
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
|
||||||
<title>WordML</title>
|
<title>WordML</title>
|
||||||
<element>urn:schemas-microsoft-com:office:office:DocumentProperties</element>
|
<element>urn:schemas-microsoft-com:office:office:DocumentProperties</element>
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2005-2007 Gerald Schmidt.
|
* Copyright 2005-2007 Gerald Schmidt.
|
||||||
*
|
*
|
||||||
* This file is part of Xml Copy Editor.
|
* This file is part of Xml Copy Editor.
|
||||||
*
|
*
|
||||||
* Xml Copy Editor is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; version 2 of the License.
|
* the Free Software Foundation; version 2 of the License.
|
||||||
*
|
*
|
||||||
* Xml Copy Editor is distributed in the hope that it will be useful,
|
* Xml Copy Editor is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with Xml Copy Editor; if not, write to the Free Software
|
* along with Xml Copy Editor; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mynotebook.h"
|
#include "mynotebook.h"
|
||||||
#include "xmlcopyeditor.h"
|
#include "xmlcopyeditor.h"
|
||||||
#include "xmldoc.h"
|
#include "xmldoc.h"
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE ( MyNotebook, wxAuiNotebook )
|
BEGIN_EVENT_TABLE ( MyNotebook, wxAuiNotebook )
|
||||||
EVT_LEFT_DOWN ( MyNotebook::OnLeftDown )
|
EVT_LEFT_DOWN ( MyNotebook::OnLeftDown )
|
||||||
//EVT_MIDDLE_DOWN(MyNotebook::OnMiddleDown)
|
EVT_MIDDLE_DOWN(MyNotebook::OnMiddleDown)
|
||||||
EVT_RIGHT_DOWN ( MyNotebook::OnRightDown )
|
EVT_RIGHT_DOWN ( MyNotebook::OnRightDown )
|
||||||
EVT_MENU ( ID_MENU_CLOSE, MyNotebook::OnMenuClose )
|
EVT_MENU ( ID_MENU_CLOSE, MyNotebook::OnMenuClose )
|
||||||
EVT_MENU ( ID_MENU_CLOSE_ALL, MyNotebook::OnMenuCloseAll )
|
EVT_MENU ( ID_MENU_CLOSE_ALL, MyNotebook::OnMenuCloseAll )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
MyNotebook::MyNotebook (
|
MyNotebook::MyNotebook (
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxPoint& position,
|
const wxPoint& position,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int style ) : wxAuiNotebook ( parent, id, position, size, style )
|
int style ) : wxAuiNotebook ( parent, id, position, size, style )
|
||||||
{
|
{
|
||||||
rightClickPage = -1;
|
rightClickPage = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyNotebook::OnLeftDown ( wxMouseEvent& event )
|
void MyNotebook::OnLeftDown ( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
int page = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
int page = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
||||||
if ( page == -1 )
|
if ( page == -1 )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
XmlDoc *doc = ( XmlDoc * ) GetPage ( page );
|
XmlDoc *doc = ( XmlDoc * ) GetPage ( page );
|
||||||
if ( !doc )
|
if ( !doc )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetSelection ( page );
|
SetSelection ( page );
|
||||||
doc->SetFocus();
|
doc->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyNotebook::OnMiddleDown ( wxMouseEvent& event )
|
void MyNotebook::OnMiddleDown ( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
int page = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
int page = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
||||||
if ( page == -1 )
|
if ( page == -1 )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetSelection ( page );
|
SetSelection ( page );
|
||||||
MyFrame *frame = ( MyFrame * ) GetParent();
|
MyFrame *frame = ( MyFrame * ) GetParent();
|
||||||
if ( frame )
|
if ( frame )
|
||||||
frame->closeActiveDocument();
|
frame->closeActiveDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyNotebook::OnRightDown ( wxMouseEvent& event )
|
void MyNotebook::OnRightDown ( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
rightClickPage = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
rightClickPage = HitTest ( wxPoint ( event.GetX(), event.GetY() ) );
|
||||||
if ( rightClickPage == -1 )
|
if ( rightClickPage == -1 )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SetSelection ( rightClickPage );
|
SetSelection ( rightClickPage );
|
||||||
wxMenu contextMenu;
|
wxMenu contextMenu;
|
||||||
contextMenu.Append ( ID_MENU_CLOSE, _ ( "Close" ) );
|
contextMenu.Append ( ID_MENU_CLOSE, _ ( "Close" ) );
|
||||||
contextMenu.Append ( ID_MENU_CLOSE_ALL, _ ( "Close all" ) );
|
contextMenu.Append ( ID_MENU_CLOSE_ALL, _ ( "Close all" ) );
|
||||||
contextMenu.Enable ( ID_MENU_CLOSE_ALL, ( this->GetPageCount() > 1 ) );
|
contextMenu.Enable ( ID_MENU_CLOSE_ALL, ( this->GetPageCount() > 1 ) );
|
||||||
PopupMenu ( &contextMenu, wxPoint ( -1, -1 ) );
|
PopupMenu ( &contextMenu, wxPoint ( -1, -1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyNotebook::OnMenuClose ( wxCommandEvent& WXUNUSED ( event ) )
|
void MyNotebook::OnMenuClose ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
{
|
{
|
||||||
if ( rightClickPage == -1 )
|
if ( rightClickPage == -1 )
|
||||||
return;
|
return;
|
||||||
MyFrame *frame = ( MyFrame * ) GetParent();
|
MyFrame *frame = ( MyFrame * ) GetParent();
|
||||||
if ( frame )
|
if ( frame )
|
||||||
frame->closeActiveDocument();
|
frame->closeActiveDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyNotebook::OnMenuCloseAll ( wxCommandEvent& WXUNUSED ( event ) )
|
void MyNotebook::OnMenuCloseAll ( wxCommandEvent& WXUNUSED ( event ) )
|
||||||
{
|
{
|
||||||
MyFrame *frame = ( MyFrame * ) GetParent();
|
MyFrame *frame = ( MyFrame * ) GetParent();
|
||||||
if ( !frame )
|
if ( !frame )
|
||||||
return;
|
return;
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
frame->OnCloseAll ( e );
|
frame->OnCloseAll ( e );
|
||||||
}
|
}
|
||||||
|
|
12042
src/xmlcopyeditor.cpp
12042
src/xmlcopyeditor.cpp
File diff suppressed because it is too large
Load Diff
1019
src/xmlcopyeditor.h
1019
src/xmlcopyeditor.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue