Made wxStubs compile on Unix.
Improvements to doc/view on MDI, including multiple menus for wxFileHistory. Added wxDirExists to wxMSW; moved wxMatchWild to filefn.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,9 +108,6 @@ wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
|
||||
// Extend event processing to search the view's event table
|
||||
bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
if (m_childView)
|
||||
m_childView->Activate(TRUE);
|
||||
|
||||
if ( !m_childView || ! m_childView->ProcessEvent(event) )
|
||||
{
|
||||
// Only hand up to the parent if it's a menu command
|
||||
@@ -127,7 +124,7 @@ void wxDocMDIChildFrame::OnActivate(wxActivateEvent& event)
|
||||
{
|
||||
wxMDIChildFrame::OnActivate(event);
|
||||
|
||||
if (m_childView)
|
||||
if (event.GetActive() && m_childView)
|
||||
m_childView->Activate(event.GetActive());
|
||||
}
|
||||
|
||||
|
@@ -48,6 +48,7 @@
|
||||
#include "wx/printdlg.h"
|
||||
#include "wx/generic/prntdlgg.h"
|
||||
#include "wx/generic/printps.h"
|
||||
#include "wx/confbase.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -290,6 +291,7 @@ bool wxDocument::OnOpenDocument(const wxString& file)
|
||||
}
|
||||
SetFilename(file, TRUE);
|
||||
Modify(FALSE);
|
||||
m_savedYet = TRUE;
|
||||
|
||||
UpdateAllViews();
|
||||
|
||||
@@ -1059,19 +1061,37 @@ wxString wxDocManager::GetHistoryFile(int i) const
|
||||
void wxDocManager::FileHistoryUseMenu(wxMenu *menu)
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->FileHistoryUseMenu(menu);
|
||||
m_fileHistory->UseMenu(menu);
|
||||
}
|
||||
|
||||
void wxDocManager::FileHistoryLoad(const wxString& resourceFile, const wxString& section)
|
||||
void wxDocManager::FileHistoryRemoveMenu(wxMenu *menu)
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->FileHistoryLoad(resourceFile, section);
|
||||
m_fileHistory->RemoveMenu(menu);
|
||||
}
|
||||
|
||||
void wxDocManager::FileHistorySave(const wxString& resourceFile, const wxString& section)
|
||||
void wxDocManager::FileHistoryLoad(wxConfigBase& config)
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->FileHistorySave(resourceFile, section);
|
||||
m_fileHistory->Load(config);
|
||||
}
|
||||
|
||||
void wxDocManager::FileHistorySave(wxConfigBase& config)
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->Save(config);
|
||||
}
|
||||
|
||||
void wxDocManager::FileHistoryAddFilesToMenu(wxMenu* menu)
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->AddFilesToMenu(menu);
|
||||
}
|
||||
|
||||
void wxDocManager::FileHistoryAddFilesToMenu()
|
||||
{
|
||||
if (m_fileHistory)
|
||||
m_fileHistory->AddFilesToMenu();
|
||||
}
|
||||
|
||||
int wxDocManager::GetNoHistoryFiles(void) const
|
||||
@@ -1610,13 +1630,18 @@ bool wxCommandProcessor::Redo(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxCommandProcessor::CanUndo(void)
|
||||
bool wxCommandProcessor::CanUndo(void) const
|
||||
{
|
||||
if (m_currentCommand)
|
||||
return ((wxCommand *)m_currentCommand->Data())->CanUndo();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxCommandProcessor::CanRedo(void) const
|
||||
{
|
||||
return ((m_currentCommand && m_currentCommand->Next()));
|
||||
}
|
||||
|
||||
void wxCommandProcessor::Initialize(void)
|
||||
{
|
||||
m_currentCommand = m_commands.Last();
|
||||
@@ -1704,7 +1729,6 @@ void wxCommandProcessor::ClearCommands(void)
|
||||
wxFileHistory::wxFileHistory(int maxFiles)
|
||||
{
|
||||
m_fileMaxFiles = maxFiles;
|
||||
m_fileMenu = (wxMenu *) NULL;
|
||||
m_fileHistoryN = 0;
|
||||
m_fileHistory = new char *[m_fileMaxFiles];
|
||||
}
|
||||
@@ -1720,18 +1744,14 @@ wxFileHistory::~wxFileHistory(void)
|
||||
// File history management
|
||||
void wxFileHistory::AddFileToHistory(const wxString& file)
|
||||
{
|
||||
if (!m_fileMenu)
|
||||
return;
|
||||
|
||||
int i;
|
||||
|
||||
// Check we don't already have this file
|
||||
for (i = 0; i < m_fileHistoryN; i++)
|
||||
{
|
||||
if (m_fileHistory[i] && wxString(m_fileHistory[i]) == file)
|
||||
return;
|
||||
if (m_fileHistory[i] && wxString(m_fileHistory[i]) == file)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Add to the project file history:
|
||||
// Move existing files (if any) down so we can insert file at beginning.
|
||||
|
||||
@@ -1743,9 +1763,15 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
|
||||
}
|
||||
if (m_fileHistoryN < m_fileMaxFiles)
|
||||
{
|
||||
if (m_fileHistoryN == 0)
|
||||
m_fileMenu->AppendSeparator();
|
||||
m_fileMenu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
|
||||
wxNode* node = m_fileMenus.First();
|
||||
while (node)
|
||||
{
|
||||
wxMenu* menu = (wxMenu*) node->Data();
|
||||
if (m_fileHistoryN == 0)
|
||||
menu->AppendSeparator();
|
||||
menu->Append(wxID_FILE1+m_fileHistoryN, _("[EMPTY]"));
|
||||
node = node->Next();
|
||||
}
|
||||
m_fileHistoryN ++;
|
||||
}
|
||||
// Shuffle filenames down
|
||||
@@ -1760,7 +1786,13 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
|
||||
{
|
||||
char buf[400];
|
||||
sprintf(buf, "&%d %s", i+1, m_fileHistory[i]);
|
||||
m_fileMenu->SetLabel(wxID_FILE1+i, buf);
|
||||
wxNode* node = m_fileMenus.First();
|
||||
while (node)
|
||||
{
|
||||
wxMenu* menu = (wxMenu*) node->Data();
|
||||
menu->SetLabel(wxID_FILE1+i, buf);
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1772,40 +1804,84 @@ wxString wxFileHistory::GetHistoryFile(int i) const
|
||||
return wxString("");
|
||||
}
|
||||
|
||||
void wxFileHistory::FileHistoryUseMenu(wxMenu *menu)
|
||||
void wxFileHistory::UseMenu(wxMenu *menu)
|
||||
{
|
||||
m_fileMenu = menu;
|
||||
if (!m_fileMenus.Member(menu))
|
||||
m_fileMenus.Append(menu);
|
||||
}
|
||||
|
||||
void wxFileHistory::FileHistoryLoad(const wxString& resourceFile, const wxString& section)
|
||||
void wxFileHistory::RemoveMenu(wxMenu *menu)
|
||||
{
|
||||
m_fileMenus.DeleteObject(menu);
|
||||
}
|
||||
|
||||
void wxFileHistory::Load(wxConfigBase& config)
|
||||
{
|
||||
#if USE_RESOURCES
|
||||
m_fileHistoryN = 0;
|
||||
char buf[400];
|
||||
sprintf(buf, "file%d", m_fileHistoryN+1);
|
||||
char *historyFile = (char *) NULL;
|
||||
while ((m_fileHistoryN <= m_fileMaxFiles) && wxGetResource(section, buf, &historyFile, resourceFile) && historyFile)
|
||||
wxString historyFile("");
|
||||
while ((m_fileHistoryN <= m_fileMaxFiles) && config.Read(buf, &historyFile) && (historyFile != ""))
|
||||
{
|
||||
// wxGetResource allocates memory so this is o.k.
|
||||
m_fileHistory[m_fileHistoryN] = historyFile;
|
||||
m_fileHistory[m_fileHistoryN] = copystring((const char*) historyFile);
|
||||
m_fileHistoryN ++;
|
||||
sprintf(buf, "file%d", m_fileHistoryN+1);
|
||||
historyFile = (char *) NULL;
|
||||
historyFile = "";
|
||||
}
|
||||
#endif
|
||||
AddFilesToMenu();
|
||||
}
|
||||
|
||||
void wxFileHistory::FileHistorySave(const wxString& resourceFile, const wxString& section)
|
||||
void wxFileHistory::Save(wxConfigBase& config)
|
||||
{
|
||||
#if USE_RESOURCES
|
||||
char buf[400];
|
||||
int i;
|
||||
for (i = 0; i < m_fileHistoryN; i++)
|
||||
{
|
||||
sprintf(buf, "file%d", i+1);
|
||||
wxWriteResource(section, buf, m_fileHistory[i], resourceFile);
|
||||
wxString buf;
|
||||
buf.Printf("file%d", i+1);
|
||||
config.Write(buf, wxString(m_fileHistory[i]));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxFileHistory::AddFilesToMenu()
|
||||
{
|
||||
if (m_fileHistoryN > 0)
|
||||
{
|
||||
wxNode* node = m_fileMenus.First();
|
||||
while (node)
|
||||
{
|
||||
wxMenu* menu = (wxMenu*) node->Data();
|
||||
menu->AppendSeparator();
|
||||
int i;
|
||||
for (i = 0; i < m_fileHistoryN; i++)
|
||||
{
|
||||
if (m_fileHistory[i])
|
||||
{
|
||||
wxString buf;
|
||||
buf.Printf("&%d %s", i+1, m_fileHistory[i]);
|
||||
menu->Append(wxID_FILE1+i, buf);
|
||||
}
|
||||
}
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxFileHistory::AddFilesToMenu(wxMenu* menu)
|
||||
{
|
||||
if (m_fileHistoryN > 0)
|
||||
{
|
||||
menu->AppendSeparator();
|
||||
int i;
|
||||
for (i = 0; i < m_fileHistoryN; i++)
|
||||
{
|
||||
if (m_fileHistory[i])
|
||||
{
|
||||
wxString buf;
|
||||
buf.Printf("&%d %s", i+1, m_fileHistory[i]);
|
||||
menu->Append(wxID_FILE1+i, buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@@ -1371,3 +1371,160 @@ void WXDLLEXPORT wxSplitPath(const char *pszFileName,
|
||||
pstrExt->Empty();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// wild character routines
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
bool wxIsWild( const wxString& pattern )
|
||||
{
|
||||
wxString tmp = pattern;
|
||||
char *pat = WXSTRINGCAST(tmp);
|
||||
while (*pat) {
|
||||
switch (*pat++) {
|
||||
case '?': case '*': case '[': case '{':
|
||||
return TRUE;
|
||||
case '\\':
|
||||
if (!*pat++)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
|
||||
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
||||
{
|
||||
wxString tmp1 = pat;
|
||||
char *pattern = WXSTRINGCAST(tmp1);
|
||||
wxString tmp2 = text;
|
||||
char *str = WXSTRINGCAST(tmp2);
|
||||
char c;
|
||||
char *cp;
|
||||
bool done = FALSE, ret_code, ok;
|
||||
// Below is for vi fans
|
||||
const char OB = '{', CB = '}';
|
||||
|
||||
// dot_special means '.' only matches '.'
|
||||
if (dot_special && *str == '.' && *pattern != *str)
|
||||
return FALSE;
|
||||
|
||||
while ((*pattern != '\0') && (!done)
|
||||
&& (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
|
||||
switch (*pattern) {
|
||||
case '\\':
|
||||
pattern++;
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
break;
|
||||
case '*':
|
||||
pattern++;
|
||||
ret_code = FALSE;
|
||||
while ((*str!='\0')
|
||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
||||
/*loop*/;
|
||||
if (ret_code) {
|
||||
while (*str != '\0')
|
||||
str++;
|
||||
while (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
case '[':
|
||||
pattern++;
|
||||
repeat:
|
||||
if ((*pattern == '\0') || (*pattern == ']')) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*(pattern + 1) == '-') {
|
||||
c = *pattern;
|
||||
pattern += 2;
|
||||
if (*pattern == ']') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((*str < c) || (*str > *pattern)) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
} else if (*pattern != *str) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
pattern++;
|
||||
while ((*pattern != ']') && (*pattern != '\0')) {
|
||||
if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
|
||||
pattern++;
|
||||
pattern++;
|
||||
}
|
||||
if (*pattern != '\0') {
|
||||
pattern++, str++;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
pattern++;
|
||||
str++;
|
||||
break;
|
||||
case OB:
|
||||
pattern++;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
cp = str;
|
||||
ok = TRUE;
|
||||
while (ok && (*cp != '\0') && (*pattern != '\0')
|
||||
&& (*pattern != ',') && (*pattern != CB)) {
|
||||
if (*pattern == '\\')
|
||||
pattern++;
|
||||
ok = (*pattern++ == *cp++);
|
||||
}
|
||||
if (*pattern == '\0') {
|
||||
ok = FALSE;
|
||||
done = TRUE;
|
||||
break;
|
||||
} else if (ok) {
|
||||
str = cp;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB)
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB || *pattern == ',')
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (*str == *pattern) {
|
||||
str++, pattern++;
|
||||
} else {
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (*pattern == '*')
|
||||
pattern++;
|
||||
return ((*str == '\0') && (*pattern == '\0'));
|
||||
};
|
||||
|
||||
|
@@ -31,6 +31,9 @@
|
||||
#include <wx/timer.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
// Not enough OS behaviour defined for wxStubs
|
||||
#ifndef __WXSTUBS__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -1537,3 +1540,6 @@ HWND wxSocketHandler::GetHWND() const
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __WXSTUBS__
|
||||
|
@@ -41,7 +41,7 @@ wxZlibInputStream::wxZlibInputStream(wxInputStream& stream)
|
||||
|
||||
m_inflate.zalloc = (alloc_func)0;
|
||||
m_inflate.zfree = (free_func)0;
|
||||
m_inflate.opaque = (voidpf)0;
|
||||
m_inflate.opaque = (void*)0;
|
||||
|
||||
err = inflateInit(&m_inflate);
|
||||
if (err != Z_OK) {
|
||||
@@ -107,7 +107,7 @@ wxZlibOutputStream::wxZlibOutputStream(wxOutputStream& stream)
|
||||
|
||||
m_deflate.zalloc = (alloc_func)0;
|
||||
m_deflate.zfree = (free_func)0;
|
||||
m_deflate.opaque = (voidpf)0;
|
||||
m_deflate.opaque = (void*)0;
|
||||
|
||||
err = deflateInit(&m_deflate, Z_DEFAULT_COMPRESSION);
|
||||
if (err != Z_OK) {
|
||||
|
@@ -542,7 +542,7 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
|
||||
if (hilight)
|
||||
dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
||||
else
|
||||
dc->SetTextForeground( info->GetColour() );
|
||||
dc->SetTextForeground( * info->GetColour() );
|
||||
dc->DrawText( s, info->GetX()+2, info->GetY() );
|
||||
dc->DestroyClippingRegion();
|
||||
node = node->Next();
|
||||
@@ -565,7 +565,7 @@ void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG )
|
||||
if (hilight)
|
||||
dc->SetTextForeground( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
||||
else
|
||||
dc->SetTextForeground( item->GetColour() );
|
||||
dc->SetTextForeground( * item->GetColour() );
|
||||
dc->DrawText( s, m_bound_label.x, m_bound_label.y );
|
||||
}
|
||||
}
|
||||
@@ -978,9 +978,9 @@ void wxListMainWindow::HilightAll( bool on )
|
||||
|
||||
void wxListMainWindow::ActivateLine( wxListLineData *line )
|
||||
{
|
||||
if (!m_parent) return;
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, m_parent->GetId() );
|
||||
le.SetEventObject( m_parent );
|
||||
if (!GetParent()) return;
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_code = 0;
|
||||
le.m_itemIndex = GetIndexOfLine( line );
|
||||
le.m_col = 0;
|
||||
@@ -990,9 +990,9 @@ void wxListMainWindow::ActivateLine( wxListLineData *line )
|
||||
|
||||
void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
|
||||
{
|
||||
if (!m_parent) return;
|
||||
wxListEvent le( command, m_parent->GetId() );
|
||||
le.SetEventObject( m_parent );
|
||||
if (!GetParent()) return;
|
||||
wxListEvent le( command, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_code = 0;
|
||||
le.m_itemIndex = GetIndexOfLine( line );
|
||||
le.m_col = 0;
|
||||
@@ -1032,10 +1032,10 @@ void wxListMainWindow::StartLabelEdit( wxListLineData *line )
|
||||
|
||||
void wxListMainWindow::RenameLine( wxListLineData *line, const wxString &newName )
|
||||
{
|
||||
if (!m_parent) return;
|
||||
if (!GetParent()) return;
|
||||
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, m_parent->GetId() );
|
||||
le.SetEventObject( m_parent );
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
|
||||
le.SetEventObject( GetParent() );
|
||||
le.m_code = 0;
|
||||
le.m_itemIndex = GetIndexOfLine( line );
|
||||
le.m_col = 0;
|
||||
@@ -1087,7 +1087,7 @@ void wxListMainWindow::OnRenameAccept()
|
||||
|
||||
void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
{
|
||||
if (m_parent->ProcessEvent( event)) return;
|
||||
if (GetParent()->ProcessEvent( event)) return;
|
||||
|
||||
if (!m_current) return;
|
||||
if (m_dirty) return;
|
||||
@@ -1117,7 +1117,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
if (event.Dragging() && (m_dragCount > 3))
|
||||
{
|
||||
m_dragCount = 0;
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, m_parent->GetId() );
|
||||
wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
|
||||
le.SetEventObject( this );
|
||||
le.m_code = 0;
|
||||
le.m_itemIndex = 0;
|
||||
@@ -1398,11 +1398,11 @@ void wxListMainWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
m_hasFocus = TRUE;
|
||||
RefreshLine( m_current );
|
||||
|
||||
if (!m_parent) return;
|
||||
if (!GetParent()) return;
|
||||
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, m_parent->GetId() );
|
||||
event.SetEventObject( m_parent );
|
||||
m_parent->ProcessEvent( event );
|
||||
wxFocusEvent event( wxEVT_SET_FOCUS, GetParent()->GetId() );
|
||||
event.SetEventObject( GetParent() );
|
||||
GetParent()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
void wxListMainWindow::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
@@ -2054,7 +2054,7 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
|
||||
|
||||
bool wxListMainWindow::OnListNotify( wxListEvent &event )
|
||||
{
|
||||
if (m_parent) m_parent->ProcessEvent( event );
|
||||
if (GetParent()) GetParent()->ProcessEvent( event );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@@ -198,162 +198,6 @@ bool wxDirExists( const wxString& dir )
|
||||
return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// wild character routines
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
bool wxIsWild( const wxString& pattern )
|
||||
{
|
||||
wxString tmp = pattern;
|
||||
char *pat = WXSTRINGCAST(tmp);
|
||||
while (*pat) {
|
||||
switch (*pat++) {
|
||||
case '?': case '*': case '[': case '{':
|
||||
return TRUE;
|
||||
case '\\':
|
||||
if (!*pat++)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
|
||||
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
||||
{
|
||||
wxString tmp1 = pat;
|
||||
char *pattern = WXSTRINGCAST(tmp1);
|
||||
wxString tmp2 = text;
|
||||
char *str = WXSTRINGCAST(tmp2);
|
||||
char c;
|
||||
char *cp;
|
||||
bool done = FALSE, ret_code, ok;
|
||||
// Below is for vi fans
|
||||
const char OB = '{', CB = '}';
|
||||
|
||||
// dot_special means '.' only matches '.'
|
||||
if (dot_special && *str == '.' && *pattern != *str)
|
||||
return FALSE;
|
||||
|
||||
while ((*pattern != '\0') && (!done)
|
||||
&& (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
|
||||
switch (*pattern) {
|
||||
case '\\':
|
||||
pattern++;
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
break;
|
||||
case '*':
|
||||
pattern++;
|
||||
ret_code = FALSE;
|
||||
while ((*str!='\0')
|
||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
||||
/*loop*/;
|
||||
if (ret_code) {
|
||||
while (*str != '\0')
|
||||
str++;
|
||||
while (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
case '[':
|
||||
pattern++;
|
||||
repeat:
|
||||
if ((*pattern == '\0') || (*pattern == ']')) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*(pattern + 1) == '-') {
|
||||
c = *pattern;
|
||||
pattern += 2;
|
||||
if (*pattern == ']') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((*str < c) || (*str > *pattern)) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
} else if (*pattern != *str) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
pattern++;
|
||||
while ((*pattern != ']') && (*pattern != '\0')) {
|
||||
if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
|
||||
pattern++;
|
||||
pattern++;
|
||||
}
|
||||
if (*pattern != '\0') {
|
||||
pattern++, str++;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
pattern++;
|
||||
str++;
|
||||
break;
|
||||
case OB:
|
||||
pattern++;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
cp = str;
|
||||
ok = TRUE;
|
||||
while (ok && (*cp != '\0') && (*pattern != '\0')
|
||||
&& (*pattern != ',') && (*pattern != CB)) {
|
||||
if (*pattern == '\\')
|
||||
pattern++;
|
||||
ok = (*pattern++ == *cp++);
|
||||
}
|
||||
if (*pattern == '\0') {
|
||||
ok = FALSE;
|
||||
done = TRUE;
|
||||
break;
|
||||
} else if (ok) {
|
||||
str = cp;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB)
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB || *pattern == ',')
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (*str == *pattern) {
|
||||
str++, pattern++;
|
||||
} else {
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (*pattern == '*')
|
||||
pattern++;
|
||||
return ((*str == '\0') && (*pattern == '\0'));
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// subprocess routines
|
||||
//------------------------------------------------------------------------
|
||||
|
@@ -198,162 +198,6 @@ bool wxDirExists( const wxString& dir )
|
||||
return ((stat(buf, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE);
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// wild character routines
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
bool wxIsWild( const wxString& pattern )
|
||||
{
|
||||
wxString tmp = pattern;
|
||||
char *pat = WXSTRINGCAST(tmp);
|
||||
while (*pat) {
|
||||
switch (*pat++) {
|
||||
case '?': case '*': case '[': case '{':
|
||||
return TRUE;
|
||||
case '\\':
|
||||
if (!*pat++)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
|
||||
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
||||
{
|
||||
wxString tmp1 = pat;
|
||||
char *pattern = WXSTRINGCAST(tmp1);
|
||||
wxString tmp2 = text;
|
||||
char *str = WXSTRINGCAST(tmp2);
|
||||
char c;
|
||||
char *cp;
|
||||
bool done = FALSE, ret_code, ok;
|
||||
// Below is for vi fans
|
||||
const char OB = '{', CB = '}';
|
||||
|
||||
// dot_special means '.' only matches '.'
|
||||
if (dot_special && *str == '.' && *pattern != *str)
|
||||
return FALSE;
|
||||
|
||||
while ((*pattern != '\0') && (!done)
|
||||
&& (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
|
||||
switch (*pattern) {
|
||||
case '\\':
|
||||
pattern++;
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
break;
|
||||
case '*':
|
||||
pattern++;
|
||||
ret_code = FALSE;
|
||||
while ((*str!='\0')
|
||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
||||
/*loop*/;
|
||||
if (ret_code) {
|
||||
while (*str != '\0')
|
||||
str++;
|
||||
while (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
case '[':
|
||||
pattern++;
|
||||
repeat:
|
||||
if ((*pattern == '\0') || (*pattern == ']')) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*(pattern + 1) == '-') {
|
||||
c = *pattern;
|
||||
pattern += 2;
|
||||
if (*pattern == ']') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((*str < c) || (*str > *pattern)) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
} else if (*pattern != *str) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
pattern++;
|
||||
while ((*pattern != ']') && (*pattern != '\0')) {
|
||||
if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
|
||||
pattern++;
|
||||
pattern++;
|
||||
}
|
||||
if (*pattern != '\0') {
|
||||
pattern++, str++;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
pattern++;
|
||||
str++;
|
||||
break;
|
||||
case OB:
|
||||
pattern++;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
cp = str;
|
||||
ok = TRUE;
|
||||
while (ok && (*cp != '\0') && (*pattern != '\0')
|
||||
&& (*pattern != ',') && (*pattern != CB)) {
|
||||
if (*pattern == '\\')
|
||||
pattern++;
|
||||
ok = (*pattern++ == *cp++);
|
||||
}
|
||||
if (*pattern == '\0') {
|
||||
ok = FALSE;
|
||||
done = TRUE;
|
||||
break;
|
||||
} else if (ok) {
|
||||
str = cp;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB)
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB || *pattern == ',')
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (*str == *pattern) {
|
||||
str++, pattern++;
|
||||
} else {
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (*pattern == '*')
|
||||
pattern++;
|
||||
return ((*str == '\0') && (*pattern == '\0'));
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// subprocess routines
|
||||
//------------------------------------------------------------------------
|
||||
|
121
src/make.env
Normal file
121
src/make.env
Normal file
@@ -0,0 +1,121 @@
|
||||
# generic.env
|
||||
# Linux/generic
|
||||
#
|
||||
# Common makefile settings for wxWindows programs
|
||||
# This file is included by all the other makefiles, thus changes
|
||||
# made here take effect everywhere (except where overriden).
|
||||
#
|
||||
# An alternative to editing this file is to create a shell script
|
||||
# to export specific variables, and call make with the -e switch
|
||||
# to override makefile variables. See wx/install/install.txt.
|
||||
# And you can override specific variables on the make command line, e.g.
|
||||
#
|
||||
# make -f makefile.unix DEBUG=''
|
||||
#
|
||||
# You may prefer to use the GNU configure script than raw makefiles -
|
||||
# see contrib/wxshlib.
|
||||
#
|
||||
|
||||
########################### Programs #################################
|
||||
|
||||
# Replace this with your own path if necessary
|
||||
WXDIR = /home/jacs/wx2
|
||||
|
||||
# C++ compiler
|
||||
CC = g++
|
||||
|
||||
# C compiler
|
||||
CCC = gcc
|
||||
|
||||
# Compiler for lex/yacc .c programs
|
||||
CCLEX = $(CCC)
|
||||
|
||||
LEX = lex
|
||||
YACC = yacc
|
||||
MAKE = make
|
||||
AROPTIONS = ruv
|
||||
RANLIB = ranlib
|
||||
|
||||
############################ Switches #################################
|
||||
|
||||
# Debug/trace mode. 1 or more for debugging.
|
||||
DEBUG = 0
|
||||
GUI = -D__WXSTUBS__ -D__LINUX__ -D__UNIX__
|
||||
GUISUFFIX = _stubs
|
||||
|
||||
########################## Compiler flags #############################
|
||||
|
||||
# Misc options
|
||||
OPTIONS = -D__WXDEBUG__ -DWXDEBUG
|
||||
COPTIONS =
|
||||
DEBUGFLAGS = -ggdb
|
||||
INCLUDE =
|
||||
WARN = -Wall -Wno-unused # -w
|
||||
CWARN = -Wall -Wno-unused # -w
|
||||
OPT = # -O2
|
||||
|
||||
############################ Includes #################################
|
||||
|
||||
# Compiler or system-specific include paths
|
||||
COMPPATHS =
|
||||
XINCLUDE = -I/usr/openwin/include -I/usr/include/X11 -I/usr/include/Xm \
|
||||
-I/usr/include/X11/Xm -I/usr/include
|
||||
XLIB = -L/usr/local/X11/lib -L/usr/openwin/lib -L/usr/X11/lib -L/usr/X11R6/lib
|
||||
|
||||
############################ Libraries ################################
|
||||
|
||||
COMPLIBS = -lstdc++
|
||||
GUILDLIBS = -lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm
|
||||
|
||||
############################# Suffixes ################################
|
||||
|
||||
# Change cpp to c if you want to use main.c instead of main.cpp.
|
||||
# Edit wx_setup.h accordingly (USE_C_MAIN=1)
|
||||
|
||||
OBJSUFF =o
|
||||
SRCSUFF =cpp
|
||||
MAINSUFF =cpp
|
||||
|
||||
####################### No changes below this line ####################
|
||||
|
||||
WXINC = $(WXDIR)/include
|
||||
WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
|
||||
INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
|
||||
|
||||
# Directory for object files
|
||||
OBJDIR = objects$(GUISUFFIX)
|
||||
|
||||
CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
|
||||
CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
|
||||
LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
|
||||
LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
|
||||
|
||||
# Clears all default suffixes
|
||||
.SUFFIXES: .o .cpp .c
|
||||
|
||||
.c.o :
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c $(CPPFLAGS) -o $@ $<
|
||||
|
||||
####################### Targets to allow multiple GUIs ####################
|
||||
|
||||
dummy:
|
||||
echo Use a target: one of motif, stubs
|
||||
|
||||
stubs:
|
||||
make -f makefile.unx all GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
||||
|
||||
motif:
|
||||
make -f makefile.unx all GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
||||
|
||||
cleanstubs:
|
||||
make -f makefile.unx clean GUI='-D__WXSTUBS__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_stubs' GUILDLIBS='-lwx_stubs $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
||||
|
||||
cleanmotif:
|
||||
make -f makefile.unx clean GUI='-D__WXMOTIF__ -D__LINUX__ -D__UNIX__' GUISUFFIX='_motif' GUILDLIBS='-lwx_motif $(COMPLIBS) -lXm -lXmu -lXt -lX11 -lm'
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
11
src/makeprog.env
Normal file
11
src/makeprog.env
Normal file
@@ -0,0 +1,11 @@
|
||||
# Replace this with your own path if necessary
|
||||
WXDIR = /home/jacs/wx2
|
||||
include $(WXDIR)/src/make.env
|
||||
|
||||
all: $(PROGRAM)$(GUISUFFIX)
|
||||
|
||||
$(PROGRAM)$(GUISUFFIX): $(OBJECTS) $(WXLIB)
|
||||
$(CC) $(LDFLAGS) -o $(PROGRAM)$(GUISUFFIX) $(OBJECTS) $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) minimal$(GUISUFFIX) core
|
@@ -108,9 +108,13 @@ wxMetaFileDC::wxMetaFileDC(const wxString& file)
|
||||
|
||||
if (!file.IsNull() && wxFileExists(file))
|
||||
wxRemoveFile(file);
|
||||
m_hDC = (WXHDC) CreateMetaFile(file);
|
||||
|
||||
m_ok = TRUE;
|
||||
if (!file.IsNull() && (file != ""))
|
||||
m_hDC = (WXHDC) CreateMetaFile(file);
|
||||
else
|
||||
m_hDC = (WXHDC) CreateMetaFile(NULL);
|
||||
|
||||
m_ok = (m_hDC != (WXHDC) 0) ;
|
||||
|
||||
// Actual Windows mapping mode, for future reference.
|
||||
m_windowsMappingMode = MM_TEXT;
|
||||
@@ -145,12 +149,12 @@ wxMetaFileDC::~wxMetaFileDC(void)
|
||||
m_hDC = 0;
|
||||
}
|
||||
|
||||
void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
|
||||
float *descent, float *externalLeading, wxFont *theFont, bool use16bit)
|
||||
void wxMetaFileDC::GetTextExtent(const wxString& string, long *x, long *y,
|
||||
long *descent, long *externalLeading, wxFont *theFont, bool use16bit) const
|
||||
{
|
||||
wxFont *fontToUse = theFont;
|
||||
if (!fontToUse)
|
||||
fontToUse = &m_font;
|
||||
fontToUse = (wxFont*) &m_font;
|
||||
|
||||
HDC dc = GetDC(NULL);
|
||||
|
||||
@@ -161,10 +165,10 @@ void wxMetaFileDC::GetTextExtent(const wxString& string, float *x, float *y,
|
||||
|
||||
ReleaseDC(NULL, dc);
|
||||
|
||||
*x = (float)XDEV2LOGREL(sizeRect.cx);
|
||||
*y = (float)YDEV2LOGREL(sizeRect.cy);
|
||||
if (descent) *descent = (float)tm.tmDescent;
|
||||
if (externalLeading) *externalLeading = (float)tm.tmExternalLeading;
|
||||
*x = XDEV2LOGREL(sizeRect.cx);
|
||||
*y = YDEV2LOGREL(sizeRect.cy);
|
||||
if (descent) *descent = tm.tmDescent;
|
||||
if (externalLeading) *externalLeading = tm.tmExternalLeading;
|
||||
}
|
||||
|
||||
wxMetaFile *wxMetaFileDC::Close(void)
|
||||
|
@@ -697,3 +697,196 @@ void wxDisplaySize(int *width, int *height)
|
||||
ReleaseDC(NULL, dc);
|
||||
}
|
||||
|
||||
bool wxDirExists(const wxString& dir)
|
||||
{
|
||||
/* MATTHEW: [6] Always use same code for Win32, call FindClose */
|
||||
#if defined(__WIN32__)
|
||||
WIN32_FIND_DATA fileInfo;
|
||||
#else
|
||||
#ifdef __BORLANDC__
|
||||
struct ffblk fileInfo;
|
||||
#else
|
||||
struct find_t fileInfo;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__WIN32__)
|
||||
HANDLE h = FindFirstFile((LPTSTR) WXSTRINGCAST dir,(LPWIN32_FIND_DATA)&fileInfo);
|
||||
|
||||
if (h==INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
else {
|
||||
FindClose(h);
|
||||
return ((fileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY);
|
||||
}
|
||||
#else
|
||||
// In Borland findfirst has a different argument
|
||||
// ordering from _dos_findfirst. But _dos_findfirst
|
||||
// _should_ be ok in both MS and Borland... why not?
|
||||
#ifdef __BORLANDC__
|
||||
return ((findfirst(WXSTRINGCAST dir, &fileInfo, _A_SUBDIR) == 0 && (fileInfo.ff_attrib & _A_SUBDIR) != 0));
|
||||
#else
|
||||
return (((_dos_findfirst(WXSTRINGCAST dir, _A_SUBDIR, &fileInfo) == 0) && (fileInfo.attrib & _A_SUBDIR)) != 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
//------------------------------------------------------------------------
|
||||
// wild character routines
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
bool wxIsWild( const wxString& pattern )
|
||||
{
|
||||
wxString tmp = pattern;
|
||||
char *pat = WXSTRINGCAST(tmp);
|
||||
while (*pat) {
|
||||
switch (*pat++) {
|
||||
case '?': case '*': case '[': case '{':
|
||||
return TRUE;
|
||||
case '\\':
|
||||
if (!*pat++)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
};
|
||||
|
||||
|
||||
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
||||
{
|
||||
wxString tmp1 = pat;
|
||||
char *pattern = WXSTRINGCAST(tmp1);
|
||||
wxString tmp2 = text;
|
||||
char *str = WXSTRINGCAST(tmp2);
|
||||
char c;
|
||||
char *cp;
|
||||
bool done = FALSE, ret_code, ok;
|
||||
// Below is for vi fans
|
||||
const char OB = '{', CB = '}';
|
||||
|
||||
// dot_special means '.' only matches '.'
|
||||
if (dot_special && *str == '.' && *pattern != *str)
|
||||
return FALSE;
|
||||
|
||||
while ((*pattern != '\0') && (!done)
|
||||
&& (((*str=='\0')&&((*pattern==OB)||(*pattern=='*')))||(*str!='\0'))) {
|
||||
switch (*pattern) {
|
||||
case '\\':
|
||||
pattern++;
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
break;
|
||||
case '*':
|
||||
pattern++;
|
||||
ret_code = FALSE;
|
||||
while ((*str!='\0')
|
||||
&& (!(ret_code=wxMatchWild(pattern, str++, FALSE))))
|
||||
/*loop*/;
|
||||
if (ret_code) {
|
||||
while (*str != '\0')
|
||||
str++;
|
||||
while (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
case '[':
|
||||
pattern++;
|
||||
repeat:
|
||||
if ((*pattern == '\0') || (*pattern == ']')) {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*(pattern + 1) == '-') {
|
||||
c = *pattern;
|
||||
pattern += 2;
|
||||
if (*pattern == ']') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
if (*pattern == '\\') {
|
||||
pattern++;
|
||||
if (*pattern == '\0') {
|
||||
done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((*str < c) || (*str > *pattern)) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
} else if (*pattern != *str) {
|
||||
pattern++;
|
||||
goto repeat;
|
||||
}
|
||||
pattern++;
|
||||
while ((*pattern != ']') && (*pattern != '\0')) {
|
||||
if ((*pattern == '\\') && (*(pattern + 1) != '\0'))
|
||||
pattern++;
|
||||
pattern++;
|
||||
}
|
||||
if (*pattern != '\0') {
|
||||
pattern++, str++;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
pattern++;
|
||||
str++;
|
||||
break;
|
||||
case OB:
|
||||
pattern++;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
cp = str;
|
||||
ok = TRUE;
|
||||
while (ok && (*cp != '\0') && (*pattern != '\0')
|
||||
&& (*pattern != ',') && (*pattern != CB)) {
|
||||
if (*pattern == '\\')
|
||||
pattern++;
|
||||
ok = (*pattern++ == *cp++);
|
||||
}
|
||||
if (*pattern == '\0') {
|
||||
ok = FALSE;
|
||||
done = TRUE;
|
||||
break;
|
||||
} else if (ok) {
|
||||
str = cp;
|
||||
while ((*pattern != CB) && (*pattern != '\0')) {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB)
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (*pattern!=CB && *pattern!=',' && *pattern!='\0') {
|
||||
if (*++pattern == '\\') {
|
||||
if (*++pattern == CB || *pattern == ',')
|
||||
pattern++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*pattern != '\0')
|
||||
pattern++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (*str == *pattern) {
|
||||
str++, pattern++;
|
||||
} else {
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (*pattern == '*')
|
||||
pattern++;
|
||||
return ((*str == '\0') && (*pattern == '\0'));
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
201
src/stubs.inc
Normal file
201
src/stubs.inc
Normal file
@@ -0,0 +1,201 @@
|
||||
# needed for unactivated
|
||||
NONE =
|
||||
|
||||
# define library name
|
||||
LIB_TARGET=wx_stubs
|
||||
LIB_MAJOR=1
|
||||
LIB_MINOR=0
|
||||
|
||||
# define library sources
|
||||
|
||||
LIB_CPP_SRC=\
|
||||
\
|
||||
common/cmndata.cpp \
|
||||
common/config.cpp \
|
||||
common/date.cpp \
|
||||
common/docmdi.cpp \
|
||||
common/docview.cpp \
|
||||
common/dynarray.cpp \
|
||||
common/dynlib.cpp \
|
||||
common/event.cpp \
|
||||
common/file.cpp \
|
||||
common/fileconf.cpp \
|
||||
common/filefn.cpp \
|
||||
common/gdicmn.cpp \
|
||||
common/hash.cpp \
|
||||
common/helpbase.cpp \
|
||||
common/intl.cpp \
|
||||
common/ipcbase.cpp \
|
||||
common/layout.cpp \
|
||||
common/list.cpp \
|
||||
common/log.cpp \
|
||||
common/matrix.cpp \
|
||||
common/memory.cpp \
|
||||
common/module.cpp \
|
||||
common/object.cpp \
|
||||
common/odbc.cpp \
|
||||
common/postscrp.cpp \
|
||||
common/prntbase.cpp \
|
||||
common/resource.cpp \
|
||||
common/serbase.cpp \
|
||||
common/string.cpp \
|
||||
common/textfile.cpp \
|
||||
common/time.cpp \
|
||||
common/timercmn.cpp \
|
||||
common/utilscmn.cpp \
|
||||
common/wincmn.cpp \
|
||||
common/framecmn.cpp \
|
||||
common/stream.cpp \
|
||||
common/datstrm.cpp \
|
||||
common/fstream.cpp \
|
||||
common/mstream.cpp \
|
||||
common/zstream.cpp \
|
||||
common/objstrm.cpp \
|
||||
common/sckstrm.cpp \
|
||||
common/validate.cpp \
|
||||
common/valtext.cpp \
|
||||
common/variant.cpp \
|
||||
common/wxexpr.cpp \
|
||||
common/socket.cpp \
|
||||
common/sckaddr.cpp \
|
||||
common/sckipc.cpp \
|
||||
common/protocol.cpp \
|
||||
common/ftp.cpp \
|
||||
common/http.cpp \
|
||||
common/url.cpp \
|
||||
common/tokenzr.cpp \
|
||||
\
|
||||
stubs/accel.cpp \
|
||||
stubs/app.cpp \
|
||||
stubs/bitmap.cpp \
|
||||
stubs/bmpbuttn.cpp \
|
||||
stubs/brush.cpp \
|
||||
stubs/button.cpp \
|
||||
stubs/checkbox.cpp \
|
||||
stubs/choice.cpp \
|
||||
stubs/clipbrd.cpp \
|
||||
stubs/colour.cpp \
|
||||
stubs/colordlg.cpp \
|
||||
stubs/control.cpp \
|
||||
stubs/combobox.cpp \
|
||||
stubs/cursor.cpp \
|
||||
stubs/data.cpp \
|
||||
stubs/dc.cpp \
|
||||
stubs/dcclient.cpp \
|
||||
stubs/dcmemory.cpp \
|
||||
stubs/dcscreen.cpp \
|
||||
stubs/dialog.cpp \
|
||||
stubs/dirdlg.cpp \
|
||||
stubs/dnd.cpp \
|
||||
stubs/filedlg.cpp \
|
||||
stubs/font.cpp \
|
||||
stubs/fontdlg.cpp \
|
||||
stubs/frame.cpp \
|
||||
stubs/gauge.cpp \
|
||||
stubs/gdiobj.cpp \
|
||||
stubs/helpxxxx.cpp \
|
||||
stubs/icon.cpp \
|
||||
stubs/imaglist.cpp \
|
||||
stubs/listbox.cpp \
|
||||
stubs/joystick.cpp \
|
||||
stubs/main.cpp \
|
||||
stubs/mdi.cpp \
|
||||
stubs/menu.cpp \
|
||||
stubs/menuitem.cpp \
|
||||
stubs/metafile.cpp \
|
||||
stubs/minifram.cpp \
|
||||
stubs/msgdlg.cpp \
|
||||
stubs/notebook.cpp \
|
||||
stubs/palette.cpp \
|
||||
stubs/pen.cpp \
|
||||
stubs/print.cpp \
|
||||
stubs/radiobox.cpp \
|
||||
stubs/radiobut.cpp \
|
||||
stubs/region.cpp \
|
||||
stubs/scrolbar.cpp \
|
||||
stubs/settings.cpp \
|
||||
stubs/slider.cpp \
|
||||
stubs/spinbutt.cpp \
|
||||
stubs/statbox.cpp \
|
||||
stubs/statbmp.cpp \
|
||||
stubs/stattext.cpp \
|
||||
stubs/statusbr.cpp \
|
||||
stubs/taskbar.cpp \
|
||||
stubs/textctrl.cpp \
|
||||
stubs/thread.cpp \
|
||||
stubs/timer.cpp \
|
||||
stubs/toolbar.cpp \
|
||||
stubs/treectrl.cpp \
|
||||
stubs/utils.cpp \
|
||||
stubs/utilsexc.cpp \
|
||||
stubs/wave.cpp \
|
||||
stubs/window.cpp \
|
||||
\
|
||||
generic/choicdgg.cpp \
|
||||
generic/colrdlgg.cpp \
|
||||
generic/fontdlgg.cpp \
|
||||
generic/gridg.cpp \
|
||||
generic/imaglist.cpp \
|
||||
generic/listctrl.cpp \
|
||||
generic/laywin.cpp \
|
||||
generic/msgdlgg.cpp \
|
||||
generic/panelg.cpp \
|
||||
generic/printps.cpp \
|
||||
generic/prntdlgg.cpp \
|
||||
generic/sashwin.cpp \
|
||||
generic/scrolwin.cpp \
|
||||
generic/splitter.cpp \
|
||||
generic/statusbr.cpp \
|
||||
generic/tabg.cpp \
|
||||
generic/textdlgg.cpp \
|
||||
generic/treectrl.cpp
|
||||
|
||||
|
||||
LIB_C_SRC=\
|
||||
common/extended.c \
|
||||
png/png.c \
|
||||
png/pngset.c \
|
||||
png/pngget.c \
|
||||
png/pngrutil.c \
|
||||
png/pngtrans.c \
|
||||
png/pngwutil.c \
|
||||
png/pngread.c \
|
||||
png/pngrio.c \
|
||||
png/pngwio.c \
|
||||
png/pngwrite.c \
|
||||
png/pngrtran.c \
|
||||
png/pngwtran.c \
|
||||
png/pngmem.c \
|
||||
png/pngerror.c \
|
||||
png/pngpread.c \
|
||||
\
|
||||
zlib/adler32.c \
|
||||
zlib/compress.c \
|
||||
zlib/crc32.c \
|
||||
zlib/gzio.c \
|
||||
zlib/uncompr.c \
|
||||
zlib/deflate.c \
|
||||
zlib/trees.c \
|
||||
zlib/zutil.c \
|
||||
zlib/inflate.c \
|
||||
zlib/infblock.c \
|
||||
zlib/inftrees.c \
|
||||
zlib/infcodes.c \
|
||||
zlib/infutil.c \
|
||||
zlib/inffast.c \
|
||||
\
|
||||
iodbc/dlf.c \
|
||||
iodbc/dlproc.c \
|
||||
iodbc/herr.c \
|
||||
iodbc/henv.c \
|
||||
iodbc/hdbc.c \
|
||||
iodbc/hstmt.c \
|
||||
iodbc/connect.c \
|
||||
iodbc/prepare.c \
|
||||
iodbc/result.c \
|
||||
iodbc/execute.c \
|
||||
iodbc/fetch.c \
|
||||
iodbc/info.c \
|
||||
iodbc/catalog.c \
|
||||
iodbc/misc.c \
|
||||
iodbc/itrace.c
|
@@ -95,6 +95,7 @@ void wxApp::CommonCleanUp()
|
||||
wxDeleteStockObjects() ;
|
||||
|
||||
// Destroy all GDI lists, etc.
|
||||
|
||||
delete wxTheBrushList;
|
||||
wxTheBrushList = NULL;
|
||||
|
||||
@@ -121,6 +122,10 @@ void wxApp::CommonCleanUp()
|
||||
delete[] wxBuffer;
|
||||
wxBuffer = NULL;
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
|
||||
// do it as the very last thing because everything else can log messages
|
||||
wxLog::DontCreateOnDemand();
|
||||
// do it as the very last thing because everything else can log messages
|
||||
delete wxLog::SetActiveTarget(NULL);
|
||||
}
|
||||
@@ -177,12 +182,21 @@ int wxEntry( int argc, char *argv[] )
|
||||
int retValue = 0;
|
||||
|
||||
if (wxTheApp->Initialized()) retValue = wxTheApp->OnRun();
|
||||
|
||||
if (wxTheApp->GetTopWindow())
|
||||
{
|
||||
delete wxTheApp->GetTopWindow();
|
||||
wxTheApp->SetTopWindow(NULL);
|
||||
}
|
||||
|
||||
wxTheApp->DeletePendingObjects();
|
||||
|
||||
wxTheApp->OnExit();
|
||||
|
||||
wxApp::CommonCleanUp();
|
||||
|
||||
delete wxTheApp;
|
||||
wxTheApp = NULL;
|
||||
|
||||
#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
|
||||
// At this point we want to check if there are any memory
|
||||
|
@@ -289,3 +289,6 @@ void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void wxDialog::Fit()
|
||||
{
|
||||
}
|
||||
|
@@ -99,21 +99,21 @@ wxDataFormat wxFileDropTarget::GetFormat(size_t WXUNUSED(n)) const
|
||||
wxDropSource::wxDropSource( wxWindow *win )
|
||||
{
|
||||
// TODO
|
||||
m_window = win;
|
||||
// m_window = win;
|
||||
m_data = NULL;
|
||||
|
||||
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
||||
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
|
||||
// m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
||||
// m_goaheadCursor = wxCursor( wxCURSOR_HAND );
|
||||
};
|
||||
|
||||
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
|
||||
{
|
||||
// TODO
|
||||
m_window = win;
|
||||
// m_window = win;
|
||||
m_data = &data;
|
||||
|
||||
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
||||
m_goaheadCursor = wxCursor( wxCURSOR_HAND );
|
||||
// m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
|
||||
// m_goaheadCursor = wxCursor( wxCURSOR_HAND );
|
||||
};
|
||||
|
||||
void wxDropSource::SetData( wxDataObject &data )
|
||||
|
199
src/stubs/makefile.unx
Normal file
199
src/stubs/makefile.unx
Normal file
@@ -0,0 +1,199 @@
|
||||
#
|
||||
# File: makefile.unx
|
||||
# Author: Julian Smart
|
||||
# Created: 1998
|
||||
# Updated:
|
||||
# Copyright: (c) 1998
|
||||
#
|
||||
#
|
||||
# Makefile for wxStubs library, Unix
|
||||
|
||||
EXTRACFLAGS=-DLEX_SCANNER
|
||||
|
||||
include ../make.env
|
||||
|
||||
LIB_CPP_SRC=\
|
||||
\
|
||||
../common/cmndata.cpp \
|
||||
../common/config.cpp \
|
||||
../common/date.cpp \
|
||||
../common/docmdi.cpp \
|
||||
../common/docview.cpp \
|
||||
../common/dynarray.cpp \
|
||||
../common/dynlib.cpp \
|
||||
../common/event.cpp \
|
||||
../common/file.cpp \
|
||||
../common/fileconf.cpp \
|
||||
../common/filefn.cpp \
|
||||
../common/gdicmn.cpp \
|
||||
../common/hash.cpp \
|
||||
../common/helpbase.cpp \
|
||||
../common/intl.cpp \
|
||||
../common/ipcbase.cpp \
|
||||
../common/layout.cpp \
|
||||
../common/list.cpp \
|
||||
../common/log.cpp \
|
||||
../common/matrix.cpp \
|
||||
../common/memory.cpp \
|
||||
../common/module.cpp \
|
||||
../common/object.cpp \
|
||||
../common/odbc.cpp \
|
||||
../common/postscrp.cpp \
|
||||
../common/prntbase.cpp \
|
||||
../common/resource.cpp \
|
||||
../common/serbase.cpp \
|
||||
../common/string.cpp \
|
||||
../common/textfile.cpp \
|
||||
../common/tbarbase.cpp \
|
||||
../common/tbarsmpl.cpp \
|
||||
../common/timercmn.cpp \
|
||||
../common/utilscmn.cpp \
|
||||
../common/wincmn.cpp \
|
||||
../common/framecmn.cpp \
|
||||
../common/stream.cpp \
|
||||
../common/datstrm.cpp \
|
||||
../common/fstream.cpp \
|
||||
../common/mstream.cpp \
|
||||
../common/zstream.cpp \
|
||||
../common/objstrm.cpp \
|
||||
../common/sckstrm.cpp \
|
||||
../common/validate.cpp \
|
||||
../common/valtext.cpp \
|
||||
../common/variant.cpp \
|
||||
../common/wxexpr.cpp \
|
||||
../common/socket.cpp \
|
||||
../common/sckaddr.cpp \
|
||||
../common/sckipc.cpp \
|
||||
../common/protocol.cpp \
|
||||
../common/ftp.cpp \
|
||||
../common/http.cpp \
|
||||
../common/url.cpp \
|
||||
../common/tokenzr.cpp \
|
||||
\
|
||||
accel.cpp \
|
||||
app.cpp \
|
||||
bitmap.cpp \
|
||||
bmpbuttn.cpp \
|
||||
brush.cpp \
|
||||
button.cpp \
|
||||
checkbox.cpp \
|
||||
choice.cpp \
|
||||
clipbrd.cpp \
|
||||
colour.cpp \
|
||||
colordlg.cpp \
|
||||
control.cpp \
|
||||
combobox.cpp \
|
||||
cursor.cpp \
|
||||
data.cpp \
|
||||
dc.cpp \
|
||||
dcclient.cpp \
|
||||
dcmemory.cpp \
|
||||
dcscreen.cpp \
|
||||
dialog.cpp \
|
||||
dirdlg.cpp \
|
||||
dnd.cpp \
|
||||
filedlg.cpp \
|
||||
font.cpp \
|
||||
fontdlg.cpp \
|
||||
frame.cpp \
|
||||
gauge.cpp \
|
||||
gdiobj.cpp \
|
||||
helpxxxx.cpp \
|
||||
icon.cpp \
|
||||
listbox.cpp \
|
||||
joystick.cpp \
|
||||
main.cpp \
|
||||
mdi.cpp \
|
||||
menu.cpp \
|
||||
menuitem.cpp \
|
||||
metafile.cpp \
|
||||
minifram.cpp \
|
||||
msgdlg.cpp \
|
||||
notebook.cpp \
|
||||
palette.cpp \
|
||||
pen.cpp \
|
||||
print.cpp \
|
||||
radiobox.cpp \
|
||||
radiobut.cpp \
|
||||
region.cpp \
|
||||
scrolbar.cpp \
|
||||
settings.cpp \
|
||||
slider.cpp \
|
||||
spinbutt.cpp \
|
||||
statbox.cpp \
|
||||
statbmp.cpp \
|
||||
stattext.cpp \
|
||||
taskbar.cpp \
|
||||
textctrl.cpp \
|
||||
thread.cpp \
|
||||
timer.cpp \
|
||||
toolbar.cpp \
|
||||
utils.cpp \
|
||||
utilsexc.cpp \
|
||||
wave.cpp \
|
||||
window.cpp \
|
||||
\
|
||||
../generic/choicdgg.cpp \
|
||||
../generic/colrdlgg.cpp \
|
||||
../generic/fontdlgg.cpp \
|
||||
../generic/gridg.cpp \
|
||||
../generic/imaglist.cpp \
|
||||
../generic/listctrl.cpp \
|
||||
../generic/laywin.cpp \
|
||||
../generic/msgdlgg.cpp \
|
||||
../generic/panelg.cpp \
|
||||
../generic/printps.cpp \
|
||||
../generic/prntdlgg.cpp \
|
||||
../generic/sashwin.cpp \
|
||||
../generic/scrolwin.cpp \
|
||||
../generic/splitter.cpp \
|
||||
../generic/statusbr.cpp \
|
||||
../generic/tabg.cpp \
|
||||
../generic/textdlgg.cpp \
|
||||
../generic/treectrl.cpp
|
||||
|
||||
# If you're not using the generic ones, you
|
||||
# may wish to define platform-specific ones
|
||||
# treectrl.cpp \
|
||||
# listctrl.cpp \
|
||||
# imaglist.cpp \
|
||||
# statusbr.cpp \
|
||||
|
||||
LIB_C_SRC=\
|
||||
\
|
||||
../common/y_tab.c \
|
||||
../common/extended.c
|
||||
|
||||
all: $(WXLIB)
|
||||
|
||||
# Define library objects
|
||||
OBJECTS=\
|
||||
$(LIB_CPP_SRC:.cpp=.o) $(LIB_C_SRC:.c=.o)
|
||||
|
||||
$(WXLIB) : $(OBJECTS)
|
||||
ar $(AROPTIONS) $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
../common/y_tab.$(OBJSUFF): ../common/y_tab.c ../common/lex_yy.c
|
||||
$(CCLEX) -c $(CFLAGS) -o $@ ../common/y_tab.c
|
||||
|
||||
# Replace lex with flex if you run into compilation
|
||||
# problems with lex_yy.c. See also note about LEX_SCANNER
|
||||
# above.
|
||||
../common/lex_yy.c: ../common/lexer.l
|
||||
$(LEX) -o../common/lex.yy.c ../common/lexer.l
|
||||
sed -e "s/BUFSIZ/5000/g" < ../common/lex.yy.c | \
|
||||
sed -e "s/yyoutput(c)/void yyoutput(c)/g" | \
|
||||
sed -e "s/YYLMAX 200/YYLMAX 5000/g" > ../common/lex_yy.c
|
||||
/bin/rm -f ../common/lex.yy.c
|
||||
|
||||
# Replace yacc with bison if you run into compilation
|
||||
# problems with y_tab.c.
|
||||
../common/y_tab.c: ../common/parser.y
|
||||
$(YACC) ../common/parser.y
|
||||
mv y.tab.c ../common/y_tab.c
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(WXLIB)
|
||||
|
@@ -277,8 +277,8 @@ void wxNotebook::OnSize(wxSizeEvent& event)
|
||||
int w, h;
|
||||
GetSize(&w, &h);
|
||||
|
||||
uint nCount = m_aPages.Count();
|
||||
for ( uint nPage = 0; nPage < nCount; nPage++ ) {
|
||||
unsigned int nCount = m_aPages.Count();
|
||||
for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) {
|
||||
wxNotebookPage *pPage = m_aPages[nPage];
|
||||
pPage->SetSize(0, 0, w, h);
|
||||
if ( pPage->GetAutoLayout() )
|
||||
|
@@ -42,13 +42,13 @@ bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
||||
|
||||
bool wxPrinter::PrintDialog(wxWindow *parent)
|
||||
{
|
||||
wxPrintDialog dialog(parent, & printData);
|
||||
wxPrintDialog dialog(parent, & m_printData);
|
||||
return (dialog.ShowModal() == wxID_OK);
|
||||
}
|
||||
|
||||
bool wxPrinter::Setup(wxWindow *parent)
|
||||
{
|
||||
wxPrintDialog dialog(parent, & printData);
|
||||
wxPrintDialog dialog(parent, & m_printData);
|
||||
dialog.GetPrintData().SetSetupDialog(TRUE);
|
||||
return (dialog.ShowModal() == wxID_OK);
|
||||
}
|
||||
@@ -69,10 +69,10 @@ wxPrintPreview::~wxPrintPreview()
|
||||
|
||||
bool wxPrintPreview::Print(bool interactive)
|
||||
{
|
||||
if (!printPrintout)
|
||||
if (!m_printPrintout)
|
||||
return FALSE;
|
||||
wxPrinter printer(&printData);
|
||||
return printer.Print(previewFrame, printPrintout, interactive);
|
||||
wxPrinter printer(&m_printData);
|
||||
return printer.Print(m_previewFrame, m_printPrintout, interactive);
|
||||
}
|
||||
|
||||
void wxPrintPreview::DetermineScaling()
|
||||
|
@@ -17,8 +17,13 @@
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxSlider, wxControl)
|
||||
END_EVENT_TABLE()
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Slider
|
||||
wxSlider::wxSlider()
|
||||
{
|
||||
|
@@ -34,9 +34,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
|
||||
EVT_CHAR(wxTextCtrl::OnChar)
|
||||
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
|
||||
EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
|
||||
END_EVENT_TABLE()
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user