wxCommandEvent::SetString() change - now uses wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f42d2aba76
commit
2900641401
@ -346,8 +346,8 @@ public:
|
||||
int GetSelection() const { return m_commandInt; }
|
||||
|
||||
// Set/Get listbox/choice selection string
|
||||
void SetString(char* s) { m_commandString = s; }
|
||||
char *GetString() const { return m_commandString; }
|
||||
void SetString(const wxString& s) { m_commandString = s; }
|
||||
const wxString& GetString() const { return m_commandString; }
|
||||
|
||||
// Get checkbox value
|
||||
bool Checked() const { return (m_commandInt != 0); }
|
||||
@ -362,7 +362,7 @@ public:
|
||||
long GetInt() const { return m_commandInt ; }
|
||||
|
||||
public:
|
||||
char* m_commandString; // String event argument
|
||||
wxString m_commandString; // String event argument
|
||||
int m_commandInt;
|
||||
long m_extraLong; // Additional information (e.g. select/deselect)
|
||||
void* m_clientData; // Arbitrary client data
|
||||
|
@ -35,14 +35,13 @@ extern const char *wxChoiceNameStr;
|
||||
// wxChoice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxChoice: public wxControl
|
||||
class wxChoice : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
|
||||
wxChoice();
|
||||
inline wxChoice( wxWindow *parent, wxWindowID id,
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
@ -83,7 +82,7 @@ public:
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
|
||||
// implementation
|
||||
// implementation
|
||||
|
||||
wxList m_clientDataList;
|
||||
wxList m_clientObjectList;
|
||||
|
@ -35,14 +35,13 @@ extern const char *wxChoiceNameStr;
|
||||
// wxChoice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxChoice: public wxControl
|
||||
class wxChoice : public wxControl
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
|
||||
public:
|
||||
|
||||
wxChoice();
|
||||
inline wxChoice( wxWindow *parent, wxWindowID id,
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
@ -83,7 +82,7 @@ public:
|
||||
void SetSelection( int n );
|
||||
void SetStringSelection( const wxString &string );
|
||||
|
||||
// implementation
|
||||
// implementation
|
||||
|
||||
wxList m_clientDataList;
|
||||
wxList m_clientObjectList;
|
||||
|
@ -1,157 +1,630 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: setup.h
|
||||
// Purpose: Configuration for the library
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/* ./include/wx/motif/setup.h. Generated automatically by configure. */
|
||||
/* setup.h
|
||||
|
||||
#ifndef _WX_SETUP_H_
|
||||
#define _WX_SETUP_H_
|
||||
Do not edit this file. It is autogenerated by configure.
|
||||
|
||||
/*
|
||||
* General features
|
||||
*
|
||||
*/
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
#define wxUSE_CONSTRAINTS 1
|
||||
// Use constraints mechanism
|
||||
#define wxUSE_CONFIG 1
|
||||
// Use wxConfig, with CreateConfig in wxApp
|
||||
#define WXWIN_COMPATIBILITY 0
|
||||
// Minor compatibility with 1.68 API.
|
||||
// 1: on 0: off.
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Features as requested by configure */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#define wxUSE_POSTSCRIPT 1
|
||||
// 0 for no PostScript device context
|
||||
#define wxUSE_AFM_FOR_POSTSCRIPT 0
|
||||
// 1 to use font metric files in GetTextExtent
|
||||
#define wxUSE_METAFILE 1
|
||||
// 0 for no Metafile and metafile device context
|
||||
#define wxUSE_IPC 1
|
||||
// 0 for no interprocess comms
|
||||
#define wxUSE_HELP 1
|
||||
// 0 for no help facility
|
||||
#define wxUSE_RESOURCES 1
|
||||
// 0 for no wxGetResource/wxWriteResource
|
||||
#define wxUSE_CLIPBOARD 1
|
||||
// 0 for no clipboard functions
|
||||
#define wxUSE_SPLINES 1
|
||||
// 0 for no splines
|
||||
#define wxUSE_XFIG_SPLINE_CODE 1
|
||||
// 1 for XFIG spline code, 0 for AIAI spline code.
|
||||
// AIAI spline code is slower, but freer of copyright issues.
|
||||
// 0 for no splines
|
||||
|
||||
#define wxUSE_XPM 1
|
||||
// Use XPMs
|
||||
|
||||
#define wxUSE_TOOLBAR 1
|
||||
// Use toolbars
|
||||
#define wxUSE_COMBOBOX 1
|
||||
// Use wxComboBox
|
||||
#define wxUSE_DRAG_AND_DROP 1
|
||||
// 0 for no drag and drop
|
||||
|
||||
#define wxUSE_WX_RESOURCES 1
|
||||
// Use .wxr resource mechanism (requires PrologIO library)
|
||||
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 1
|
||||
// Set to 0 to disable document/view architecture
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
// Set to 0 to disable print/preview architecture code
|
||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
||||
// Set to 0 to disable PostScript print/preview architecture code
|
||||
// under Windows (just use Windows printing).
|
||||
#define wxUSE_DYNAMIC_CLASSES 1
|
||||
// If 1, enables provision of run-time type information.
|
||||
// NOW MANDATORY: don't change.
|
||||
#define wxUSE_MEMORY_TRACING 1
|
||||
// If 1, enables debugging versions of wxObject::new and
|
||||
// wxObject::delete *IF* __WXDEBUG__ is also defined.
|
||||
// WARNING: this code may not work with all architectures, especially
|
||||
// if alignment is an issue.
|
||||
#define wxUSE_DEBUG_CONTEXT 1
|
||||
// If 1, enables wxDebugContext, for
|
||||
// writing error messages to file, etc.
|
||||
// If WXDEBUG is not defined, will still use
|
||||
// normal memory operators.
|
||||
// It's recommended to set this to 1,
|
||||
// since you may well need to output
|
||||
// an error log in a production
|
||||
// version (or non-debugging beta)
|
||||
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 1
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors), set this to 0.
|
||||
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 1
|
||||
// In debug mode, causes new to be defined to
|
||||
// be WXDEBUG_NEW (see object.h).
|
||||
// If this causes problems (e.g. link errors), set this to 0.
|
||||
|
||||
#define REMOVE_UNUSED_ARG 1
|
||||
// Set this to 0 if your compiler can't cope
|
||||
// with omission of prototype parameters.
|
||||
|
||||
#define wxUSE_C_MAIN 0
|
||||
// Set to 1 to use main.c instead of main.cpp (UNIX only)
|
||||
|
||||
#define wxUSE_ODBC 0
|
||||
// Define 1 to use ODBC classes
|
||||
|
||||
#define wxUSE_IOSTREAMH 1
|
||||
// VC++ 4.2 and above allows <iostream> and <iostream.h>
|
||||
// but you can't mix them. Set to 1 for <iostream.h>,
|
||||
// 0 for <iostream>
|
||||
|
||||
#define wxUSE_WXCONFIG 1
|
||||
// if enabled, compiles built-in OS independent wxConfig
|
||||
// class and it's file (any platform) and registry (Win)
|
||||
// based implementations
|
||||
|
||||
#define wxUSE_GADGETS 0
|
||||
// Use gadgets where possible
|
||||
|
||||
#define wxUSE_TIMEDATE 1
|
||||
// Use time and date
|
||||
|
||||
#define wxUSE_THREADS 0
|
||||
// Use threads
|
||||
|
||||
#define wxUSE_ZLIB 1
|
||||
// Use zlib for compression in streams and PNG code
|
||||
#define wxUSE_LIBPNG 1
|
||||
// Use PNG bitmap code
|
||||
#define wxUSE_STD_IOSTREAM 1
|
||||
// Use standard C++ streams if 1. If 0, use wxWin
|
||||
// streams implementation.
|
||||
#define wxUSE_STREAMS 1
|
||||
// Use wxStream implementation within wxWindows code
|
||||
|
||||
#define wxUSE_SERIAL 0
|
||||
// Use serialization (requires utils/serialize)
|
||||
|
||||
#define wxUSE_TOOLTIPS 0
|
||||
// Use tooltips
|
||||
|
||||
#define wxUSE_DYNLIB_CLASS 0
|
||||
// Use wxLibrary
|
||||
#define wxUSE_SOCKETS 1
|
||||
// Set to 1 to use socket classes
|
||||
|
||||
/*
|
||||
* Finer detail
|
||||
*
|
||||
*/
|
||||
|
||||
#define wxUSE_APPLE_IEEE 1
|
||||
// if enabled, the float codec written by Apple
|
||||
// will be used to write, in a portable way,
|
||||
// float on the disk
|
||||
#ifndef __GTKSETUPH__
|
||||
#define __GTKSETUPH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
// _WX_SETUP_H_
|
||||
|
||||
/* define the system to compile */
|
||||
#define __UNIX__ 1
|
||||
#define __LINUX__ 1
|
||||
/* #undef __SGI__ */
|
||||
/* #undef __HPUX__ */
|
||||
/* #undef __SYSV__ */
|
||||
/* #undef __SVR4__ */
|
||||
/* #undef __AIX__ */
|
||||
/* #undef __SUN__ */
|
||||
/* #undef __SOLARIS__ */
|
||||
/* #undef __SUNOS__ */
|
||||
/* #undef __ALPHA__ */
|
||||
/* #undef __OSF__ */
|
||||
/* #undef __BSD__ */
|
||||
/* #undef __FREEBSD__ */
|
||||
/* #undef __VMS__ */
|
||||
/* #undef __ULTRIX__ */
|
||||
/* #undef __DATA_GENERAL__ */
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* compiler options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Supports bool type
|
||||
*/
|
||||
#define HAVE_BOOL 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* library options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use zlib
|
||||
*/
|
||||
#define wxUSE_ZLIB 1
|
||||
/*
|
||||
* Use libpng
|
||||
*/
|
||||
#define wxUSE_LIBPNG 1
|
||||
/*
|
||||
* Use libjpeg
|
||||
*/
|
||||
#define wxUSE_LIBJPEG 0
|
||||
/*
|
||||
* Use iODBC
|
||||
*/
|
||||
#define wxUSE_ODBC 0
|
||||
/*
|
||||
* Use Threads
|
||||
*/
|
||||
#define wxUSE_THREADS 1
|
||||
/*
|
||||
* Have glibc2
|
||||
*/
|
||||
#define wxHAVE_GLIBC2 1
|
||||
/*
|
||||
* Use libXpm
|
||||
*/
|
||||
#define wxHAVE_LIB_XPM 0
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* GUI control options (always enabled in wxGTK) */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/*
|
||||
* Use gauge item
|
||||
*/
|
||||
#define wxUSE_GAUGE 1
|
||||
/*
|
||||
* Use combobox item
|
||||
*/
|
||||
#define wxUSE_COMBOBOX 1
|
||||
/*
|
||||
* Use scrollbar item
|
||||
*/
|
||||
#define wxUSE_SCROLLBAR 1
|
||||
/*
|
||||
* Use scrollbar item
|
||||
*/
|
||||
#define wxUSE_RADIOBUTTON 1
|
||||
/*
|
||||
* Use toolbar item
|
||||
*/
|
||||
#define wxUSE_TOOLBAR 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* non-GUI options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use time and date classes
|
||||
*/
|
||||
#define wxUSE_TIMEDATE 1
|
||||
/*
|
||||
* Use config system
|
||||
*/
|
||||
#define wxUSE_CONFIG 1
|
||||
/*
|
||||
* Use intl system
|
||||
*/
|
||||
#define wxUSE_INTL 1
|
||||
/*
|
||||
* Use streams
|
||||
*/
|
||||
#define wxUSE_STREAMS 1
|
||||
/*
|
||||
* Use class serialization
|
||||
*/
|
||||
#define wxUSE_SERIAL 0
|
||||
/*
|
||||
* Use sockets
|
||||
*/
|
||||
#define wxUSE_SOCKETS 1
|
||||
/*
|
||||
* Use standard C++ streams if 1. If 0, use wxWin
|
||||
* streams implementation.
|
||||
*/
|
||||
#define wxUSE_STD_IOSTREAM 1
|
||||
/*
|
||||
* Use constraints mechanism
|
||||
*/
|
||||
#define wxUSE_CONSTRAINTS 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* PS options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use font metric files in GetTextExtent for wxPostScriptDC
|
||||
* Use consistent PostScript fonts for AFM and printing (!)
|
||||
*/
|
||||
#define wxUSE_AFM_FOR_POSTSCRIPT 1
|
||||
#define WX_NORMALIZED_PS_FONTS 1
|
||||
/*
|
||||
* Use PostScript device context
|
||||
*/
|
||||
#define wxUSE_POSTSCRIPT 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* wxString options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Compile wxString with wide character (Unicode) support?
|
||||
*/
|
||||
#define wxUSE_UNICODE 1
|
||||
|
||||
/*
|
||||
* Work around a bug in GNU libc 5.x wcstombs() implementation.
|
||||
*
|
||||
* Note that you must link your programs with libc.a if you enable this and you
|
||||
* have libc 5 (you should enable this for libc6 where wcsrtombs() is
|
||||
* thread-safe version of wcstombs()).
|
||||
*/
|
||||
#define wxUSE_WCSRTOMBS 0
|
||||
|
||||
/*
|
||||
* On some platforms overloading on size_t/int doesn't work, yet we'd like
|
||||
* to define both size_t and int version of wxString::operator[] because it
|
||||
* should really be size_t, but a lot of old, broken code uses int indices.
|
||||
*/
|
||||
#define wxUSE_SIZE_T_STRING_OPERATOR 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* misc options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use Interprocess communication
|
||||
*/
|
||||
#define wxUSE_IPC 1
|
||||
/*
|
||||
* Use wxGetResource & wxWriteResource (change .Xdefaults)
|
||||
*/
|
||||
#define wxUSE_RESOURCES 1
|
||||
/*
|
||||
* Use clipboard
|
||||
*/
|
||||
#define wxUSE_CLIPBOARD 1
|
||||
/*
|
||||
* Use tooltips
|
||||
*/
|
||||
#define wxUSE_TOOLTIPS 1
|
||||
/*
|
||||
* Use dnd
|
||||
*/
|
||||
#define wxUSE_DRAG_AND_DROP 1
|
||||
/*
|
||||
* Use wxLibrary class
|
||||
*/
|
||||
#define wxUSE_DYNLIB_CLASS 0
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* architecture options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use the mdi architecture
|
||||
*/
|
||||
#define wxUSE_MDI_ARCHITECTURE 1
|
||||
/*
|
||||
* Use the document/view architecture
|
||||
*/
|
||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 1
|
||||
/*
|
||||
* Use the print/preview architecture
|
||||
*/
|
||||
#define wxUSE_PRINTING_ARCHITECTURE 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Prolog and wxWindows' resource system options */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use Prolog IO
|
||||
*/
|
||||
#define wxUSE_PROLOGIO 1
|
||||
/*
|
||||
* Use Remote Procedure Call (Needs wxUSE_IPC and wxUSE_PROLOGIO)
|
||||
*/
|
||||
#define wxUSE_RPC 0
|
||||
/*
|
||||
* Use wxWindows resource loading (.wxr-files) (Needs wxUSE_PROLOGIO 1)
|
||||
*/
|
||||
#define wxUSE_WX_RESOURCES 1
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* the rest */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/*
|
||||
* Use wxWindows help facility (needs wxUSE_IPC 1)
|
||||
*/
|
||||
#define wxUSE_HELP 1
|
||||
/*
|
||||
* Use iostream.h rather than iostream
|
||||
*/
|
||||
#define wxUSE_IOSTREAMH 1
|
||||
/*
|
||||
* Use Apple Ieee-double converter
|
||||
*/
|
||||
#define wxUSE_APPLE_IEEE 1
|
||||
/* Compatibility with 1.66 API.
|
||||
Level 0: no backward compatibility, all new features
|
||||
Level 1: wxDC, OnSize (etc.) compatibility, but
|
||||
some new features such as event tables */
|
||||
#define WXWIN_COMPATIBILITY 0
|
||||
/*
|
||||
* Enables debugging: memory tracing, assert, etc., contains debug level
|
||||
*/
|
||||
#define WXDEBUG 1
|
||||
/*
|
||||
* Enables debugging version of wxObject::new and wxObject::delete (IF WXDEBUG)
|
||||
* WARNING: this code may not work with all architectures, especially
|
||||
* if alignment is an issue.
|
||||
*/
|
||||
#define wxUSE_MEMORY_TRACING 0
|
||||
/*
|
||||
* Enable debugging version of global memory operators new and delete
|
||||
* Disable it, If this causes problems (e.g. link errors)
|
||||
*/
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 1
|
||||
/*
|
||||
* In debug mode, causes new to be defined to
|
||||
* be WXDEBUG_NEW (see object.h). If this causes
|
||||
* problems (e.g. link errors), set this to 0.
|
||||
*/
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
/*
|
||||
* Matthews garbage collection (used for MrEd?)
|
||||
*/
|
||||
#define WXGARBAGE_COLLECTION_ON 0
|
||||
/*
|
||||
* Use splines
|
||||
*/
|
||||
#define wxUSE_SPLINES 1
|
||||
/*
|
||||
* wxUSE_DYNAMIC_CLASSES is TRUE for the Xt port
|
||||
*/
|
||||
#define wxUSE_DYNAMIC_CLASSES 1
|
||||
/*
|
||||
* Disable this if your compiler can't cope
|
||||
* with omission of prototype parameters.
|
||||
*/
|
||||
#define REMOVE_UNUSED_ARG 1
|
||||
/*
|
||||
* The const keyword is being introduced more in wxWindows.
|
||||
* You can use this setting to maintain backward compatibility.
|
||||
* If 0: will use const wherever possible.
|
||||
* If 1: will use const only where necessary
|
||||
* for precompiled headers to work.
|
||||
* If 2: will be totally backward compatible, but precompiled
|
||||
* headers may not work and program size will be larger.
|
||||
*/
|
||||
#define CONST_COMPATIBILITY 0
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* System-specific stuff */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define if type char is unsigned and you are not using gcc. */
|
||||
#ifndef __CHAR_UNSIGNED__
|
||||
/* #undef __CHAR_UNSIGNED__ */
|
||||
#endif
|
||||
|
||||
/* Define if the closedir function returns void instead of int. */
|
||||
/* #undef CLOSEDIR_VOID */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define for DGUX with <sys/dg_sys_info.h>. */
|
||||
/* #undef DGUX */
|
||||
|
||||
/* Define if you have <dirent.h>. */
|
||||
/* #undef DIRENT */
|
||||
|
||||
/* Define to the type of elements in the array set by `getgroups'.
|
||||
Usually this is either `int' or `gid_t'. */
|
||||
#define GETGROUPS_T gid_t
|
||||
|
||||
/* The type of 3rd argument to getsockname() - usually size_t or int */
|
||||
#define SOCKLEN_T size_t
|
||||
|
||||
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
|
||||
/* #undef GETLOADAVG_PRIVILEGED */
|
||||
|
||||
/* Define if the `getpgrp' function takes no argument. */
|
||||
/* #undef GETPGRP_VOID */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
/* #undef HAVE_ALLOCA */
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have sched.h */
|
||||
#define HAVE_SCHED_H 1
|
||||
|
||||
/* Define if you have strings.h */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define if you have vprintf() */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define if you have dlopen() */
|
||||
/* #undef HAVE_DLOPEN */
|
||||
|
||||
/* Define if you have shl_load() */
|
||||
/* #undef HAVE_SHL_LOAD */
|
||||
|
||||
/* Define if you have vsnprintf() */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define if you have usleep() */
|
||||
/* #undef HAVE_USLEEP */
|
||||
|
||||
/* Define if you have nanosleep() */
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
/* Define if you have vfork() */
|
||||
#define HAVE_VFORK 1
|
||||
|
||||
/* Define if you have uname() */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define if you have gethostname() */
|
||||
/* #undef HAVE_GETHOSTNAME */
|
||||
|
||||
/* Define if you have sched_yield */
|
||||
#define HAVE_SCHED_YIELD 1
|
||||
|
||||
/* Define if you have pthread_cancel */
|
||||
#define HAVE_PTHREAD_CANCEL 1
|
||||
|
||||
/* Define if you have all functions to set thread priority */
|
||||
#define HAVE_THREAD_PRIORITY_FUNCTIONS 1
|
||||
|
||||
/* Define if your system has its own `getloadavg' function. */
|
||||
/* #undef HAVE_GETLOADAVG */
|
||||
|
||||
/* Define if you have the getmntent function. */
|
||||
/* #undef HAVE_GETMNTENT */
|
||||
|
||||
/* Define if the `long double' type works. */
|
||||
#define HAVE_LONG_DOUBLE 1
|
||||
|
||||
/* Define if you support file names longer than 14 characters. */
|
||||
#define HAVE_LONG_FILE_NAMES 1
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if system calls automatically restart after interruption
|
||||
by a signal. */
|
||||
/* #undef HAVE_RESTARTABLE_SYSCALLS */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
#define HAVE_ST_BLKSIZE 1
|
||||
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
#define HAVE_ST_BLOCKS 1
|
||||
|
||||
/* Define if you have the strcoll function and it is properly defined. */
|
||||
/* #undef HAVE_STRCOLL */
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
#define HAVE_ST_RDEV 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
/* #undef HAVE_STRFTIME */
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define if your struct tm has tm_zone. */
|
||||
#define HAVE_TM_ZONE 1
|
||||
|
||||
/* Define if you don't have tm_zone but do have the external array
|
||||
tzname. */
|
||||
/* #undef HAVE_TZNAME */
|
||||
|
||||
/* Define if you have <unistd.h>. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have <fnmatch.h>. */
|
||||
#define HAVE_FNMATCH_H 1
|
||||
|
||||
/* Define if utime(file, NULL) sets file's timestamp to the present. */
|
||||
/* #undef HAVE_UTIME_NULL */
|
||||
|
||||
/* Define if you have <vfork.h>. */
|
||||
/* #undef HAVE_VFORK_H */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define if you have the wait3 system call. */
|
||||
/* #undef HAVE_WAIT3 */
|
||||
|
||||
/* Define as __inline if that's what the C compiler calls it. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
|
||||
/* #undef MAJOR_IN_MKDEV */
|
||||
|
||||
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
|
||||
/* #undef MAJOR_IN_SYSMACROS */
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
|
||||
/* #undef NDIR */
|
||||
|
||||
/* Define if you have <memory.h>, and <string.h> doesn't declare the
|
||||
mem* functions. */
|
||||
/* #undef NEED_MEMORY_H */
|
||||
|
||||
/* Define if your struct nlist has an n_un member. */
|
||||
/* #undef NLIST_NAME_UNION */
|
||||
|
||||
/* Define if you have <nlist.h>. */
|
||||
/* #undef NLIST_STRUCT */
|
||||
|
||||
/* Define if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
with this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if the setvbuf function takes the buffering type as its second
|
||||
argument and the buffer pointer as the third, as on System V
|
||||
before release 3. */
|
||||
/* #undef SETVBUF_REVERSED */
|
||||
|
||||
/* Define SIZESOF for some Objects */
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_INT_P 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define on System V Release 4. */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define on BSD */
|
||||
/* #undef BSD */
|
||||
|
||||
/* Define on System V */
|
||||
/* #undef SYSV */
|
||||
|
||||
/* Define if you don't have <dirent.h>, but have <sys/dir.h>. */
|
||||
/* #undef SYSDIR */
|
||||
|
||||
/* Define if you don't have <dirent.h>, but have <sys/ndir.h>. */
|
||||
/* #undef SYSNDIR */
|
||||
|
||||
/* Define if `sys_siglist' is declared by <signal.h>. */
|
||||
/* #undef SYS_SIGLIST_DECLARED */
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef uid_t */
|
||||
|
||||
/* Define for Encore UMAX. */
|
||||
/* #undef UMAX */
|
||||
|
||||
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
|
||||
instead of <sys/cpustats.h>. */
|
||||
/* #undef UMAX4_3 */
|
||||
|
||||
/* Define if you do not have <strings.h>, index, bzero, etc.. */
|
||||
/* #undef USG */
|
||||
|
||||
/* Define if the system is System V Release 4 */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
/* #undef vfork */
|
||||
|
||||
/* Define if the closedir function returns void instead of int. */
|
||||
/* #undef VOID_CLOSEDIR */
|
||||
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Define if lex declares yytext as a char * by default, not a char[]. */
|
||||
#define YYTEXT_POINTER 1
|
||||
|
||||
#endif /* __GTKSETUPH__ */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
||||
|
@ -83,7 +83,8 @@ BEGIN_EVENT_TABLE(wxPropertyListView, wxPropertyView)
|
||||
EVT_BUTTON(wxID_PROP_EDIT, wxPropertyListView::OnEdit)
|
||||
EVT_TEXT_ENTER(wxID_PROP_TEXT, wxPropertyListView::OnText)
|
||||
EVT_LISTBOX(wxID_PROP_SELECT, wxPropertyListView::OnPropertySelect)
|
||||
EVT_COMMAND(wxID_PROP_SELECT, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxPropertyListView::OnPropertyDoubleClick)
|
||||
EVT_COMMAND(wxID_PROP_SELECT, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
|
||||
wxPropertyListView::OnPropertyDoubleClick)
|
||||
EVT_LISTBOX(wxID_PROP_VALUE_SELECT, wxPropertyListView::OnValueListSelect)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
@ -29,13 +29,15 @@ extern bool g_blockEventsOnDrag;
|
||||
|
||||
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
||||
{
|
||||
if (!choice->HasVMT()) return;
|
||||
if (g_blockEventsOnDrag) return;
|
||||
if (!choice->HasVMT())
|
||||
return;
|
||||
|
||||
if (g_blockEventsOnDrag)
|
||||
return;
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() );
|
||||
event.SetInt( choice->GetSelection() );
|
||||
wxString tmp( choice->GetStringSelection() );
|
||||
event.SetString( WXSTRINGCAST(tmp) );
|
||||
event.SetString( choice->GetStringSelection() );
|
||||
event.SetEventObject(choice);
|
||||
choice->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
@ -63,9 +65,11 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_widget = gtk_option_menu_new();
|
||||
|
||||
wxSize newSize = size;
|
||||
if (newSize.x == -1) newSize.x = 80;
|
||||
if (newSize.y == -1) newSize.y = 26;
|
||||
wxSize newSize(size);
|
||||
if (newSize.x == -1)
|
||||
newSize.x = 80;
|
||||
if (newSize.y == -1)
|
||||
newSize.y = 26;
|
||||
SetSize( newSize.x, newSize.y );
|
||||
|
||||
GtkWidget *menu = gtk_menu_new();
|
||||
@ -239,13 +243,13 @@ int wxChoice::FindString( const wxString &string ) const
|
||||
|
||||
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
|
||||
|
||||
if (string == label->label) return count;
|
||||
if (string == label->label)
|
||||
return count;
|
||||
|
||||
child = child->next;
|
||||
count++;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "wxChoice: string not found" );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -298,7 +302,7 @@ wxString wxChoice::GetString( int n ) const
|
||||
count++;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "wxChoice: string not found" );
|
||||
wxFAIL_MSG( "wxChoice: invalid index in GetString()" );
|
||||
|
||||
return "";
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
#pragma implementation "combobox.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/combobox.h"
|
||||
|
||||
#include <wx/intl.h>
|
||||
@ -48,11 +47,9 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
|
||||
event.SetInt( combo->GetSelection() );
|
||||
event.SetString( copystring(combo->GetStringSelection()) );
|
||||
event.SetString( combo->GetStringSelection() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
delete [] event.GetString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -63,11 +60,9 @@ static void
|
||||
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
{
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event.SetString( copystring(combo->GetValue()) );
|
||||
event.SetString( combo->GetValue() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
delete [] event.GetString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -542,7 +537,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
// all!
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
|
||||
event.SetInt( 0 );
|
||||
event.SetString( (char *)value.c_str() );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
@ -556,7 +551,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
// and generate the selected event for it
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
|
||||
event.SetInt( Number() - 1 );
|
||||
event.SetString( (char *)value.c_str() );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
@ -44,8 +44,7 @@ static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRad
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() );
|
||||
event.SetInt( rb->GetSelection() );
|
||||
wxString tmp( rb->GetStringSelection() );
|
||||
event.SetString( WXSTRINGCAST(tmp) );
|
||||
event.SetString( rb->GetStringSelection() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
@ -29,13 +29,15 @@ extern bool g_blockEventsOnDrag;
|
||||
|
||||
static void gtk_choice_clicked_callback( GtkWidget *WXUNUSED(widget), wxChoice *choice )
|
||||
{
|
||||
if (!choice->HasVMT()) return;
|
||||
if (g_blockEventsOnDrag) return;
|
||||
if (!choice->HasVMT())
|
||||
return;
|
||||
|
||||
if (g_blockEventsOnDrag)
|
||||
return;
|
||||
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, choice->GetId() );
|
||||
event.SetInt( choice->GetSelection() );
|
||||
wxString tmp( choice->GetStringSelection() );
|
||||
event.SetString( WXSTRINGCAST(tmp) );
|
||||
event.SetString( choice->GetStringSelection() );
|
||||
event.SetEventObject(choice);
|
||||
choice->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
@ -63,9 +65,11 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_widget = gtk_option_menu_new();
|
||||
|
||||
wxSize newSize = size;
|
||||
if (newSize.x == -1) newSize.x = 80;
|
||||
if (newSize.y == -1) newSize.y = 26;
|
||||
wxSize newSize(size);
|
||||
if (newSize.x == -1)
|
||||
newSize.x = 80;
|
||||
if (newSize.y == -1)
|
||||
newSize.y = 26;
|
||||
SetSize( newSize.x, newSize.y );
|
||||
|
||||
GtkWidget *menu = gtk_menu_new();
|
||||
@ -239,13 +243,13 @@ int wxChoice::FindString( const wxString &string ) const
|
||||
|
||||
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
|
||||
|
||||
if (string == label->label) return count;
|
||||
if (string == label->label)
|
||||
return count;
|
||||
|
||||
child = child->next;
|
||||
count++;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "wxChoice: string not found" );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -298,7 +302,7 @@ wxString wxChoice::GetString( int n ) const
|
||||
count++;
|
||||
}
|
||||
|
||||
wxFAIL_MSG( "wxChoice: string not found" );
|
||||
wxFAIL_MSG( "wxChoice: invalid index in GetString()" );
|
||||
|
||||
return "";
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
#pragma implementation "combobox.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/combobox.h"
|
||||
|
||||
#include <wx/intl.h>
|
||||
@ -48,11 +47,9 @@ gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
|
||||
event.SetInt( combo->GetSelection() );
|
||||
event.SetString( copystring(combo->GetStringSelection()) );
|
||||
event.SetString( combo->GetStringSelection() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
delete [] event.GetString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -63,11 +60,9 @@ static void
|
||||
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
|
||||
{
|
||||
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->GetId() );
|
||||
event.SetString( copystring(combo->GetValue()) );
|
||||
event.SetString( combo->GetValue() );
|
||||
event.SetEventObject( combo );
|
||||
combo->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
delete [] event.GetString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -542,7 +537,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
// all!
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
|
||||
event.SetInt( 0 );
|
||||
event.SetString( (char *)value.c_str() );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
@ -556,7 +551,7 @@ void wxComboBox::OnChar( wxKeyEvent &event )
|
||||
// and generate the selected event for it
|
||||
wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() );
|
||||
event.SetInt( Number() - 1 );
|
||||
event.SetString( (char *)value.c_str() );
|
||||
event.SetString( value );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
@ -44,8 +44,7 @@ static void gtk_radiobutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxRad
|
||||
|
||||
wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, rb->GetId() );
|
||||
event.SetInt( rb->GetSelection() );
|
||||
wxString tmp( rb->GetStringSelection() );
|
||||
event.SetString( WXSTRINGCAST(tmp) );
|
||||
event.SetString( rb->GetStringSelection() );
|
||||
event.SetEventObject( rb );
|
||||
rb->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "listbox.h"
|
||||
#pragma implementation "listbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/listbox.h"
|
||||
@ -23,20 +23,23 @@
|
||||
#include "wx/motif/private.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
|
||||
#endif
|
||||
|
||||
void wxListBoxCallback (Widget w, XtPointer clientData,
|
||||
static void wxListBoxCallback(Widget w,
|
||||
XtPointer clientData,
|
||||
XmListCallbackStruct * cbs);
|
||||
|
||||
void wxListBoxDefaultActionProc (Widget list_w, XtPointer client_data, XmListCallbackStruct * cbs);
|
||||
static void wxListBoxDefaultActionProc(Widget list_w,
|
||||
XtPointer client_data,
|
||||
XmListCallbackStruct * cbs);
|
||||
|
||||
// ============================================================================
|
||||
// list box control implementation
|
||||
// ============================================================================
|
||||
|
||||
// Listbox item
|
||||
wxListBox::wxListBox(): m_clientDataList(wxKEY_INTEGER)
|
||||
wxListBox::wxListBox() : m_clientDataList(wxKEY_INTEGER)
|
||||
{
|
||||
m_noItems = 0;
|
||||
m_selected = 0;
|
||||
@ -173,7 +176,8 @@ void wxListBox::Delete(int N)
|
||||
if (node) m_clientDataList.DeleteNode(node); // if existed then delete from list
|
||||
node = m_clientDataList.First(); // we now have to adjust all keys that
|
||||
while (node) // are >=N+1
|
||||
{ if (node->GetKeyInteger() >= (long)(N+1))
|
||||
{
|
||||
if (node->GetKeyInteger() >= (long)(N+1))
|
||||
node->SetKeyInteger(node->GetKeyInteger() - 1);
|
||||
node = node->Next();
|
||||
}
|
||||
@ -371,7 +375,7 @@ void wxListBox::SetSelection(int N, bool select)
|
||||
m_inSetValue = TRUE;
|
||||
if (select)
|
||||
{
|
||||
/*
|
||||
#if 0
|
||||
if (m_windowStyle & wxLB_MULTIPLE)
|
||||
{
|
||||
int *selections = NULL;
|
||||
@ -391,7 +395,7 @@ void wxListBox::SetSelection(int N, bool select)
|
||||
XtVaSetValues ((Widget) m_mainWidget, XmNselectionPolicy, XmEXTENDED_SELECT, NULL);
|
||||
}
|
||||
else
|
||||
*/
|
||||
#endif // 0
|
||||
XmListSelectPos ((Widget) m_mainWidget, N + 1, FALSE);
|
||||
|
||||
}
|
||||
@ -596,28 +600,13 @@ void wxListBox::SetString(int N, const wxString& s)
|
||||
|
||||
XmString text = XmStringCreateSimple ((char*) (const char*) s);
|
||||
|
||||
// WHAT'S THE MOTIF CALL TO SET THE TEXT OF AN EXISTING
|
||||
// ITEM???
|
||||
// There isn't one, so delete the item and add it again.
|
||||
// delete the item and add it again.
|
||||
// FIXME isn't there a way to change it in place?
|
||||
XmListDeletePos (listBox, N+1);
|
||||
XmListAddItem (listBox, text, N+1);
|
||||
|
||||
XmStringFree(text);
|
||||
|
||||
/*
|
||||
// It seems that if the list is cleared, we must re-ask for
|
||||
// selection policy!!
|
||||
Arg args[3];
|
||||
XtSetArg (args[0], XmNlistSizePolicy, XmCONSTANT);
|
||||
if (m_windowStyle & wxLB_MULTIPLE)
|
||||
XtSetArg (args[1], XmNselectionPolicy, XmMULTIPLE_SELECT);
|
||||
else if (m_windowStyle & wxLB_EXTENDED)
|
||||
XtSetArg (args[1], XmNselectionPolicy, XmEXTENDED_SELECT);
|
||||
else
|
||||
XtSetArg (args[1], XmNselectionPolicy, XmBROWSE_SELECT);
|
||||
XtSetValues (listBox, args, 2);
|
||||
*/
|
||||
|
||||
GetSize (&width2, &height2);
|
||||
// Correct for randomly resized listbox - bad boy, Motif!
|
||||
if (width1 != width2 || height1 != height2)
|
||||
@ -632,11 +621,12 @@ int wxListBox::Number () const
|
||||
// For single selection items only
|
||||
wxString wxListBox::GetStringSelection () const
|
||||
{
|
||||
int sel = GetSelection ();
|
||||
wxString res;
|
||||
int sel = GetSelection();
|
||||
if (sel > -1)
|
||||
return this->GetString (sel);
|
||||
else
|
||||
return wxString("");
|
||||
res = GetString(sel);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
bool wxListBox::SetStringSelection (const wxString& s, bool flag)
|
||||
@ -666,7 +656,7 @@ void wxListBox::Command (wxCommandEvent & event)
|
||||
void wxListBoxCallback (Widget w, XtPointer clientData,
|
||||
XmListCallbackStruct * cbs)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
if (cbs->reason == XmCR_EXTENDED_SELECT)
|
||||
cout << "*** Extend select\n";
|
||||
else if (cbs->reason == XmCR_SINGLE_SELECT)
|
||||
@ -696,12 +686,10 @@ void wxListBoxCallback (Widget w, XtPointer clientData,
|
||||
case XmCR_BROWSE_SELECT:
|
||||
{
|
||||
event.m_clientData = item->GetClientData (cbs->item_position - 1);
|
||||
//event.commandString = item->GetStringSelection();
|
||||
event.m_commandInt = cbs->item_position - 1;
|
||||
event.m_extraLong = TRUE;
|
||||
event.SetEventObject(item);
|
||||
item->ProcessCommand (event);
|
||||
//delete[] event.commandString; // Let's not store the command string any more
|
||||
break;
|
||||
}
|
||||
case XmCR_EXTENDED_SELECT:
|
||||
@ -784,12 +772,14 @@ void wxListBox::ChangeForegroundColour()
|
||||
Widget parent = XtParent ((Widget) m_mainWidget);
|
||||
Widget hsb, vsb;
|
||||
|
||||
XtVaGetValues (parent,
|
||||
XtVaGetValues(parent,
|
||||
XmNhorizontalScrollBar, &hsb,
|
||||
XmNverticalScrollBar, &vsb,
|
||||
NULL);
|
||||
|
||||
/* TODO: should scrollbars be affected? Should probably have separate
|
||||
* function to change them (by default, taken from wxSystemSettings)
|
||||
function to change them (by default, taken from wxSystemSettings)
|
||||
|
||||
DoChangeForegroundColour((WXWidget) hsb, m_foregroundColour);
|
||||
DoChangeForegroundColour((WXWidget) vsb, m_foregroundColour);
|
||||
DoChangeForegroundColour((WXWidget) parent, m_foregroundColour);
|
||||
|
@ -38,12 +38,13 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
|
||||
event.SetInt(GetSelection());
|
||||
event.SetEventObject(this);
|
||||
event.SetString(copystring(GetStringSelection()));
|
||||
event.SetString(GetStringSelection());
|
||||
ProcessCommand(event);
|
||||
delete[] event.GetString();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else return FALSE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
||||
|
@ -41,21 +41,22 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId);
|
||||
event.SetInt(GetSelection());
|
||||
event.SetEventObject(this);
|
||||
event.SetString(copystring(GetStringSelection()));
|
||||
event.SetString(GetStringSelection());
|
||||
ProcessCommand(event);
|
||||
delete[] event.GetString();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else if (param == CBN_EDITCHANGE)
|
||||
{
|
||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
|
||||
event.SetString(copystring(GetValue()));
|
||||
event.SetString(GetValue());
|
||||
event.SetEventObject(this);
|
||||
ProcessCommand(event);
|
||||
delete[] event.GetString();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else return FALSE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
|
Loading…
Reference in New Issue
Block a user