Removed constraints check for wxDirDialog from configure (not needed).
Implemented solid drawing for DoDrawText, so text selection works git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
12
configure
vendored
12
configure
vendored
@@ -20225,17 +20225,13 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_DIRDLG" = "yes"; then
|
if test "$wxUSE_DIRDLG" = "yes"; then
|
||||||
if test "$wxUSE_CONSTRAINTS" != "yes"; then
|
if test "$wxUSE_TREECTRL" != "yes"; then
|
||||||
echo "configure: warning: wxDirDialog requires constraints so it won't be compiled without them" 1>&2
|
echo "configure: warning: wxDirDialog requires wxTreeCtrl so it won't be compiled without it" 1>&2
|
||||||
else
|
else
|
||||||
if test "$wxUSE_TREECTRL" != "yes"; then
|
cat >> confdefs.h <<\EOF
|
||||||
echo "configure: warning: wxDirDialog requires wxTreeCtrl so it won't be compiled without it" 1>&2
|
|
||||||
else
|
|
||||||
cat >> confdefs.h <<\EOF
|
|
||||||
#define wxUSE_DIRDLG 1
|
#define wxUSE_DIRDLG 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -20462,7 +20458,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||||
echo "configure:20466: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
echo "configure:20462: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
10
configure.in
10
configure.in
@@ -4567,14 +4567,10 @@ if test "$wxUSE_FONTDLG" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_DIRDLG" = "yes"; then
|
if test "$wxUSE_DIRDLG" = "yes"; then
|
||||||
if test "$wxUSE_CONSTRAINTS" != "yes"; then
|
if test "$wxUSE_TREECTRL" != "yes"; then
|
||||||
AC_MSG_WARN(wxDirDialog requires constraints so it won't be compiled without them)
|
AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
|
||||||
else
|
else
|
||||||
if test "$wxUSE_TREECTRL" != "yes"; then
|
AC_DEFINE(wxUSE_DIRDLG)
|
||||||
AC_MSG_WARN(wxDirDialog requires wxTreeCtrl so it won't be compiled without it)
|
|
||||||
else
|
|
||||||
AC_DEFINE(wxUSE_DIRDLG)
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1061,9 +1061,13 @@ bool wxListBox::PerformAction(const wxControlAction& action,
|
|||||||
int item = (int)numArg;
|
int item = (int)numArg;
|
||||||
|
|
||||||
if ( action == wxACTION_LISTBOX_SETFOCUS )
|
if ( action == wxACTION_LISTBOX_SETFOCUS )
|
||||||
|
{
|
||||||
SetCurrentItem(item);
|
SetCurrentItem(item);
|
||||||
|
}
|
||||||
else if ( action == wxACTION_LISTBOX_ACTIVATE )
|
else if ( action == wxACTION_LISTBOX_ACTIVATE )
|
||||||
|
{
|
||||||
Activate(item);
|
Activate(item);
|
||||||
|
}
|
||||||
else if ( action == wxACTION_LISTBOX_TOGGLE )
|
else if ( action == wxACTION_LISTBOX_TOGGLE )
|
||||||
{
|
{
|
||||||
if ( item == -1 )
|
if ( item == -1 )
|
||||||
|
@@ -1361,17 +1361,32 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
|
|||||||
x = XLOG2DEV(x);
|
x = XLOG2DEV(x);
|
||||||
y = YLOG2DEV(y);
|
y = YLOG2DEV(y);
|
||||||
|
|
||||||
#if 0
|
// First draw a rectangle representing the text background, if a text
|
||||||
wxCoord width = gdk_string_width( font, text.mbc_str() );
|
// background is specified
|
||||||
wxCoord height = font->ascent + font->descent;
|
if (m_textBackgroundColour.Ok () && (m_backgroundMode != wxTRANSPARENT))
|
||||||
|
|
||||||
if ( m_backgroundMode == wxSOLID )
|
|
||||||
{
|
{
|
||||||
gdk_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() );
|
// Since X draws from the baseline of the text, must add the text height
|
||||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height );
|
int cx = 0;
|
||||||
gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() );
|
int cy = 0;
|
||||||
|
int ascent = 0;
|
||||||
|
int slen;
|
||||||
|
int direction, descent;
|
||||||
|
|
||||||
|
slen = strlen(text);
|
||||||
|
XCharStruct overall_return;
|
||||||
|
|
||||||
|
(void)XTextExtents(xfont, text.c_str(), slen, &direction,
|
||||||
|
&ascent, &descent, &overall_return);
|
||||||
|
|
||||||
|
cx = overall_return.width;
|
||||||
|
cy = ascent + descent;
|
||||||
|
m_textBackgroundColour.CalcPixel(m_cmap);
|
||||||
|
XSetForeground ((Display*) m_display, (GC) m_textGC, m_textBackgroundColour.GetPixel());
|
||||||
|
XFillRectangle( (Display*) m_display, (Window) m_window,
|
||||||
|
(GC) m_textGC, x, y, cx, cy );
|
||||||
|
XSetForeground ((Display*) m_display, (GC) m_textGC, m_textForegroundColour.GetPixel());
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
XSetFont( (Display*) m_display, (GC) m_textGC, xfont->fid );
|
XSetFont( (Display*) m_display, (GC) m_textGC, xfont->fid );
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
|
Reference in New Issue
Block a user