reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.

Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function.

Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText()

Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2010-03-21 21:39:15 +00:00
parent 90497db95b
commit 32ee98eb76
18 changed files with 522 additions and 381 deletions

View File

@@ -71,6 +71,7 @@ public:
// get the control alignment (left/right/centre, top/bottom/centre) // get the control alignment (left/right/centre, top/bottom/centre)
int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; } int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
// set label with mnemonics
virtual void SetLabel(const wxString& label) virtual void SetLabel(const wxString& label)
{ {
m_labelOrig = label; m_labelOrig = label;
@@ -80,21 +81,19 @@ public:
wxWindow::SetLabel(label); wxWindow::SetLabel(label);
} }
virtual wxString GetLabel() const
{
// return the original string, as it was passed to SetLabel() // return the original string, as it was passed to SetLabel()
// (i.e. with wx-style mnemonics) // (i.e. with wx-style mnemonics)
return m_labelOrig; virtual wxString GetLabel() const { return m_labelOrig; }
}
// get just the text of the label, without mnemonic characters ('&') // set label text (mnemonics will be escaped)
wxString GetLabelText() const { return GetLabelText(GetLabel()); } virtual void SetLabelText(const wxString& text)
void SetLabelText(const wxString& text)
{ {
SetLabel(EscapeMnemonics(text)); SetLabel(EscapeMnemonics(text));
} }
// get just the text of the label, without mnemonic characters ('&')
virtual wxString GetLabelText() const { return GetLabelText(GetLabel()); }
// controls by default inherit the colours of their parents, if a // controls by default inherit the colours of their parents, if a
// particular control class doesn't want to do it, it can override // particular control class doesn't want to do it, it can override
// ShouldInheritColours() to return false // ShouldInheritColours() to return false
@@ -114,23 +113,29 @@ public:
// static utilities // static utilities for mnemonics char (&) handling
// ---------------- // ------------------------------------------------
// replaces parts of the (multiline) string with ellipsis if needed // returns the given string without mnemonic characters ('&')
static wxString Ellipsize(const wxString& label, const wxDC& dc,
wxEllipsizeMode mode, int maxWidth,
int flags = wxELLIPSIZE_FLAGS_DEFAULT);
// get the string without mnemonic characters ('&')
static wxString GetLabelText(const wxString& label); static wxString GetLabelText(const wxString& label);
// removes the mnemonics characters // returns the given string without mnemonic characters ('&')
// this function is identic to GetLabelText() and is provided for clarity
// and for symmetry with the wxStaticText::RemoveMarkup() function.
static wxString RemoveMnemonics(const wxString& str); static wxString RemoveMnemonics(const wxString& str);
// escapes (by doubling them) the mnemonics // escapes (by doubling them) the mnemonics
static wxString EscapeMnemonics(const wxString& str); static wxString EscapeMnemonics(const wxString& str);
// miscellaneous static utilities
// ------------------------------
// replaces parts of the given (multiline) string with an ellipsis if needed
static wxString Ellipsize(const wxString& label, const wxDC& dc,
wxEllipsizeMode mode, int maxWidth,
int flags = wxELLIPSIZE_FLAGS_DEFAULT);
// return the accel index in the string or -1 if none and puts the modified // return the accel index in the string or -1 if none and puts the modified
// string into second parameter if non NULL // string into second parameter if non NULL
static int FindAccelIndex(const wxString& label, static int FindAccelIndex(const wxString& label,

View File

@@ -51,16 +51,24 @@ public:
} }
// get the string without mnemonic characters ('&') and without markup // get the string without mnemonic characters ('&') and without markup
// (if wxST_MARKUP is being used) // (if the wxST_MARKUP style is set)
virtual wxString GetLabelText() const; virtual wxString GetLabelText() const;
// public utilities (symmetric to those in wxControl about mnemonics): // set label text (mnemonics and markup, if the wxST_MARKUP style is set,
// will be escaped)
virtual void SetLabelText(const wxString& text);
// static utilities for markup handling
// (symmetric to those in wxControl about mnemonics)
// -------------------------------------------------
// get the string without mnemonic characters ('&') and without markup // get the string without mnemonic characters ('&') and without markup
// (note that markup is always removed; this function is static and cannot
// check for wxST_MARKUP style presence/absence!)
static wxString GetLabelText(const wxString& label); static wxString GetLabelText(const wxString& label);
// removes the markup accepted by wxStaticText when wxST_MARKUP is used, // removes the markup recognized by wxStaticText and returns the cleaned string
// and then returns the cleaned string
static wxString RemoveMarkup(const wxString& str); static wxString RemoveMarkup(const wxString& str);
// escapes all special symbols (<>"'&) present in the given string // escapes all special symbols (<>"'&) present in the given string
@@ -72,7 +80,14 @@ protected: // functions required for wxST_ELLIPSIZE_* support
// choose the default border for this window // choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
// just calls RemoveMarkup & Ellipsize on the original label. // calls only RemoveMarkup() on the original label
// if the wxST_MARKUP style is set
// (but unlike GetLabelText won't remove mnemonics)
virtual wxString GetLabelWithoutMarkup() const;
// just calls RemoveMarkup() & Ellipsize() on the original label
// if the wxST_MARKUP & wxST_ELLIPSIZE_* styles are set
// (but unlike GetLabelText won't remove mnemonics)
virtual wxString GetEllipsizedLabelWithoutMarkup() const; virtual wxString GetEllipsizedLabelWithoutMarkup() const;
// replaces parts of the string with ellipsis if needed // replaces parts of the string with ellipsis if needed

