assorted files I forgot to commit before
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,6 +110,7 @@ Release date: ?
|
|||||||
<li>UDP support in wxSocket
|
<li>UDP support in wxSocket
|
||||||
<li>wxPlot
|
<li>wxPlot
|
||||||
<li>XML for resource files.
|
<li>XML for resource files.
|
||||||
|
<li>Built-in support for configuring key bindings
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
@@ -187,9 +188,7 @@ written generically in wxWindows.
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Windows CE port.
|
<li>Windows CE port.
|
||||||
<li>Cure bug whereby in a panel within another panel, all buttons become
|
<li>Write a RC to WXR converter.
|
||||||
default buttons (heavy black border).
|
|
||||||
<li>Write a RC->WXR converter.
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
|
@@ -16,6 +16,7 @@ program_dir = samples/console
|
|||||||
PROGRAM=console
|
PROGRAM=console
|
||||||
|
|
||||||
OBJECTS=$(PROGRAM).o
|
OBJECTS=$(PROGRAM).o
|
||||||
|
DATAFILES=testdata.fc
|
||||||
|
|
||||||
include ../../src/makeprog.env
|
include ../../src/makeprog.env
|
||||||
|
|
||||||
|
@@ -33,10 +33,11 @@
|
|||||||
//#define TEST_CMDLINE
|
//#define TEST_CMDLINE
|
||||||
//#define TEST_DIR
|
//#define TEST_DIR
|
||||||
//#define TEST_EXECUTE
|
//#define TEST_EXECUTE
|
||||||
|
#define TEST_FILECONF
|
||||||
//#define TEST_LOG
|
//#define TEST_LOG
|
||||||
//#define TEST_LONGLONG
|
//#define TEST_LONGLONG
|
||||||
//#define TEST_MIME
|
//#define TEST_MIME
|
||||||
#define TEST_STRINGS
|
//#define TEST_STRINGS
|
||||||
//#define TEST_THREADS
|
//#define TEST_THREADS
|
||||||
//#define TEST_TIME
|
//#define TEST_TIME
|
||||||
|
|
||||||
@@ -189,6 +190,69 @@ static void TestExecute()
|
|||||||
|
|
||||||
#endif // TEST_EXECUTE
|
#endif // TEST_EXECUTE
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxFileConfig
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef TEST_FILECONF
|
||||||
|
|
||||||
|
#include <wx/confbase.h>
|
||||||
|
#include <wx/fileconf.h>
|
||||||
|
|
||||||
|
static const struct FileConfTestData
|
||||||
|
{
|
||||||
|
const wxChar *name; // value name
|
||||||
|
const wxChar *value; // the value from the file
|
||||||
|
} fcTestData[] =
|
||||||
|
{
|
||||||
|
{ _T("value1"), _T("one") },
|
||||||
|
{ _T("value2"), _T("two") },
|
||||||
|
{ _T("novalue"), _T("default") },
|
||||||
|
};
|
||||||
|
|
||||||
|
static void TestFileConfRead()
|
||||||
|
{
|
||||||
|
puts("*** testing wxFileConfig loading/reading ***");
|
||||||
|
|
||||||
|
wxFileConfig fileconf(_T("test"), wxEmptyString,
|
||||||
|
_T("testdata.fc"), wxEmptyString,
|
||||||
|
wxCONFIG_USE_RELATIVE_PATH);
|
||||||
|
|
||||||
|
// test simple reading
|
||||||
|
puts("\nReading config file:");
|
||||||
|
wxString defValue(_T("default")), value;
|
||||||
|
for ( size_t n = 0; n < WXSIZEOF(fcTestData); n++ )
|
||||||
|
{
|
||||||
|
const FileConfTestData& data = fcTestData[n];
|
||||||
|
value = fileconf.Read(data.name, defValue);
|
||||||
|
printf("\t%s = %s ", data.name, value.c_str());
|
||||||
|
if ( value == data.value )
|
||||||
|
{
|
||||||
|
puts("(ok)");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("(ERROR: should be %s)\n", data.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// test enumerating the entries
|
||||||
|
puts("\nEnumerating all root entries:");
|
||||||
|
long dummy;
|
||||||
|
wxString name;
|
||||||
|
bool cont = fileconf.GetFirstEntry(name, dummy);
|
||||||
|
while ( cont )
|
||||||
|
{
|
||||||
|
printf("\t%s = %s\n",
|
||||||
|
name.c_str(),
|
||||||
|
fileconf.Read(name.c_str(), _T("ERROR")).c_str());
|
||||||
|
|
||||||
|
cont = fileconf.GetNextEntry(name, dummy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // TEST_FILECONF
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// MIME types
|
// MIME types
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -2048,8 +2112,8 @@ int main(int argc, char **argv)
|
|||||||
TestStringSub();
|
TestStringSub();
|
||||||
TestStringFormat();
|
TestStringFormat();
|
||||||
TestStringFind();
|
TestStringFind();
|
||||||
}
|
|
||||||
TestStringTokenizer();
|
TestStringTokenizer();
|
||||||
|
}
|
||||||
#endif // TEST_STRINGS
|
#endif // TEST_STRINGS
|
||||||
|
|
||||||
#ifdef TEST_ARRAYS
|
#ifdef TEST_ARRAYS
|
||||||
@@ -2092,6 +2156,10 @@ int main(int argc, char **argv)
|
|||||||
TestExecute();
|
TestExecute();
|
||||||
#endif // TEST_EXECUTE
|
#endif // TEST_EXECUTE
|
||||||
|
|
||||||
|
#ifdef TEST_FILECONF
|
||||||
|
TestFileConfRead();
|
||||||
|
#endif // TEST_FILECONF
|
||||||
|
|
||||||
#ifdef TEST_LOG
|
#ifdef TEST_LOG
|
||||||
wxString s;
|
wxString s;
|
||||||
for ( size_t n = 0; n < 8000; n++ )
|
for ( size_t n = 0; n < 8000; n++ )
|
||||||
|
@@ -265,7 +265,7 @@ bool MyApp::OnInit()
|
|||||||
frame->Show(TRUE);
|
frame->Show(TRUE);
|
||||||
frame->SetCursor(wxCursor(wxCURSOR_HAND));
|
frame->SetCursor(wxCursor(wxCURSOR_HAND));
|
||||||
|
|
||||||
frame->GetPanel()->m_notebook->SetSelection(6);
|
//frame->GetPanel()->m_notebook->SetSelection(6);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
SetTopWindow(frame);
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE);
|
wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE);
|
||||||
m_text->SetBackgroundColour("wheat");
|
m_text->SetBackgroundColour("wheat");
|
||||||
|
|
||||||
wxLog::AddTraceMask(_T("focus"));
|
// wxLog::AddTraceMask(_T("focus"));
|
||||||
m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
|
m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
|
||||||
|
|
||||||
m_notebook = new wxNotebook(this, ID_NOTEBOOK);
|
m_notebook = new wxNotebook(this, ID_NOTEBOOK);
|
||||||
@@ -832,6 +832,7 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
|
|||||||
m_lbSelectThis->Enable( event.GetInt() == 0 );
|
m_lbSelectThis->Enable( event.GetInt() == 0 );
|
||||||
m_lbSelectNum->Enable( event.GetInt() == 0 );
|
m_lbSelectNum->Enable( event.GetInt() == 0 );
|
||||||
m_listboxSorted->Enable( event.GetInt() == 0 );
|
m_listboxSorted->Enable( event.GetInt() == 0 );
|
||||||
|
FindWindow(ID_CHANGE_COLOUR)->Enable( event.GetInt() == 0 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ID_LISTBOX_SEL_NUM:
|
case ID_LISTBOX_SEL_NUM:
|
||||||
|
@@ -144,16 +144,14 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
|
|||||||
HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck);
|
HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck);
|
||||||
|
|
||||||
// then draw a check mark into it
|
// then draw a check mark into it
|
||||||
RECT rect ;
|
#if defined(__WIN32__) && !defined(__SC__)
|
||||||
rect.left = 0 ;
|
RECT rect;
|
||||||
rect.top = 0 ;
|
rect.left = 0;
|
||||||
rect.right = nCheckWidth ;
|
rect.top = 0;
|
||||||
rect.bottom = nCheckHeight ;
|
rect.right = nCheckWidth;
|
||||||
|
rect.bottom = nCheckHeight;
|
||||||
|
|
||||||
#ifdef __WIN32__
|
|
||||||
#ifndef __SC__
|
|
||||||
DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
|
DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
// In WIN16, draw a cross
|
// In WIN16, draw a cross
|
||||||
HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
|
HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
|
||||||
|
Reference in New Issue
Block a user