Tried to fix corrupted display of wxTextCtrl,
Corrected wxFileDialog's multiple file option. Corrected event mask for CaptureMouse(), Small change to "best visual" code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,6 +112,8 @@ public:
|
|||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
|
virtual bool Enable( bool enable );
|
||||||
|
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
void OnDropFiles( wxDropFilesEvent &event );
|
void OnDropFiles( wxDropFilesEvent &event );
|
||||||
void OnChar( wxKeyEvent &event );
|
void OnChar( wxKeyEvent &event );
|
||||||
|
@@ -112,6 +112,8 @@ public:
|
|||||||
virtual void SetSelection(long from, long to);
|
virtual void SetSelection(long from, long to);
|
||||||
virtual void SetEditable(bool editable);
|
virtual void SetEditable(bool editable);
|
||||||
|
|
||||||
|
virtual bool Enable( bool enable );
|
||||||
|
|
||||||
// Implementation from now on
|
// Implementation from now on
|
||||||
void OnDropFiles( wxDropFilesEvent &event );
|
void OnDropFiles( wxDropFilesEvent &event );
|
||||||
void OnChar( wxKeyEvent &event );
|
void OnChar( wxKeyEvent &event );
|
||||||
|
@@ -1155,10 +1155,11 @@ void wxFileDialog::GetPaths( wxArrayString& paths ) const
|
|||||||
item.m_mask = wxLIST_MASK_TEXT;
|
item.m_mask = wxLIST_MASK_TEXT;
|
||||||
|
|
||||||
item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
||||||
while ( item.m_itemId != -1 ) {
|
while ( item.m_itemId != -1 )
|
||||||
|
{
|
||||||
m_list->GetItem( item );
|
m_list->GetItem( item );
|
||||||
paths.Add( dir + item.m_text );
|
paths.Add( dir + item.m_text );
|
||||||
item.m_itemId = m_list->GetNextItem( item.m_itemId + 1,
|
item.m_itemId = m_list->GetNextItem( item.m_itemId,
|
||||||
wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1177,10 +1178,11 @@ void wxFileDialog::GetFilenames(wxArrayString& files) const
|
|||||||
item.m_mask = wxLIST_MASK_TEXT;
|
item.m_mask = wxLIST_MASK_TEXT;
|
||||||
|
|
||||||
item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
||||||
while ( item.m_itemId != -1 ) {
|
while ( item.m_itemId != -1 )
|
||||||
|
{
|
||||||
m_list->GetItem( item );
|
m_list->GetItem( item );
|
||||||
files.Add( item.m_text );
|
files.Add( item.m_text );
|
||||||
item.m_itemId = m_list->GetNextItem( item.m_itemId + 1,
|
item.m_itemId = m_list->GetNextItem( item.m_itemId,
|
||||||
wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -285,9 +285,6 @@ bool wxApp::OnInitGui()
|
|||||||
visual = vis;
|
visual = vis;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRootWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
|
||||||
gtk_widget_realize( wxRootWindow );
|
|
||||||
|
|
||||||
/* Nothing to do for 15, 16, 24, 32 bit displays */
|
/* Nothing to do for 15, 16, 24, 32 bit displays */
|
||||||
if (visual->depth > 8) return TRUE;
|
if (visual->depth > 8) return TRUE;
|
||||||
|
|
||||||
@@ -635,6 +632,9 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
if ( !wxTheApp->OnInitGui() )
|
if ( !wxTheApp->OnInitGui() )
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
|
|
||||||
|
wxRootWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||||
|
gtk_widget_realize( wxRootWindow );
|
||||||
|
|
||||||
// Here frames insert themselves automatically into wxTopLevelWindows by
|
// Here frames insert themselves automatically into wxTopLevelWindows by
|
||||||
// getting created in OnInit().
|
// getting created in OnInit().
|
||||||
if ( retValue == 0 )
|
if ( retValue == 0 )
|
||||||
|
@@ -607,6 +607,26 @@ void wxTextCtrl::SetEditable( bool editable )
|
|||||||
gtk_entry_set_editable( GTK_ENTRY(m_text), editable );
|
gtk_entry_set_editable( GTK_ENTRY(m_text), editable );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxTextCtrl::Enable( bool enable )
|
||||||
|
{
|
||||||
|
if (!wxWindowBase::Enable(enable))
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_windowStyle & wxTE_MULTILINE)
|
||||||
|
{
|
||||||
|
gtk_text_set_editable( GTK_TEXT(m_text), enable );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_widget_set_sensitive( m_text, enable );
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
void wxTextCtrl::DiscardEdits()
|
void wxTextCtrl::DiscardEdits()
|
||||||
{
|
{
|
||||||
m_modified = FALSE;
|
m_modified = FALSE;
|
||||||
|
@@ -3241,6 +3241,8 @@ void wxWindow::CaptureMouse()
|
|||||||
(GdkEventMask)
|
(GdkEventMask)
|
||||||
(GDK_BUTTON_PRESS_MASK |
|
(GDK_BUTTON_PRESS_MASK |
|
||||||
GDK_BUTTON_RELEASE_MASK |
|
GDK_BUTTON_RELEASE_MASK |
|
||||||
|
GDK_KEY_PRESS_MASK |
|
||||||
|
GDK_KEY_RELEASE_MASK |
|
||||||
GDK_POINTER_MOTION_HINT_MASK |
|
GDK_POINTER_MOTION_HINT_MASK |
|
||||||
GDK_POINTER_MOTION_MASK),
|
GDK_POINTER_MOTION_MASK),
|
||||||
(GdkWindow *) NULL,
|
(GdkWindow *) NULL,
|
||||||
|
@@ -285,9 +285,6 @@ bool wxApp::OnInitGui()
|
|||||||
visual = vis;
|
visual = vis;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRootWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
|
||||||
gtk_widget_realize( wxRootWindow );
|
|
||||||
|
|
||||||
/* Nothing to do for 15, 16, 24, 32 bit displays */
|
/* Nothing to do for 15, 16, 24, 32 bit displays */
|
||||||
if (visual->depth > 8) return TRUE;
|
if (visual->depth > 8) return TRUE;
|
||||||
|
|
||||||
@@ -635,6 +632,9 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
if ( !wxTheApp->OnInitGui() )
|
if ( !wxTheApp->OnInitGui() )
|
||||||
retValue = -1;
|
retValue = -1;
|
||||||
|
|
||||||
|
wxRootWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||||
|
gtk_widget_realize( wxRootWindow );
|
||||||
|
|
||||||
// Here frames insert themselves automatically into wxTopLevelWindows by
|
// Here frames insert themselves automatically into wxTopLevelWindows by
|
||||||
// getting created in OnInit().
|
// getting created in OnInit().
|
||||||
if ( retValue == 0 )
|
if ( retValue == 0 )
|
||||||
|
@@ -607,6 +607,26 @@ void wxTextCtrl::SetEditable( bool editable )
|
|||||||
gtk_entry_set_editable( GTK_ENTRY(m_text), editable );
|
gtk_entry_set_editable( GTK_ENTRY(m_text), editable );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxTextCtrl::Enable( bool enable )
|
||||||
|
{
|
||||||
|
if (!wxWindowBase::Enable(enable))
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_windowStyle & wxTE_MULTILINE)
|
||||||
|
{
|
||||||
|
gtk_text_set_editable( GTK_TEXT(m_text), enable );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_widget_set_sensitive( m_text, enable );
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
void wxTextCtrl::DiscardEdits()
|
void wxTextCtrl::DiscardEdits()
|
||||||
{
|
{
|
||||||
m_modified = FALSE;
|
m_modified = FALSE;
|
||||||
|
@@ -3241,6 +3241,8 @@ void wxWindow::CaptureMouse()
|
|||||||
(GdkEventMask)
|
(GdkEventMask)
|
||||||
(GDK_BUTTON_PRESS_MASK |
|
(GDK_BUTTON_PRESS_MASK |
|
||||||
GDK_BUTTON_RELEASE_MASK |
|
GDK_BUTTON_RELEASE_MASK |
|
||||||
|
GDK_KEY_PRESS_MASK |
|
||||||
|
GDK_KEY_RELEASE_MASK |
|
||||||
GDK_POINTER_MOTION_HINT_MASK |
|
GDK_POINTER_MOTION_HINT_MASK |
|
||||||
GDK_POINTER_MOTION_MASK),
|
GDK_POINTER_MOTION_MASK),
|
||||||
(GdkWindow *) NULL,
|
(GdkWindow *) NULL,
|
||||||
|
@@ -1,17 +1,23 @@
|
|||||||
#
|
# makefile
|
||||||
# File: makefile.unx
|
|
||||||
# Author: Julian Smart
|
|
||||||
# Created: 1998
|
|
||||||
# Updated:
|
|
||||||
# Copyright: (c) 1998 Julian Smart
|
|
||||||
#
|
|
||||||
# "%W% %G%"
|
|
||||||
#
|
|
||||||
# Makefile for Tex2RTF (Unix)
|
|
||||||
|
|
||||||
PROGRAM=tex2rtf
|
CC = g++
|
||||||
|
|
||||||
|
PROGRAM = tex2rtf
|
||||||
|
|
||||||
OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o
|
OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o
|
||||||
|
|
||||||
include ../../../src/makeprog.env
|
# implementation
|
||||||
|
|
||||||
|
.SUFFIXES: .o .cpp
|
||||||
|
|
||||||
|
.cpp.o :
|
||||||
|
$(CC) -c `wx-config --cflags` -o $@ $<
|
||||||
|
|
||||||
|
all: $(PROGRAM)
|
||||||
|
|
||||||
|
$(PROGRAM): $(OBJECTS)
|
||||||
|
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(PROGRAM)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user