View File

@@ -93,6 +93,89 @@ public:
*/ */
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
/**
Returns the control's label, as it was passed to SetLabel().
Note that the returned string may contains mnemonics ("&" characters) if they were
passed to the SetLabel() function; use GetLabelText() if they are undesired.
Also note that the returned string is always the string which was passed to
SetLabel() but may be different from the string passed to SetLabelText()
(since this last one escapes mnemonic characters).
*/
wxString GetLabel() const;
/**
Returns the control's label without mnemonics.
Note that because of the stripping of the mnemonics the returned string may differ
from the string which was passed to SetLabel().
*/
wxString GetLabelText() const;
/**
Sets the control's label.
All "&" characters in the @a label are special and indicate that the
following character is a @e mnemonic for this control and can be used to
activate it from the keyboard (typically by using @e Alt key in
combination with it). To insert a literal ampersand character, you need
to double it, i.e. use use "&&". If this behaviour is undesirable, use
SetLabelText() instead.
*/
void SetLabel(const wxString& label);
/**
Sets the control's label to exactly the given string.
Unlike SetLabel(), this function shows exactly the @a text passed to it
in the control, without interpreting ampersands in it in any way.
Notice that it means that the control can't have any mnemonic defined
for it using this function.
@see EscapeMnemonics()
*/
void SetLabelText(const wxString& text);
public: // static functions
/**
Returns the given @a label string without mnemonics ("&" characters).
*/
static wxString GetLabelText(const wxString& label);
/**
Returns the given @a str string without mnemonics ("&" characters).
@note This function is identic to GetLabelText() and is provided both for symmetry
with the wxStaticText::RemoveMarkup() function and to allow to write more
readable code (since this function has a more descriptive name respect GetLabelText()).
*/
static wxString RemoveMnemonics(const wxString& str);
/**
Escapes the special mnemonics characters ("&") in the given string.
This function can be helpful if you need to set the controls label to a
user-provided string. If the string contains ampersands, they wouldn't
appear on the display but be used instead to indicate that the
character following the first of them can be used as a control mnemonic.
While this can sometimes be desirable (e.g. to allow the user to
configure mnemonics of the controls), more often you will want to use
this function before passing a user-defined string to SetLabel().
Alternatively, if the label is entirely user-defined, you can just call
SetLabelText() directly -- but this function must be used if the label
is a combination of a part defined by program containing the control
mnemonics and a user-defined part.
@param text
The string such as it should appear on the display.
@return
The same string with the ampersands in it doubled.
*/
static wxString EscapeMnemonics(const wxString& text);
/** /**
Replaces parts of the @a label string with ellipsis, if needed, so Replaces parts of the @a label string with ellipsis, if needed, so
that it doesn't exceed @a maxWidth. that it doesn't exceed @a maxWidth.
@@ -120,74 +203,5 @@ public:
static wxString Ellipsize(const wxString& label, const wxDC& dc, static wxString Ellipsize(const wxString& label, const wxDC& dc,
wxEllipsizeMode mode, int maxWidth, wxEllipsizeMode mode, int maxWidth,
int flags = wxELLIPSIZE_FLAGS_DEFAULT); int flags = wxELLIPSIZE_FLAGS_DEFAULT);
/**
Returns the control's text.
@note The returned string contains mnemonics ("&" characters) if it has
any, use GetLabelText() if they are undesired.
*/
wxString GetLabel() const;
/**
Returns the control's label without mnemonics.
*/
wxString GetLabelText() const;
/**
Returns the given @a label string without mnemonics ("&" characters).
*/
static wxString GetLabelText(const wxString& label);
/**
Removes the mnemonics ("&" characters) from the given string.
*/
static wxString RemoveMnemonics(const wxString& str);
/**
Escape the special mnemonics characters ("&") in the given string.
This function can be helpful if you need to set the controls label to a
user-provided string. If the string contains ampersands, they wouldn't
appear on the display but be used instead to indicate that the
character following the first of them can be used as a control mnemonic.
While this can sometimes be desirable (e.g. to allow the user to
configure mnemonics of the controls), more often you will want to use
this function before passing a user-defined string to SetLabel().
Alternatively, if the label is entirely user-defined, you can just call
SetLabelText() directly -- but this function must be used if the label
is a combination of a part defined by program containing the control
mnemonics and a user-defined part.
@param text
The string such as it should appear on the display.
@return
The same string with the ampersands in it doubled.
*/
static wxString EscapeMnemonics(const wxString& text);
/**
Sets the item's text.
Any "&" characters in the @a label are special and indicate that the
following character is a @e mnemonic for this control and can be used to
activate it from the keyboard (typically by using @e Alt key in
combination with it). To insert a literal ampersand character, you need
to double it, i.e. use use "&&". If this behaviour is undesirable, use
SetLabelText() instead.
*/
void SetLabel(const wxString& label);
/**
Sets the item's text to exactly the given string.
Unlike SetLabel(), this function shows exactly the @a text passed to it
in the control, without interpreting ampersands in it in any way.
Notice that it means that the control can't have any mnemonic defined
for it using this function.
@see EscapeMnemonics()
*/
void SetLabelText(const wxString& text);
}; };

View File

@@ -22,11 +22,11 @@
Center the text (horizontally). Center the text (horizontally).
@style{wxST_NO_AUTORESIZE} @style{wxST_NO_AUTORESIZE}
By default, the control will adjust its size to exactly fit to the By default, the control will adjust its size to exactly fit to the
size of the text when SetLabel is called. If this style flag is size of the text when SetLabel() is called. If this style flag is
given, the control will not change its size (this style is given, the control will not change its size (this style is
especially useful with controls which also have wxALIGN_RIGHT or especially useful with controls which also have the @c wxALIGN_RIGHT or
CENTER style because otherwise they won't make sense any longer the @c wxALIGN_CENTRE style because otherwise they won't make sense any
after a call to SetLabel). longer after a call to SetLabel()).
@style{wxST_ELLIPSIZE_START} @style{wxST_ELLIPSIZE_START}
If the labeltext width exceeds the control width, replace the beginning If the labeltext width exceeds the control width, replace the beginning
of the label with an ellipsis; uses wxControl::Ellipsize. of the label with an ellipsis; uses wxControl::Ellipsize.
@@ -89,23 +89,12 @@ public:
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxStaticTextNameStr); const wxString& name = wxStaticTextNameStr);
// NB: when writing docs for the following function remember that Doxygen
// will always expand HTML entities (e.g. &quot;) and thus we need to
// write e.g. "&amp;lt;" to have in the output the "&lt;" string.
/**
Escapes all the symbols of @a str that have a special meaning (<tt><>&quot;'&</tt>) for
wxStaticText objects with the @c wxST_MARKUP style.
Those symbols are replaced the corresponding entities
(&amp;lt; &amp;gt; &amp;quot; &amp;apos; &amp;amp;).
*/
static wxString EscapeMarkup(const wxString& str);
/** /**
Returns the contents of the control. Returns the contents of the control.
Note that the returned string contains both the mnemonics (@& characters), Note that the returned string may contain both the mnemonics (@& characters),
if any, and markup tags, if any. if any, and markup tags, if any.
Use GetLabelText() if only the label text is needed. Use GetLabelText() if only the label text is needed.
*/ */
wxString GetLabel() const; wxString GetLabel() const;
@@ -116,29 +105,19 @@ public:
*/ */
wxString GetLabelText() const; wxString GetLabelText() const;
/**
This overload returns the given @a label string without the
mnemonics characters (if any) and without the markup.
*/
static wxString GetLabelText(const wxString& label);
/** /**
Returns @true if the window styles for this control contains one of the Returns @true if the window styles for this control contains one of the
@c wxST_ELLIPSIZE_START, @c wxST_ELLIPSIZE_MIDDLE or @c wxST_ELLIPSIZE_END styles. @c wxST_ELLIPSIZE_START, @c wxST_ELLIPSIZE_MIDDLE or @c wxST_ELLIPSIZE_END styles.
*/ */
bool IsEllipsized() const; bool IsEllipsized() const;
/** // NB: when writing docs for the following function remember that Doxygen
Removes the markup accepted by wxStaticText when the @c wxST_MARKUP style is used, // will always expand HTML entities (e.g. &quot;) and thus we need to
and then returns the cleaned string. // write e.g. "&amp;lt;" to have in the output the "&lt;" string.
See SetLabel() for more info about the markup.
*/
static wxString RemoveMarkup(const wxString& str);
/** /**
Sets the static text label and updates the controls size to exactly fit the Sets the static text label and updates the controls size to exactly fit the
label unless the control has wxST_NO_AUTORESIZE flag. label unless the control has @c wxST_NO_AUTORESIZE flag.
This function allows to set decorated static label text on platforms which This function allows to set decorated static label text on platforms which
support it (currently only GTK+ 2). For the other platforms, the markup is support it (currently only GTK+ 2). For the other platforms, the markup is
@@ -146,6 +125,10 @@ public:
The supported tags are: The supported tags are:
<TABLE> <TABLE>
<TR>
<TD><b>Tag</b></TD>
<TD><b>Description</b></TD>
</TR>
<TR> <TR>
<TD>&lt;b&gt;</TD> <TD>&lt;b&gt;</TD>
<TD>bold text</TD> <TD>bold text</TD>
@@ -232,6 +215,17 @@ public:
*/ */
virtual void SetLabel(const wxString& label); virtual void SetLabel(const wxString& label);
/**
Sets the control's label to exactly the given string.
Unlike SetLabel(), this function shows exactly the @a text passed to it
in the control, without interpreting ampersands in it in any way.
Notice that it means that the control can't have any mnemonic defined
for it using this function.
*/
virtual void SetLabelText(const wxString& text);
/** /**
This functions wraps the controls label so that each of its lines becomes at This functions wraps the controls label so that each of its lines becomes at
most @a width pixels wide if possible (the lines are broken at words most @a width pixels wide if possible (the lines are broken at words
@@ -244,5 +238,34 @@ public:
@since 2.6.2 @since 2.6.2
*/ */
void Wrap(int width); void Wrap(int width);
public: // static functions
/**
Returns the given @a label string without the mnemonics characters (if any)
and without the markup.
Note that since this function is static it will always remove markup
(since it cannot check @c wxST_MARKUP presence/absence!).
*/
static wxString GetLabelText(const wxString& label);
/**
Escapes all the symbols of @a str that have a special meaning (<tt><>&quot;'&</tt>) for
wxStaticText objects with the @c wxST_MARKUP style.
Those symbols are replaced the corresponding entities
(&amp;lt; &amp;gt; &amp;quot; &amp;apos; &amp;amp;).
*/
static wxString EscapeMarkup(const wxString& str);
/**
Removes the markup accepted by wxStaticText when the @c wxST_MARKUP style is used,
and then returns the cleaned string.
See SetLabel() for more info about the markup.
*/
static wxString RemoveMarkup(const wxString& str);
}; };

View File

@@ -88,13 +88,6 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
return true; return true;
} }
/* static */
wxString wxControlBase::GetLabelText(const wxString& label)
{
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(label, wxStrip_Mnemonics);
}
void wxControlBase::Command(wxCommandEvent& event) void wxControlBase::Command(wxCommandEvent& event)
{ {
(void)GetEventHandler()->ProcessEvent(event); (void)GetEventHandler()->ProcessEvent(event);
@@ -154,9 +147,17 @@ void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
#endif // wxUSE_RADIOBTN #endif // wxUSE_RADIOBTN
} }
/* static */
wxString wxControlBase::GetLabelText(const wxString& label)
{
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(label, wxStrip_Mnemonics);
}
/* static */ /* static */
wxString wxControlBase::RemoveMnemonics(const wxString& str) wxString wxControlBase::RemoveMnemonics(const wxString& str)
{ {
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(str, wxStrip_Mnemonics); return wxStripMenuCodes(str, wxStrip_Mnemonics);
} }

View File

@@ -154,15 +154,28 @@ wxString wxStaticTextBase::GetLabelText() const
return RemoveMnemonics(ret); return RemoveMnemonics(ret);
} }
/*static*/ void wxStaticTextBase::SetLabelText(const wxString& text)
{
wxString str = text;
if (HasFlag(wxST_MARKUP))
str = EscapeMarkup(str); // escapes markup and the & characters (which are also mnemonics)
else
str = EscapeMnemonics(text); // escape only the mnemonics
SetLabel(str);
}
/* static */
wxString wxStaticTextBase::GetLabelText(const wxString& label) wxString wxStaticTextBase::GetLabelText(const wxString& label)
{ {
// remove markup
wxString ret = RemoveMarkup(label); wxString ret = RemoveMarkup(label);
// always remove the markup (this function is static
// and cannot check for wxST_MARKUP presence/absence)
return RemoveMnemonics(ret); return RemoveMnemonics(ret);
} }
/*static*/ /* static */
wxString wxStaticTextBase::RemoveMarkup(const wxString& text) wxString wxStaticTextBase::RemoveMarkup(const wxString& text)
{ {
// strip out of "text" the markup for platforms which don't support it natively // strip out of "text" the markup for platforms which don't support it natively
@@ -293,6 +306,17 @@ void wxStaticTextBase::UpdateLabel()
DoSetLabel(newlabel); DoSetLabel(newlabel);
} }
wxString wxStaticTextBase::GetLabelWithoutMarkup() const
{
wxString ret(m_labelOrig);
if (HasFlag(wxST_MARKUP))
ret = RemoveMarkup(ret);
// unlike GetLabelText() we don't remove the mnemonics here!
return ret;
}
wxString wxStaticTextBase::GetEllipsizedLabelWithoutMarkup() const wxString wxStaticTextBase::GetEllipsizedLabelWithoutMarkup() const
{ {
// this function should be used only by ports which do not support // this function should be used only by ports which do not support

View File

@@ -214,13 +214,13 @@ void wxStaticText::SetLabel(const wxString& label)
} }
#endif // SS_ENDELLIPSIS #endif // SS_ENDELLIPSIS
// this call will save the label in m_labelOrig and set it into this window // save the label in m_labelOrig with both the markup (if any) and
// (through wxWindow::SetLabel) // the mnemonics characters (if any)
m_labelOrig = label; m_labelOrig = label;
#ifdef SS_ENDELLIPSIS #ifdef SS_ENDELLIPSIS
if ( styleReal & SS_ENDELLIPSIS ) if ( styleReal & SS_ENDELLIPSIS )
DoSetLabel(RemoveMarkup(label)); DoSetLabel(GetLabelWithoutMarkup());
else else
#endif // SS_ENDELLIPSIS #endif // SS_ENDELLIPSIS
DoSetLabel(GetEllipsizedLabelWithoutMarkup()); DoSetLabel(GetEllipsizedLabelWithoutMarkup());

View File

@@ -141,6 +141,7 @@ TEST_GUI_OBJECTS = \
test_gui_config.o \ test_gui_config.o \
test_gui_comboboxtest.o \ test_gui_comboboxtest.o \
test_gui_headerctrltest.o \ test_gui_headerctrltest.o \
test_gui_label.o \
test_gui_listctrltest.o \ test_gui_listctrltest.o \
test_gui_textctrltest.o \ test_gui_textctrltest.o \
test_gui_textentrytest.o \ test_gui_textentrytest.o \
@@ -590,6 +591,9 @@ test_gui_comboboxtest.o: $(srcdir)/controls/comboboxtest.cpp $(TEST_GUI_ODEP)
test_gui_headerctrltest.o: $(srcdir)/controls/headerctrltest.cpp $(TEST_GUI_ODEP) test_gui_headerctrltest.o: $(srcdir)/controls/headerctrltest.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/headerctrltest.cpp $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/headerctrltest.cpp
test_gui_label.o: $(srcdir)/controls/label.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/label.cpp
test_gui_listctrltest.o: $(srcdir)/controls/listctrltest.cpp $(TEST_GUI_ODEP) test_gui_listctrltest.o: $(srcdir)/controls/listctrltest.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/listctrltest.cpp $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/listctrltest.cpp

213
tests/controls/label.cpp Normal file
View File

@@ -0,0 +1,213 @@
///////////////////////////////////////////////////////////////////////////////
// Name: tests/controls/label.cpp
// Purpose: wxControl and wxStaticText label tests
// Author: Francesco Montorsi
// Created: 2010-3-21
// RCS-ID: $Id$
// Copyright: (c) 2010 Francesco Montorsi
///////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "testprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
#endif // WX_PRECOMP
#include "wx/control.h"
#include "wx/stattext.h"
#include "wx/checkbox.h"
// ----------------------------------------------------------------------------
// test class
// ----------------------------------------------------------------------------
class LabelTestCase : public CppUnit::TestCase
{
public:
LabelTestCase() { }
virtual void setUp();
virtual void tearDown();
private:
CPPUNIT_TEST_SUITE( LabelTestCase );
CPPUNIT_TEST( GetLabel );
CPPUNIT_TEST( GetLabelText );
CPPUNIT_TEST( Statics );
CPPUNIT_TEST_SUITE_END();
void GetLabel();
void GetLabelText();
void Statics();
wxStaticText *m_st, *m_stWithMarkup;
// we cannot test wxControl directly (it's abstract) so we rather test wxCheckBox
wxCheckBox *m_cb;
DECLARE_NO_COPY_CLASS(LabelTestCase)
};
// register in the unnamed registry so that these tests are run by default
CPPUNIT_TEST_SUITE_REGISTRATION( LabelTestCase );
// also include in it's own registry so that these tests can be run alone
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( LabelTestCase, "LabelTestCase" );
// ----------------------------------------------------------------------------
// test initialization
// ----------------------------------------------------------------------------
#define ORIGINAL_LABEL "original label"
void LabelTestCase::setUp()
{
m_st = new wxStaticText(wxTheApp->GetTopWindow(), wxID_ANY, ORIGINAL_LABEL);
m_stWithMarkup = new wxStaticText(wxTheApp->GetTopWindow(), wxID_ANY, ORIGINAL_LABEL,
wxDefaultPosition, wxDefaultSize, wxST_MARKUP);
m_cb = new wxCheckBox(wxTheApp->GetTopWindow(), wxID_ANY, ORIGINAL_LABEL);
CPPUNIT_ASSERT_EQUAL( ORIGINAL_LABEL, m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( ORIGINAL_LABEL, m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( ORIGINAL_LABEL, m_cb->GetLabel() );
}
void LabelTestCase::tearDown()
{
wxDELETE(m_st);
wxDELETE(m_stWithMarkup);
wxDELETE(m_cb);
}
// ----------------------------------------------------------------------------
// the tests themselves
// ----------------------------------------------------------------------------
#define SET_LABEL(str) \
m_st->SetLabel(str); \
m_stWithMarkup->SetLabel(str); \
m_cb->SetLabel(str);
#define SET_LABEL_TEXT(str) \
m_st->SetLabelText(str); \
m_stWithMarkup->SetLabelText(str); \
m_cb->SetLabelText(str);
void LabelTestCase::GetLabel()
{
const wxString testLabelArray[] = {
"label without mnemonics and markup",
"label with &mnemonic",
"label with <span foreground='blue'>some</span> <b>markup</b>",
"label with <span foreground='blue'>some</span> <b>markup</b> and &mnemonic",
};
// test calls to SetLabel() and then to GetLabel()
for ( unsigned int s = 0; s < WXSIZEOF(testLabelArray); s++ )
{
SET_LABEL(testLabelArray[s]);
// GetLabel() should always return the string passed to SetLabel()
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_cb->GetLabel() );
}
// test calls to SetLabelText() and then to GetLabel()
const wxString& testLabel = "label without mnemonics and markup";
SET_LABEL_TEXT(testLabel);
CPPUNIT_ASSERT_EQUAL( testLabel, m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabel, m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabel, m_cb->GetLabel() );
const wxString& testLabel2 = "label with &mnemonic";
const wxString& testLabelText2 = "label with &&mnemonic";
SET_LABEL_TEXT(testLabel2);
CPPUNIT_ASSERT_EQUAL( testLabelText2, m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( "label with &amp;mnemonic", m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabelText2, m_cb->GetLabel() );
const wxString& testLabel3 = "label with <span foreground='blue'>some</span> <b>markup</b>";
SET_LABEL_TEXT(testLabel3);
CPPUNIT_ASSERT_EQUAL( testLabel3, m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( "label with &lt;span foreground=&apos;blue&apos;&gt;some&lt;/span&gt; &lt;b&gt;markup&lt;/b&gt;", m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabel3, m_cb->GetLabel() );
const wxString& testLabel4 = "label with <span foreground='blue'>some</span> <b>markup</b> and &mnemonic";
const wxString& testLabelText4 = "label with <span foreground='blue'>some</span> <b>markup</b> and &&mnemonic";
SET_LABEL_TEXT(testLabel4);
CPPUNIT_ASSERT_EQUAL( testLabelText4, m_st->GetLabel() );
CPPUNIT_ASSERT_EQUAL( "label with &lt;span foreground=&apos;blue&apos;&gt;some&lt;/span&gt; &lt;b&gt;markup&lt;/b&gt; and &amp;mnemonic", m_stWithMarkup->GetLabel() );
CPPUNIT_ASSERT_EQUAL( testLabelText4, m_cb->GetLabel() );
}
void LabelTestCase::GetLabelText()
{
// test calls to SetLabel() and then to GetLabelText()
const wxString& testLabel = "label without mnemonics and markup";
SET_LABEL(testLabel);
CPPUNIT_ASSERT_EQUAL( testLabel, m_st->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabel, m_stWithMarkup->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabel, m_cb->GetLabelText() );
const wxString& testLabel2 = "label with &mnemonic";
const wxString& testLabelText2 = "label with mnemonic";
SET_LABEL(testLabel2);
CPPUNIT_ASSERT_EQUAL( testLabelText2, m_st->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabelText2, m_stWithMarkup->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabelText2, m_cb->GetLabelText() );
const wxString& testLabel3 = "label with <span foreground='blue'>some</span> <b>markup</b>";
SET_LABEL(testLabel3);
CPPUNIT_ASSERT_EQUAL( testLabel3, m_st->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( "label with some markup", m_stWithMarkup->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabel3, m_cb->GetLabelText() );
const wxString& testLabel4 = "label with <span foreground='blue'>some</span> <b>markup</b> and &mnemonic";
const wxString& testLabelText4 = "label with <span foreground='blue'>some</span> <b>markup</b> and mnemonic";
SET_LABEL(testLabel4);
CPPUNIT_ASSERT_EQUAL( testLabelText4, m_st->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( "label with some markup and mnemonic", m_stWithMarkup->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabelText4, m_cb->GetLabelText() );
const wxString testLabelArray[] = {
"label without mnemonics and markup",
"label with &mnemonic",
"label with <span foreground='blue'>some</span> <b>markup</b>",
"label with <span foreground='blue'>some</span> <b>markup</b> and &mnemonic",
};
// test calls to SetLabelText() and then to GetLabelText()
for ( unsigned int s = 0; s < WXSIZEOF(testLabelArray); s++ )
{
SET_LABEL_TEXT(testLabelArray[s]);
// GetLabelText() should always return the string passed to SetLabelText()
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_st->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_stWithMarkup->GetLabelText() );
CPPUNIT_ASSERT_EQUAL( testLabelArray[s], m_cb->GetLabelText() );
}
}
void LabelTestCase::Statics()
{
CPPUNIT_ASSERT_EQUAL( "mnemonic", wxControl::RemoveMnemonics("&mnemonic") );
CPPUNIT_ASSERT_EQUAL( "&mnemonic", wxControl::RemoveMnemonics("&&mnemonic") );
CPPUNIT_ASSERT_EQUAL( "&mnemonic", wxControl::RemoveMnemonics("&&&mnemonic") );
CPPUNIT_ASSERT_EQUAL( "", wxStaticText::RemoveMarkup("<b></b>") );
}

View File

@@ -126,6 +126,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_config.obj \ $(OBJS)\test_gui_config.obj \
$(OBJS)\test_gui_comboboxtest.obj \ $(OBJS)\test_gui_comboboxtest.obj \
$(OBJS)\test_gui_headerctrltest.obj \ $(OBJS)\test_gui_headerctrltest.obj \
$(OBJS)\test_gui_label.obj \
$(OBJS)\test_gui_listctrltest.obj \ $(OBJS)\test_gui_listctrltest.obj \
$(OBJS)\test_gui_textctrltest.obj \ $(OBJS)\test_gui_textctrltest.obj \
$(OBJS)\test_gui_textentrytest.obj \ $(OBJS)\test_gui_textentrytest.obj \
@@ -644,6 +645,9 @@ $(OBJS)\test_gui_comboboxtest.obj: .\controls\comboboxtest.cpp
$(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp
$(OBJS)\test_gui_label.obj: .\controls\label.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\label.cpp
$(OBJS)\test_gui_listctrltest.obj: .\controls\listctrltest.cpp $(OBJS)\test_gui_listctrltest.obj: .\controls\listctrltest.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\listctrltest.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\listctrltest.cpp

View File

@@ -120,6 +120,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_config.o \ $(OBJS)\test_gui_config.o \
$(OBJS)\test_gui_comboboxtest.o \ $(OBJS)\test_gui_comboboxtest.o \
$(OBJS)\test_gui_headerctrltest.o \ $(OBJS)\test_gui_headerctrltest.o \
$(OBJS)\test_gui_label.o \
$(OBJS)\test_gui_listctrltest.o \ $(OBJS)\test_gui_listctrltest.o \
$(OBJS)\test_gui_textctrltest.o \ $(OBJS)\test_gui_textctrltest.o \
$(OBJS)\test_gui_textentrytest.o \ $(OBJS)\test_gui_textentrytest.o \
@@ -626,6 +627,9 @@ $(OBJS)\test_gui_comboboxtest.o: ./controls/comboboxtest.cpp
$(OBJS)\test_gui_headerctrltest.o: ./controls/headerctrltest.cpp $(OBJS)\test_gui_headerctrltest.o: ./controls/headerctrltest.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_label.o: ./controls/label.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_listctrltest.o: ./controls/listctrltest.cpp $(OBJS)\test_gui_listctrltest.o: ./controls/listctrltest.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<

View File

@@ -121,6 +121,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_config.obj \ $(OBJS)\test_gui_config.obj \
$(OBJS)\test_gui_comboboxtest.obj \ $(OBJS)\test_gui_comboboxtest.obj \
$(OBJS)\test_gui_headerctrltest.obj \ $(OBJS)\test_gui_headerctrltest.obj \
$(OBJS)\test_gui_label.obj \
$(OBJS)\test_gui_listctrltest.obj \ $(OBJS)\test_gui_listctrltest.obj \
$(OBJS)\test_gui_textctrltest.obj \ $(OBJS)\test_gui_textctrltest.obj \
$(OBJS)\test_gui_textentrytest.obj \ $(OBJS)\test_gui_textentrytest.obj \
@@ -770,6 +771,9 @@ $(OBJS)\test_gui_comboboxtest.obj: .\controls\comboboxtest.cpp
$(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp $(OBJS)\test_gui_headerctrltest.obj: .\controls\headerctrltest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\headerctrltest.cpp
$(OBJS)\test_gui_label.obj: .\controls\label.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\label.cpp
$(OBJS)\test_gui_listctrltest.obj: .\controls\listctrltest.cpp $(OBJS)\test_gui_listctrltest.obj: .\controls\listctrltest.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\listctrltest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\listctrltest.cpp

View File

@@ -364,6 +364,7 @@ TEST_GUI_OBJECTS = &
$(OBJS)\test_gui_config.obj & $(OBJS)\test_gui_config.obj &
$(OBJS)\test_gui_comboboxtest.obj & $(OBJS)\test_gui_comboboxtest.obj &
$(OBJS)\test_gui_headerctrltest.obj & $(OBJS)\test_gui_headerctrltest.obj &
$(OBJS)\test_gui_label.obj &
$(OBJS)\test_gui_listctrltest.obj & $(OBJS)\test_gui_listctrltest.obj &
$(OBJS)\test_gui_textctrltest.obj & $(OBJS)\test_gui_textctrltest.obj &
$(OBJS)\test_gui_textentrytest.obj & $(OBJS)\test_gui_textentrytest.obj &
@@ -681,6 +682,9 @@ $(OBJS)\test_gui_comboboxtest.obj : .AUTODEPEND .\controls\comboboxtest.cpp
$(OBJS)\test_gui_headerctrltest.obj : .AUTODEPEND .\controls\headerctrltest.cpp $(OBJS)\test_gui_headerctrltest.obj : .AUTODEPEND .\controls\headerctrltest.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
$(OBJS)\test_gui_label.obj : .AUTODEPEND .\controls\label.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
$(OBJS)\test_gui_listctrltest.obj : .AUTODEPEND .\controls\listctrltest.cpp $(OBJS)\test_gui_listctrltest.obj : .AUTODEPEND .\controls\listctrltest.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<

View File

@@ -122,6 +122,7 @@
config/config.cpp config/config.cpp
controls/comboboxtest.cpp controls/comboboxtest.cpp
controls/headerctrltest.cpp controls/headerctrltest.cpp
controls/label.cpp
controls/listctrltest.cpp controls/listctrltest.cpp
controls/textctrltest.cpp controls/textctrltest.cpp
controls/textentrytest.cpp controls/textentrytest.cpp

View File

@@ -293,6 +293,10 @@ SOURCE=.\image\image.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\controls\label.cpp
# End Source File
# Begin Source File
SOURCE=.\controls\listctrltest.cpp SOURCE=.\controls\listctrltest.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@@ -655,6 +655,9 @@
<File <File
RelativePath=".\image\image.cpp"> RelativePath=".\image\image.cpp">
</File> </File>
<File
RelativePath=".\controls\label.cpp">
</File>
<File <File
RelativePath=".\controls\listctrltest.cpp"> RelativePath=".\controls\listctrltest.cpp">
</File> </File>

View File

@@ -947,6 +947,10 @@
RelativePath=".\image\image.cpp" RelativePath=".\image\image.cpp"
> >
</File> </File>
<File
RelativePath=".\controls\label.cpp"
>
</File>
<File <File
RelativePath=".\controls\listctrltest.cpp" RelativePath=".\controls\listctrltest.cpp"
> >

View File

@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<!--
This project was generated by
Bakefile 0.2.8 (http://www.bakefile.org)
Do not modify, all changes will be overwritten!
-->
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="test_gui" Name="test_gui"
ProjectGUID="{9BB295D9-A6AA-510D-AA0D-9375B5D91025}" ProjectGUID="{9BB295D9-A6AA-510D-AA0D-9375B5D91025}"
TargetFrameworkVersion="0"
> >
<Platforms> <Platforms>
<Platform <Platform
@@ -12,6 +18,7 @@
/> />
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
<Configurations> <Configurations>
<Configuration <Configuration
@@ -97,8 +104,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswud\test_vc9_test_gui.bsc" OutputFile="vc_mswud\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -178,9 +185,9 @@
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="vc_mswu\test_gui.pdb" ProgramDatabaseFile="vc_mswu\test_gui.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
@@ -193,8 +200,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswu\test_vc9_test_gui.bsc" OutputFile="vc_mswu\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -289,8 +296,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswunivud\test_vc9_test_gui.bsc" OutputFile="vc_mswunivud\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -370,9 +377,9 @@
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="vc_mswunivu\test_gui.pdb" ProgramDatabaseFile="vc_mswunivu\test_gui.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
@@ -385,8 +392,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswunivu\test_vc9_test_gui.bsc" OutputFile="vc_mswunivu\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -481,8 +488,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswuddll\test_vc9_test_gui.bsc" OutputFile="vc_mswuddll\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -562,9 +569,9 @@
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="vc_mswudll\test_gui.pdb" ProgramDatabaseFile="vc_mswudll\test_gui.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
@@ -577,8 +584,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswudll\test_vc9_test_gui.bsc" OutputFile="vc_mswudll\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -673,8 +680,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswunivuddll\test_vc9_test_gui.bsc" OutputFile="vc_mswunivuddll\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -754,9 +761,9 @@
GenerateDebugInformation="true" GenerateDebugInformation="true"
ProgramDatabaseFile="vc_mswunivudll\test_gui.pdb" ProgramDatabaseFile="vc_mswunivudll\test_gui.pdb"
SubSystem="1" SubSystem="1"
TargetMachine="1"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
TargetMachine="1"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"
@@ -769,8 +776,8 @@
/> />
<Tool <Tool
Name="VCBscMakeTool" Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="vc_mswunivudll\test_vc9_test_gui.bsc" OutputFile="vc_mswunivudll\test_vc9_test_gui.bsc"
SuppressStartupBanner="true"
/> />
<Tool <Tool
Name="VCFxCopTool" Name="VCFxCopTool"
@@ -784,6 +791,7 @@
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>
<Files> <Files>
<Filter <Filter
@@ -798,62 +806,22 @@
<File <File
RelativePath=".\window\clientsize.cpp" RelativePath=".\window\clientsize.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\events\clone.cpp" RelativePath=".\events\clone.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\graphics\colour.cpp" RelativePath=".\graphics\colour.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\controls\comboboxtest.cpp" RelativePath=".\controls\comboboxtest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\config\config.cpp" RelativePath=".\config\config.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\dummy.cpp" RelativePath=".\dummy.cpp"
@@ -930,206 +898,74 @@
<File <File
RelativePath=".\font\fonttest.cpp" RelativePath=".\font\fonttest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\misc\garbage.cpp" RelativePath=".\misc\garbage.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\misc\guifuncs.cpp" RelativePath=".\misc\guifuncs.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\controls\headerctrltest.cpp" RelativePath=".\controls\headerctrltest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\html\htmlwindow.cpp" RelativePath=".\html\htmlwindow.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\image\image.cpp" RelativePath=".\image\image.cpp"
> >
<FileConfiguration </File>
Name="Debug|Win32" <File
ExcludedFromBuild="true" RelativePath=".\controls\label.cpp"
> >
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\controls\listctrltest.cpp" RelativePath=".\controls\listctrltest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\graphics\measuring.cpp" RelativePath=".\graphics\measuring.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\geometry\point.cpp" RelativePath=".\geometry\point.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\events\propagation.cpp" RelativePath=".\events\propagation.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\image\rawbmp.cpp" RelativePath=".\image\rawbmp.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\geometry\rect.cpp" RelativePath=".\geometry\rect.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\misc\selstoretest.cpp" RelativePath=".\misc\selstoretest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\window\setsize.cpp" RelativePath=".\window\setsize.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\misc\settings.cpp" RelativePath=".\misc\settings.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\geometry\size.cpp" RelativePath=".\geometry\size.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\net\socket.cpp" RelativePath=".\net\socket.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\test.cpp" RelativePath=".\test.cpp"
@@ -1138,38 +974,14 @@
<File <File
RelativePath=".\controls\textctrltest.cpp" RelativePath=".\controls\textctrltest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\controls\textentrytest.cpp" RelativePath=".\controls\textentrytest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\controls\treectrltest.cpp" RelativePath=".\controls\treectrltest.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File> </File>
</Filter> </Filter>
<Filter <Filter
@@ -1184,5 +996,7 @@
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
</VisualStudioProject> </VisualStudioProject>