Merge branch 'wxw3-update'

This commit is contained in:
Shawn Hoffman 2012-03-25 12:27:38 -07:00
commit d15740daf1
976 changed files with 45460 additions and 18343 deletions

View File

@ -146,12 +146,17 @@ if (APPLE)
# features can be used, not the minimum required version to run. # features can be used, not the minimum required version to run.
set(OSX_MIN_VERSION "10.5.4") set(OSX_MIN_VERSION "10.5.4")
set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}") set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}")
set(TARGET_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk") set(SYSROOT_LEGACY_PATH "/Developer/SDKs/MacOSX10.6.sdk")
if (NOT EXISTS "${TARGET_SYSROOT}/") set(SYSROOT_PATH "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
set(TARGET_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk") if (EXISTS "${SYSROOT_PATH}/")
set(TARGET_SYSROOT ${SYSROOT_PATH})
elif (EXISTS "${SYSROOT_LEGACY_PATH}/")
set(TARGET_SYSROOT ${SYSROOT_LEGACY_PATH})
endif()
if (${TARGET_SYSROOT})
set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot ${TARGET_SYSROOT}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,${TARGET_SYSROOT}")
endif() endif()
set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot ${TARGET_SYSROOT}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk")
# Do not warn about frameworks that are not available on all architectures. # Do not warn about frameworks that are not available on all architectures.
# This avoids a warning when linking with QuickTime. # This avoids a warning when linking with QuickTime.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings")
@ -472,10 +477,8 @@ endif()
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF) option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
if(NOT DISABLE_WX) if(NOT DISABLE_WX)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") include(FindwxWidgets OPTIONAL)
include(FindwxWidgets OPTIONAL) FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
endif()
if(wxWidgets_FOUND) if(wxWidgets_FOUND)
EXECUTE_PROCESS( EXECUTE_PROCESS(
@ -486,53 +489,61 @@ if(NOT DISABLE_WX)
ERROR_QUIET ERROR_QUIET
) )
message("Found wxWidgets version ${wxWidgets_VERSION}") message("Found wxWidgets version ${wxWidgets_VERSION}")
if(${wxWidgets_VERSION} VERSION_LESS "2.8.9") if(${wxWidgets_VERSION} VERSION_LESS "2.9.4")
message("At least 2.8.9 is required; ignoring found version") message("At least 2.9.4 is required; ignoring found version")
unset(wxWidgets_FOUND) unset(wxWidgets_FOUND)
endif() endif()
endif(wxWidgets_FOUND) endif(wxWidgets_FOUND)
if(wxWidgets_FOUND)
include(${wxWidgets_USE_FILE})
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
# There is a bug in the FindGTK module in cmake version 2.8.2 that # There is a bug in the FindGTK module in cmake version 2.8.2 that
# does not find gdk-pixbuf-2.0. On the other hand some 2.8.3 # does not find gdk-pixbuf-2.0. On the other hand some 2.8.3
# users have complained that pkg-config does not find # users have complained that pkg-config does not find
# gdk-pixbuf-2.0. On yet another hand, cmake version 2.8.3 in # gdk-pixbuf-2.0. On yet another hand, cmake version 2.8.3 in
# Ubuntu Natty does not find the glib libraries correctly. # Ubuntu Natty does not find the glib libraries correctly.
# Ugly!!! # Ugly!!!
execute_process(COMMAND lsb_release -c -s execute_process(COMMAND lsb_release -c -s
OUTPUT_VARIABLE DIST_NAME OUTPUT_VARIABLE DIST_NAME
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}
VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty") VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty")
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED) check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
else() else()
include(FindGTK2) include(FindGTK2)
if(GTK2_FOUND) if(GTK2_FOUND)
include_directories(${GTK2_INCLUDE_DIRS}) include_directories(${GTK2_INCLUDE_DIRS})
endif()
endif() endif()
endif() endif()
endif()
if(wxWidgets_FOUND)
include(${wxWidgets_USE_FILE})
message("wxWidgets found, enabling GUI build") message("wxWidgets found, enabling GUI build")
else(wxWidgets_FOUND) else(wxWidgets_FOUND)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
message(FATAL_ERROR "wxWidgets not found. It is required to build the GUI")
endif()
message("Using static wxWidgets from Externals") message("Using static wxWidgets from Externals")
# These definitions and includes are used when building dolphin against wx,
# not when building wx itself (see wxw3 CMakeLists.txt for that)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(-D__WXOSX_COCOA__) add_definitions(-D__WXOSX_COCOA__)
include_directories(Externals/wxWidgets3) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
include_directories(Externals/wxWidgets3/include) add_definitions(-D__WXGTK__)
add_subdirectory(Externals/wxWidgets3)
set(wxWidgets_LIBRARIES "wx") # Check for required libs
check_lib(GTHREAD2 gthread-2.0 glib/gthread.h REQUIRED)
check_lib(PANGOCAIRO pangocairo pango/pangocairo.h REQUIRED)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(-D__WXMSW__)
else() else()
include_directories(Externals/wxWidgets/include) message(FATAL_ERROR "wxWidgets in Externals is not compatible with your platform")
add_subdirectory(Externals/wxWidgets)
endif() endif()
include_directories(
Externals/wxWidgets3
Externals/wxWidgets3/include)
add_subdirectory(Externals/wxWidgets3)
set(wxWidgets_FOUND TRUE) set(wxWidgets_FOUND TRUE)
set(wxWidgets_LIBRARIES "wx")
endif(wxWidgets_FOUND) endif(wxWidgets_FOUND)
add_definitions(-DHAVE_WX=1) add_definitions(-DHAVE_WX=1)
endif(NOT DISABLE_WX) endif(NOT DISABLE_WX)

View File

@ -152,7 +152,6 @@
<None Include="CMakeLists.txt" /> <None Include="CMakeLists.txt" />
<None Include="dis_tables.inl" /> <None Include="dis_tables.inl" />
<None Include="opcodes.inl" /> <None Include="opcodes.inl" />
<None Include="SConscript" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -166,9 +166,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\CMakeLists.txt" /> <None Include="..\CMakeLists.txt" />
<None Include="..\SConscript" />
<None Include="generateClRun.pl" /> <None Include="generateClRun.pl" />
<None Include="Makefile" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -46,9 +46,7 @@
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Makefile" />
<None Include="..\CMakeLists.txt" /> <None Include="..\CMakeLists.txt" />
<None Include="..\SConscript" />
<None Include="generateClRun.pl"> <None Include="generateClRun.pl">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</None> </None>

View File

@ -143,7 +143,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="CMakeLists.txt" /> <None Include="CMakeLists.txt" />
<None Include="SConscript" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

View File

@ -26,6 +26,5 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="CMakeLists.txt" /> <None Include="CMakeLists.txt" />
<None Include="SConscript" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -150,7 +150,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="CMakeLists.txt" /> <None Include="CMakeLists.txt" />
<None Include="SConscript" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">

208
Externals/libpng/png/png.vcxproj vendored Normal file
View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="DebugFast|Win32">
<Configuration>DebugFast</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="DebugFast|x64">
<Configuration>DebugFast</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<None Include="..\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\png.c" />
<ClCompile Include="..\pngerror.c" />
<ClCompile Include="..\pngget.c" />
<ClCompile Include="..\pngmem.c" />
<ClCompile Include="..\pngpread.c" />
<ClCompile Include="..\pngread.c" />
<ClCompile Include="..\pngrio.c" />
<ClCompile Include="..\pngrtran.c" />
<ClCompile Include="..\pngrutil.c" />
<ClCompile Include="..\pngset.c" />
<ClCompile Include="..\pngtrans.c" />
<ClCompile Include="..\pngwio.c" />
<ClCompile Include="..\pngwrite.c" />
<ClCompile Include="..\pngwtran.c" />
<ClCompile Include="..\pngwutil.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\png.h" />
<ClInclude Include="..\pngconf.h" />
<ClInclude Include="..\pngdebug.h" />
<ClInclude Include="..\pnginfo.h" />
<ClInclude Include="..\pnglibconf.h" />
<ClInclude Include="..\pngpriv.h" />
<ClInclude Include="..\pngstruct.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{01573C36-AC6E-49F6-94BA-572517EB9740}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>png</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_Debug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_Debug.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_DebugFast.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_Release.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\Source\VSProps\Base.props" />
<Import Project="..\..\..\Source\VSProps\CodeGen_DebugFast.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="..\CMakeLists.txt" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\png.c" />
<ClCompile Include="..\pngerror.c" />
<ClCompile Include="..\pngget.c" />
<ClCompile Include="..\pngmem.c" />
<ClCompile Include="..\pngpread.c" />
<ClCompile Include="..\pngread.c" />
<ClCompile Include="..\pngrio.c" />
<ClCompile Include="..\pngrtran.c" />
<ClCompile Include="..\pngrutil.c" />
<ClCompile Include="..\pngset.c" />
<ClCompile Include="..\pngtrans.c" />
<ClCompile Include="..\pngwio.c" />
<ClCompile Include="..\pngwrite.c" />
<ClCompile Include="..\pngwtran.c" />
<ClCompile Include="..\pngwutil.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\png.h" />
<ClInclude Include="..\pngconf.h" />
<ClInclude Include="..\pngdebug.h" />
<ClInclude Include="..\pnginfo.h" />
<ClInclude Include="..\pnglibconf.h" />
<ClInclude Include="..\pngpriv.h" />
<ClInclude Include="..\pngstruct.h" />
</ItemGroup>
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
# gtk, msw, osx and shared files as of r67291 # gtk, msw, osx and shared files as of r70933
set(SRCS_AUI set(SRCS_AUI
"src/aui/auibar.cpp" "src/aui/auibar.cpp"
@ -11,6 +11,7 @@ set(SRCS_AUI
set(SRCS_COMMON set(SRCS_COMMON
"src/common/accelcmn.cpp" "src/common/accelcmn.cpp"
#"src/common/accesscmn.cpp" #"src/common/accesscmn.cpp"
"src/common/affinematrix2d.cpp"
"src/common/anidecod.cpp" "src/common/anidecod.cpp"
"src/common/animatecmn.cpp" "src/common/animatecmn.cpp"
"src/common/any.cpp" "src/common/any.cpp"
@ -215,6 +216,7 @@ set(SRCS_COMMON
"src/common/textcmn.cpp" "src/common/textcmn.cpp"
"src/common/textentrycmn.cpp" "src/common/textentrycmn.cpp"
"src/common/textfile.cpp" "src/common/textfile.cpp"
"src/common/time.cpp"
"src/common/timercmn.cpp" "src/common/timercmn.cpp"
"src/common/timerimpl.cpp" "src/common/timerimpl.cpp"
"src/common/tokenzr.cpp" "src/common/tokenzr.cpp"
@ -233,6 +235,7 @@ set(SRCS_COMMON
"src/common/valnum.cpp" "src/common/valnum.cpp"
"src/common/valtext.cpp" "src/common/valtext.cpp"
"src/common/variant.cpp" "src/common/variant.cpp"
#"src/common/webview.cpp"
"src/common/wfstream.cpp" "src/common/wfstream.cpp"
"src/common/wincmn.cpp" "src/common/wincmn.cpp"
"src/common/windowid.cpp" "src/common/windowid.cpp"
@ -247,25 +250,9 @@ set(SRCS_COMMON
"src/common/zipstrm.cpp" "src/common/zipstrm.cpp"
"src/common/zstream.cpp") "src/common/zstream.cpp")
set(SRCS_EXPAT
#"src/expat/lib/xmlparse.c"
#"src/expat/lib/xmlrole.c"
#"src/expat/lib/xmltok.c"
#"src/expat/lib/xmltok_impl.c"
#"src/expat/lib/xmltok_ns.c"
#"src/expat/xmlwf/codepage.c"
#"src/expat/xmlwf/ct.c"
#"src/expat/xmlwf/readfilemap.c"
#"src/expat/xmlwf/unixfilemap.c"
#"src/expat/xmlwf/win32filemap.c"
#"src/expat/xmlwf/xmlfile.c"
#"src/expat/xmlwf/xmlmime.c"
#"src/expat/xmlwf/xmlwf.c"
#"src/expat/xmlwf/xmlwin32url.cxx"
)
set(SRCS_GENERIC set(SRCS_GENERIC
"src/generic/aboutdlgg.cpp" "src/generic/aboutdlgg.cpp"
"src/generic/bannerwindow.cpp"
"src/generic/bmpcboxg.cpp" "src/generic/bmpcboxg.cpp"
"src/generic/busyinfo.cpp" "src/generic/busyinfo.cpp"
"src/generic/buttonbar.cpp" "src/generic/buttonbar.cpp"
@ -310,7 +297,6 @@ set(SRCS_GENERIC
"src/generic/notifmsgg.cpp" "src/generic/notifmsgg.cpp"
"src/generic/numdlgg.cpp" "src/generic/numdlgg.cpp"
"src/generic/odcombo.cpp" "src/generic/odcombo.cpp"
"src/generic/panelg.cpp"
"src/generic/printps.cpp" "src/generic/printps.cpp"
"src/generic/prntdlgg.cpp" "src/generic/prntdlgg.cpp"
"src/generic/progdlgg.cpp" "src/generic/progdlgg.cpp"
@ -331,12 +317,14 @@ set(SRCS_GENERIC
"src/generic/statusbr.cpp" "src/generic/statusbr.cpp"
"src/generic/tabg.cpp" "src/generic/tabg.cpp"
"src/generic/textdlgg.cpp" "src/generic/textdlgg.cpp"
"src/generic/timectrlg.cpp"
#"src/generic/timer.cpp" #"src/generic/timer.cpp"
"src/generic/tipdlg.cpp" "src/generic/tipdlg.cpp"
"src/generic/tipwin.cpp" "src/generic/tipwin.cpp"
"src/generic/toolbkg.cpp" "src/generic/toolbkg.cpp"
"src/generic/treebkg.cpp" "src/generic/treebkg.cpp"
"src/generic/treectlg.cpp" "src/generic/treectlg.cpp"
"src/generic/treelist.cpp"
"src/generic/vlbox.cpp" "src/generic/vlbox.cpp"
"src/generic/vscroll.cpp" "src/generic/vscroll.cpp"
"src/generic/wizard.cpp") "src/generic/wizard.cpp")
@ -359,9 +347,10 @@ set(SRCS_GENERICOSX
set(SRCS_GTK set(SRCS_GTK
"src/gtk/aboutdlg.cpp" "src/gtk/aboutdlg.cpp"
"src/gtk/animate.cpp" "src/gtk/animate.cpp"
"src/gtk/anybutton.cpp"
"src/gtk/app.cpp" "src/gtk/app.cpp"
"src/gtk/artgtk.cpp" "src/gtk/artgtk.cpp"
"src/gtk/assertdlg_gtk.c" "src/gtk/assertdlg_gtk.cpp"
"src/gtk/bitmap.cpp" "src/gtk/bitmap.cpp"
"src/gtk/bmpbuttn.cpp" "src/gtk/bmpbuttn.cpp"
"src/gtk/bmpcbox.cpp" "src/gtk/bmpcbox.cpp"
@ -412,6 +401,7 @@ set(SRCS_GTK
"src/gtk/mnemonics.cpp" "src/gtk/mnemonics.cpp"
"src/gtk/msgdlg.cpp" "src/gtk/msgdlg.cpp"
"src/gtk/nativewin.cpp" "src/gtk/nativewin.cpp"
"src/gtk/nonownedwnd.cpp"
"src/gtk/notebook.cpp" "src/gtk/notebook.cpp"
"src/gtk/pen.cpp" "src/gtk/pen.cpp"
"src/gtk/popupwin.cpp" "src/gtk/popupwin.cpp"
@ -442,90 +432,14 @@ set(SRCS_GTK
"src/gtk/toplevel.cpp" "src/gtk/toplevel.cpp"
"src/gtk/treeentry_gtk.c" "src/gtk/treeentry_gtk.c"
"src/gtk/utilsgtk.cpp" "src/gtk/utilsgtk.cpp"
#"src/gtk/webview_webkit.cpp"
"src/gtk/win_gtk.cpp" "src/gtk/win_gtk.cpp"
"src/gtk/window.cpp") "src/gtk/window.cpp")
set(SRCS_HTML
"src/html/chm.cpp"
"src/html/helpctrl.cpp"
"src/html/helpdata.cpp"
"src/html/helpdlg.cpp"
"src/html/helpfrm.cpp"
"src/html/helpwnd.cpp"
"src/html/htmlcell.cpp"
#"src/html/htmlctrl/webkit/webkit.mm"
"src/html/htmlfilt.cpp"
"src/html/htmlpars.cpp"
"src/html/htmltag.cpp"
"src/html/htmlwin.cpp"
"src/html/htmprint.cpp"
"src/html/m_dflist.cpp"
"src/html/m_fonts.cpp"
"src/html/m_hline.cpp"
"src/html/m_image.cpp"
"src/html/m_layout.cpp"
"src/html/m_links.cpp"
"src/html/m_list.cpp"
"src/html/m_pre.cpp"
"src/html/m_span.cpp"
"src/html/m_style.cpp"
"src/html/m_tables.cpp"
"src/html/styleparams.cpp"
"src/html/winpars.cpp")
set(SRCS_JPEG
"src/jpeg/jcapimin.c"
"src/jpeg/jcapistd.c"
"src/jpeg/jccoefct.c"
"src/jpeg/jccolor.c"
"src/jpeg/jcdctmgr.c"
"src/jpeg/jchuff.c"
"src/jpeg/jcinit.c"
"src/jpeg/jcmainct.c"
"src/jpeg/jcmarker.c"
"src/jpeg/jcmaster.c"
"src/jpeg/jcomapi.c"
"src/jpeg/jcparam.c"
"src/jpeg/jcphuff.c"
"src/jpeg/jcprepct.c"
"src/jpeg/jcsample.c"
"src/jpeg/jctrans.c"
"src/jpeg/jdapimin.c"
"src/jpeg/jdapistd.c"
"src/jpeg/jdatadst.c"
"src/jpeg/jdatasrc.c"
"src/jpeg/jdcoefct.c"
"src/jpeg/jdcolor.c"
"src/jpeg/jddctmgr.c"
"src/jpeg/jdhuff.c"
"src/jpeg/jdinput.c"
"src/jpeg/jdmainct.c"
"src/jpeg/jdmarker.c"
"src/jpeg/jdmaster.c"
"src/jpeg/jdmerge.c"
"src/jpeg/jdphuff.c"
"src/jpeg/jdpostct.c"
"src/jpeg/jdsample.c"
"src/jpeg/jdtrans.c"
"src/jpeg/jerror.c"
"src/jpeg/jfdctflt.c"
"src/jpeg/jfdctfst.c"
"src/jpeg/jfdctint.c"
"src/jpeg/jidctflt.c"
"src/jpeg/jidctfst.c"
"src/jpeg/jidctint.c"
"src/jpeg/jidctred.c"
"src/jpeg/jmemansi.c"
"src/jpeg/jmemmgr.c"
"src/jpeg/jmemname.c"
"src/jpeg/jmemnobs.c"
"src/jpeg/jquant1.c"
"src/jpeg/jquant2.c"
"src/jpeg/jutils.c")
set(SRCS_MSW set(SRCS_MSW
"src/msw/aboutdlg.cpp" "src/msw/aboutdlg.cpp"
"src/msw/accel.cpp" "src/msw/accel.cpp"
"src/msw/anybutton.cpp"
"src/msw/app.cpp" "src/msw/app.cpp"
"src/msw/artmsw.cpp" "src/msw/artmsw.cpp"
"src/msw/basemsw.cpp" "src/msw/basemsw.cpp"
@ -551,6 +465,7 @@ set(SRCS_MSW
"src/msw/data.cpp" "src/msw/data.cpp"
"src/msw/datecontrols.cpp" "src/msw/datecontrols.cpp"
"src/msw/datectrl.cpp" "src/msw/datectrl.cpp"
"src/msw/datetimectrl.cpp"
"src/msw/dc.cpp" "src/msw/dc.cpp"
"src/msw/dcclient.cpp" "src/msw/dcclient.cpp"
"src/msw/dcmemory.cpp" "src/msw/dcmemory.cpp"
@ -608,6 +523,7 @@ set(SRCS_MSW
"src/msw/mslu.cpp" "src/msw/mslu.cpp"
"src/msw/nativdlg.cpp" "src/msw/nativdlg.cpp"
"src/msw/nativewin.cpp" "src/msw/nativewin.cpp"
"src/msw/nonownedwnd.cpp"
"src/msw/notebook.cpp" "src/msw/notebook.cpp"
"src/msw/notifmsg.cpp" "src/msw/notifmsg.cpp"
"src/msw/ole/access.cpp" "src/msw/ole/access.cpp"
@ -655,6 +571,7 @@ set(SRCS_MSW
"src/msw/textentry.cpp" "src/msw/textentry.cpp"
"src/msw/tglbtn.cpp" "src/msw/tglbtn.cpp"
"src/msw/thread.cpp" "src/msw/thread.cpp"
"src/msw/timectrl.cpp"
"src/msw/timer.cpp" "src/msw/timer.cpp"
"src/msw/toolbar.cpp" "src/msw/toolbar.cpp"
"src/msw/tooltip.cpp" "src/msw/tooltip.cpp"
@ -668,6 +585,7 @@ set(SRCS_MSW
"src/msw/uxtheme.cpp" "src/msw/uxtheme.cpp"
"src/msw/version.rc" "src/msw/version.rc"
"src/msw/volume.cpp" "src/msw/volume.cpp"
#"src/msw/webview_ie.cpp"
"src/msw/wince/checklst.cpp" "src/msw/wince/checklst.cpp"
"src/msw/wince/choicece.cpp" "src/msw/wince/choicece.cpp"
"src/msw/wince/crt.cpp" "src/msw/wince/crt.cpp"
@ -684,6 +602,7 @@ set(SRCS_MSW
set(SRCS_OSX set(SRCS_OSX
"src/osx/accel.cpp" "src/osx/accel.cpp"
"src/osx/anybutton_osx.cpp"
"src/osx/artmac.cpp" "src/osx/artmac.cpp"
"src/osx/bmpbuttn_osx.cpp" "src/osx/bmpbuttn_osx.cpp"
"src/osx/brush.cpp" "src/osx/brush.cpp"
@ -693,6 +612,8 @@ set(SRCS_OSX
"src/osx/choice_osx.cpp" "src/osx/choice_osx.cpp"
"src/osx/combobox_osx.cpp" "src/osx/combobox_osx.cpp"
"src/osx/dataview_osx.cpp" "src/osx/dataview_osx.cpp"
"src/osx/datectrl_osx.cpp"
"src/osx/datetimectrl_osx.cpp"
"src/osx/dialog_osx.cpp" "src/osx/dialog_osx.cpp"
"src/osx/dnd_osx.cpp" "src/osx/dnd_osx.cpp"
"src/osx/fontutil.cpp" "src/osx/fontutil.cpp"
@ -722,12 +643,15 @@ set(SRCS_OSX
"src/osx/textctrl_osx.cpp" "src/osx/textctrl_osx.cpp"
"src/osx/textentry_osx.cpp" "src/osx/textentry_osx.cpp"
"src/osx/tglbtn_osx.cpp" "src/osx/tglbtn_osx.cpp"
"src/osx/timectrl_osx.cpp"
"src/osx/toolbar_osx.cpp" "src/osx/toolbar_osx.cpp"
"src/osx/toplevel_osx.cpp" "src/osx/toplevel_osx.cpp"
"src/osx/uiaction_osx.cpp" "src/osx/uiaction_osx.cpp"
"src/osx/utils_osx.cpp" "src/osx/utils_osx.cpp"
#"src/osx/webview_webkit.mm"
"src/osx/window_osx.cpp" "src/osx/window_osx.cpp"
#"src/osx/carbon/aboutdlg.cpp" #"src/osx/carbon/aboutdlg.cpp"
"src/osx/carbon/anybutton.cpp"
"src/osx/carbon/app.cpp" "src/osx/carbon/app.cpp"
#"src/osx/carbon/bmpbuttn.cpp" #"src/osx/carbon/bmpbuttn.cpp"
#"src/osx/carbon/button.cpp" #"src/osx/carbon/button.cpp"
@ -805,12 +729,14 @@ set(SRCS_OSX
"src/osx/carbon/utilscocoa.mm" "src/osx/carbon/utilscocoa.mm"
#"src/osx/carbon/window.cpp" #"src/osx/carbon/window.cpp"
"src/osx/cocoa/aboutdlg.mm" "src/osx/cocoa/aboutdlg.mm"
"src/osx/cocoa/anybutton.mm"
"src/osx/cocoa/button.mm" "src/osx/cocoa/button.mm"
"src/osx/cocoa/checkbox.mm" "src/osx/cocoa/checkbox.mm"
"src/osx/cocoa/choice.mm" "src/osx/cocoa/choice.mm"
"src/osx/cocoa/colour.mm" "src/osx/cocoa/colour.mm"
"src/osx/cocoa/combobox.mm" "src/osx/cocoa/combobox.mm"
"src/osx/cocoa/dataview.mm" "src/osx/cocoa/dataview.mm"
"src/osx/cocoa/datetimectrl.mm"
"src/osx/cocoa/dialog.mm" "src/osx/cocoa/dialog.mm"
"src/osx/cocoa/dirdlg.mm" "src/osx/cocoa/dirdlg.mm"
"src/osx/cocoa/dnd.mm" "src/osx/cocoa/dnd.mm"
@ -878,221 +804,6 @@ set(SRCS_OSX
#"src/osx/iphone/window.mm" #"src/osx/iphone/window.mm"
) )
set(SRCS_PNG
"src/png/png.c"
"src/png/pngerror.c"
"src/png/pngget.c"
"src/png/pngmem.c"
"src/png/pngpread.c"
"src/png/pngread.c"
"src/png/pngrio.c"
"src/png/pngrtran.c"
"src/png/pngrutil.c"
"src/png/pngset.c"
"src/png/pngtrans.c"
"src/png/pngwio.c"
"src/png/pngwrite.c"
"src/png/pngwtran.c"
"src/png/pngwutil.c")
set(SRCS_PROPGRID
"src/propgrid/advprops.cpp"
"src/propgrid/editors.cpp"
"src/propgrid/manager.cpp"
"src/propgrid/property.cpp"
"src/propgrid/propgrid.cpp"
"src/propgrid/propgridiface.cpp"
"src/propgrid/propgridpagestate.cpp"
"src/propgrid/props.cpp")
set(SRCS_REGEX
"src/regex/regcomp.c"
"src/regex/regerror.c"
"src/regex/regexec.c"
"src/regex/regfree.c")
set(SRCS_RIBBON
"src/ribbon/art_aui.cpp"
"src/ribbon/art_internal.cpp"
"src/ribbon/art_msw.cpp"
"src/ribbon/bar.cpp"
"src/ribbon/buttonbar.cpp"
"src/ribbon/control.cpp"
"src/ribbon/gallery.cpp"
"src/ribbon/page.cpp"
"src/ribbon/panel.cpp"
"src/ribbon/toolbar.cpp")
set(SRCS_RICHTEXT
#"src/richtext/richtextbackgroundpage.cpp"
#"src/richtext/richtextborderspage.cpp"
"src/richtext/richtextbuffer.cpp"
#"src/richtext/richtextbulletspage.cpp"
"src/richtext/richtextctrl.cpp"
#"src/richtext/richtextfontpage.cpp"
"src/richtext/richtextformatdlg.cpp"
"src/richtext/richtexthtml.cpp"
"src/richtext/richtextimagedlg.cpp"
#"src/richtext/richtextindentspage.cpp"
#"src/richtext/richtextliststylepage.cpp"
#"src/richtext/richtextmarginspage.cpp"
"src/richtext/richtextprint.cpp"
#"src/richtext/richtextsizepage.cpp"
"src/richtext/richtextstyledlg.cpp"
#"src/richtext/richtextstylepage.cpp"
"src/richtext/richtextstyles.cpp"
"src/richtext/richtextsymboldlg.cpp"
#"src/richtext/richtexttabspage.cpp"
"src/richtext/richtextxml.cpp")
set(SRCS_STC
"src/stc/PlatWX.cpp"
"src/stc/ScintillaWX.cpp"
"src/stc/scintilla/src/AutoComplete.cxx"
"src/stc/scintilla/src/CallTip.cxx"
"src/stc/scintilla/src/CellBuffer.cxx"
"src/stc/scintilla/src/CharClassify.cxx"
"src/stc/scintilla/src/ContractionState.cxx"
"src/stc/scintilla/src/Decoration.cxx"
"src/stc/scintilla/src/Document.cxx"
"src/stc/scintilla/src/DocumentAccessor.cxx"
"src/stc/scintilla/src/Editor.cxx"
"src/stc/scintilla/src/ExternalLexer.cxx"
"src/stc/scintilla/src/Indicator.cxx"
"src/stc/scintilla/src/KeyMap.cxx"
"src/stc/scintilla/src/KeyWords.cxx"
"src/stc/scintilla/src/LexAPDL.cxx"
"src/stc/scintilla/src/LexASY.cxx"
"src/stc/scintilla/src/LexAU3.cxx"
"src/stc/scintilla/src/LexAVE.cxx"
"src/stc/scintilla/src/LexAbaqus.cxx"
"src/stc/scintilla/src/LexAda.cxx"
"src/stc/scintilla/src/LexAsm.cxx"
"src/stc/scintilla/src/LexAsn1.cxx"
"src/stc/scintilla/src/LexBaan.cxx"
"src/stc/scintilla/src/LexBash.cxx"
"src/stc/scintilla/src/LexBasic.cxx"
"src/stc/scintilla/src/LexBullant.cxx"
"src/stc/scintilla/src/LexCLW.cxx"
"src/stc/scintilla/src/LexCOBOL.cxx"
"src/stc/scintilla/src/LexCPP.cxx"
"src/stc/scintilla/src/LexCSS.cxx"
"src/stc/scintilla/src/LexCaml.cxx"
"src/stc/scintilla/src/LexCmake.cxx"
"src/stc/scintilla/src/LexConf.cxx"
"src/stc/scintilla/src/LexCrontab.cxx"
"src/stc/scintilla/src/LexCsound.cxx"
"src/stc/scintilla/src/LexD.cxx"
"src/stc/scintilla/src/LexEScript.cxx"
"src/stc/scintilla/src/LexEiffel.cxx"
"src/stc/scintilla/src/LexErlang.cxx"
"src/stc/scintilla/src/LexFlagship.cxx"
"src/stc/scintilla/src/LexForth.cxx"
"src/stc/scintilla/src/LexFortran.cxx"
"src/stc/scintilla/src/LexGAP.cxx"
"src/stc/scintilla/src/LexGui4Cli.cxx"
"src/stc/scintilla/src/LexHTML.cxx"
"src/stc/scintilla/src/LexHaskell.cxx"
"src/stc/scintilla/src/LexInno.cxx"
"src/stc/scintilla/src/LexKix.cxx"
"src/stc/scintilla/src/LexLisp.cxx"
"src/stc/scintilla/src/LexLout.cxx"
"src/stc/scintilla/src/LexLua.cxx"
"src/stc/scintilla/src/LexMMIXAL.cxx"
"src/stc/scintilla/src/LexMPT.cxx"
"src/stc/scintilla/src/LexMSSQL.cxx"
"src/stc/scintilla/src/LexMagik.cxx"
"src/stc/scintilla/src/LexMarkdown.cxx"
"src/stc/scintilla/src/LexMatlab.cxx"
"src/stc/scintilla/src/LexMetapost.cxx"
"src/stc/scintilla/src/LexMySQL.cxx"
"src/stc/scintilla/src/LexNimrod.cxx"
"src/stc/scintilla/src/LexNsis.cxx"
"src/stc/scintilla/src/LexOpal.cxx"
"src/stc/scintilla/src/LexOthers.cxx"
"src/stc/scintilla/src/LexPB.cxx"
"src/stc/scintilla/src/LexPLM.cxx"
"src/stc/scintilla/src/LexPOV.cxx"
"src/stc/scintilla/src/LexPS.cxx"
"src/stc/scintilla/src/LexPascal.cxx"
"src/stc/scintilla/src/LexPerl.cxx"
"src/stc/scintilla/src/LexPowerPro.cxx"
"src/stc/scintilla/src/LexPowerShell.cxx"
"src/stc/scintilla/src/LexProgress.cxx"
"src/stc/scintilla/src/LexPython.cxx"
"src/stc/scintilla/src/LexR.cxx"
"src/stc/scintilla/src/LexRebol.cxx"
"src/stc/scintilla/src/LexRuby.cxx"
"src/stc/scintilla/src/LexSML.cxx"
"src/stc/scintilla/src/LexSQL.cxx"
"src/stc/scintilla/src/LexScriptol.cxx"
"src/stc/scintilla/src/LexSmalltalk.cxx"
"src/stc/scintilla/src/LexSorcus.cxx"
"src/stc/scintilla/src/LexSpecman.cxx"
"src/stc/scintilla/src/LexSpice.cxx"
"src/stc/scintilla/src/LexTACL.cxx"
"src/stc/scintilla/src/LexTADS3.cxx"
"src/stc/scintilla/src/LexTAL.cxx"
"src/stc/scintilla/src/LexTCL.cxx"
"src/stc/scintilla/src/LexTeX.cxx"
"src/stc/scintilla/src/LexVB.cxx"
"src/stc/scintilla/src/LexVHDL.cxx"
"src/stc/scintilla/src/LexVerilog.cxx"
"src/stc/scintilla/src/LexYAML.cxx"
"src/stc/scintilla/src/LineMarker.cxx"
"src/stc/scintilla/src/PerLine.cxx"
"src/stc/scintilla/src/PositionCache.cxx"
"src/stc/scintilla/src/PropSet.cxx"
"src/stc/scintilla/src/RESearch.cxx"
"src/stc/scintilla/src/RunStyles.cxx"
"src/stc/scintilla/src/ScintillaBase.cxx"
"src/stc/scintilla/src/Selection.cxx"
"src/stc/scintilla/src/Style.cxx"
"src/stc/scintilla/src/StyleContext.cxx"
"src/stc/scintilla/src/UniConversion.cxx"
"src/stc/scintilla/src/ViewStyle.cxx"
"src/stc/scintilla/src/WindowAccessor.cxx"
"src/stc/scintilla/src/XPM.cxx"
"src/stc/stc.cpp")
set(SRCS_TIFF
"src/tiff/libtiff/tif_aux.c"
"src/tiff/libtiff/tif_close.c"
"src/tiff/libtiff/tif_codec.c"
"src/tiff/libtiff/tif_color.c"
"src/tiff/libtiff/tif_compress.c"
"src/tiff/libtiff/tif_dir.c"
"src/tiff/libtiff/tif_dirinfo.c"
"src/tiff/libtiff/tif_dirread.c"
"src/tiff/libtiff/tif_dirwrite.c"
"src/tiff/libtiff/tif_dumpmode.c"
"src/tiff/libtiff/tif_error.c"
"src/tiff/libtiff/tif_extension.c"
"src/tiff/libtiff/tif_fax3.c"
"src/tiff/libtiff/tif_fax3sm.c"
"src/tiff/libtiff/tif_flush.c"
"src/tiff/libtiff/tif_getimage.c"
"src/tiff/libtiff/tif_jpeg.c"
"src/tiff/libtiff/tif_luv.c"
"src/tiff/libtiff/tif_lzw.c"
"src/tiff/libtiff/tif_next.c"
"src/tiff/libtiff/tif_ojpeg.c"
"src/tiff/libtiff/tif_open.c"
"src/tiff/libtiff/tif_packbits.c"
"src/tiff/libtiff/tif_pixarlog.c"
"src/tiff/libtiff/tif_predict.c"
"src/tiff/libtiff/tif_print.c"
"src/tiff/libtiff/tif_read.c"
"src/tiff/libtiff/tif_strip.c"
"src/tiff/libtiff/tif_swab.c"
"src/tiff/libtiff/tif_thunder.c"
"src/tiff/libtiff/tif_tile.c"
"src/tiff/libtiff/tif_unix.c"
"src/tiff/libtiff/tif_version.c"
"src/tiff/libtiff/tif_warning.c"
"src/tiff/libtiff/tif_write.c"
"src/tiff/libtiff/tif_zip.c")
set(SRCS_UNIX set(SRCS_UNIX
"src/unix/apptraits.cpp" "src/unix/apptraits.cpp"
"src/unix/appunix.cpp" "src/unix/appunix.cpp"
@ -1127,87 +838,6 @@ set(SRCS_UNIXGTK
"src/unix/uiactionx11.cpp" "src/unix/uiactionx11.cpp"
"src/unix/utilsx11.cpp") "src/unix/utilsx11.cpp")
set(SRCS_XRC
"src/xml/xml.cpp"
"src/xrc/xh_animatctrl.cpp"
"src/xrc/xh_bmp.cpp"
"src/xrc/xh_bmpbt.cpp"
"src/xrc/xh_bmpcbox.cpp"
"src/xrc/xh_bttn.cpp"
"src/xrc/xh_cald.cpp"
"src/xrc/xh_chckb.cpp"
"src/xrc/xh_chckl.cpp"
"src/xrc/xh_choic.cpp"
"src/xrc/xh_choicbk.cpp"
"src/xrc/xh_clrpicker.cpp"
"src/xrc/xh_cmdlinkbn.cpp"
"src/xrc/xh_collpane.cpp"
"src/xrc/xh_combo.cpp"
"src/xrc/xh_comboctrl.cpp"
"src/xrc/xh_datectrl.cpp"
"src/xrc/xh_dirpicker.cpp"
"src/xrc/xh_dlg.cpp"
"src/xrc/xh_editlbox.cpp"
"src/xrc/xh_filectrl.cpp"
"src/xrc/xh_filepicker.cpp"
"src/xrc/xh_fontpicker.cpp"
"src/xrc/xh_frame.cpp"
"src/xrc/xh_gauge.cpp"
"src/xrc/xh_gdctl.cpp"
"src/xrc/xh_grid.cpp"
"src/xrc/xh_html.cpp"
"src/xrc/xh_htmllbox.cpp"
"src/xrc/xh_hyperlink.cpp"
"src/xrc/xh_listb.cpp"
"src/xrc/xh_listbk.cpp"
"src/xrc/xh_listc.cpp"
"src/xrc/xh_mdi.cpp"
"src/xrc/xh_menu.cpp"
"src/xrc/xh_notbk.cpp"
"src/xrc/xh_odcombo.cpp"
"src/xrc/xh_panel.cpp"
"src/xrc/xh_propdlg.cpp"
"src/xrc/xh_radbt.cpp"
"src/xrc/xh_radbx.cpp"
"src/xrc/xh_richtext.cpp"
"src/xrc/xh_scrol.cpp"
"src/xrc/xh_scwin.cpp"
"src/xrc/xh_sizer.cpp"
"src/xrc/xh_slidr.cpp"
"src/xrc/xh_spin.cpp"
"src/xrc/xh_split.cpp"
"src/xrc/xh_srchctrl.cpp"
"src/xrc/xh_statbar.cpp"
"src/xrc/xh_stbmp.cpp"
"src/xrc/xh_stbox.cpp"
"src/xrc/xh_stlin.cpp"
"src/xrc/xh_sttxt.cpp"
"src/xrc/xh_text.cpp"
"src/xrc/xh_tglbtn.cpp"
"src/xrc/xh_toolb.cpp"
"src/xrc/xh_toolbk.cpp"
"src/xrc/xh_tree.cpp"
"src/xrc/xh_treebk.cpp"
"src/xrc/xh_unkwn.cpp"
"src/xrc/xh_wizrd.cpp"
"src/xrc/xmladv.cpp"
"src/xrc/xmlres.cpp"
"src/xrc/xmlrsall.cpp")
set(SRCS_ZLIB
"src/zlib/adler32.c"
"src/zlib/compress.c"
"src/zlib/crc32.c"
"src/zlib/deflate.c"
"src/zlib/gzio.c"
"src/zlib/infback.c"
"src/zlib/inffast.c"
"src/zlib/inflate.c"
"src/zlib/inftrees.c"
"src/zlib/trees.c"
"src/zlib/uncompr.c"
"src/zlib/zutil.c")
include_directories(.) include_directories(.)
include_directories(include) include_directories(include)
@ -1217,44 +847,50 @@ set(SRCS
${SRCS_GENERIC}) ${SRCS_GENERIC})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(-D__WXOSX_COCOA__)
set(SRCS set(SRCS
${SRCS} ${SRCS}
${SRCS_GENERICOSX} ${SRCS_GENERICOSX}
${SRCS_OSX} ${SRCS_OSX}
${SRCS_UNIX}) ${SRCS_UNIX})
include_directories(../libpng)
add_subdirectory(../libpng ../libpng)
set(LIBS
png
iconv
${APPKIT_LIBRARY}
${APPSERV_LIBRARY}
${ATB_LIBRARY}
${CARBON_LIBRARY}
${COCOA_LIBRARY}
${COREFUND_LIBRARY}
${CORESERV_LIBRARY}
${IOK_LIBRARY}
${QUICKTIME_LIBRARY})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-D__WXGTK__)
set(SRCS set(SRCS
${SRCS} ${SRCS}
${SRCS_GENERICGTK} ${SRCS_GENERICGTK}
${SRCS_GTK} ${SRCS_GTK}
${SRCS_UNIX} ${SRCS_UNIX}
${SRCS_UNIXGTK}) ${SRCS_UNIXGTK})
set(LIBS
png
${GTHREAD2_LIBRARIES}
${PANGOCAIRO_LIBRARIES}
${GTK2_LIBRARIES})
else() else()
add_definitions(-D__WXMSW__)
set(SRCS set(SRCS
${SRCS} ${SRCS}
${SRCS_MSW}) ${SRCS_MSW})
endif() endif()
add_definitions(-D__WXOSX_COCOA__)
add_definitions(-DWXBUILDING) add_definitions(-DWXBUILDING)
add_definitions(-Wno-deprecated-declarations) add_definitions(-Wno-deprecated-declarations)
add_definitions(-Wno-shadow) add_definitions(-Wno-shadow)
set(LIBS
iconv
${APPKIT_LIBRARY}
${APPSERV_LIBRARY}
${ATB_LIBRARY}
${CARBON_LIBRARY}
${COCOA_LIBRARY}
${COREFUND_LIBRARY}
${CORESERV_LIBRARY}
${IOK_LIBRARY}
${QUICKTIME_LIBRARY}
)
include_directories(../libpng) enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
add_subdirectory(../libpng ../libpng) add_library(wx STATIC ${PNG_SRCS} ${SRCS})
list(APPEND LIBS png)
add_library(wx STATIC ${SRCS})
target_link_libraries(wx ${LIBS}) target_link_libraries(wx ${LIBS})

View File

@ -13,7 +13,7 @@ wxenv = env.Clone()
wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations', '-Wno-shadow'] wxenv['CCFLAGS'] += ['-Wno-deprecated-declarations', '-Wno-shadow']
wxenv['CPPDEFINES'] += ['WXBUILDING'] wxenv['CPPDEFINES'] += ['WXBUILDING']
# gtk, msw, osx and shared files as of r67291 # gtk, msw, osx and shared files as of r70933
aui = [ aui = [
'src/aui/auibar.cpp', 'src/aui/auibar.cpp',
@ -27,6 +27,7 @@ aui = [
common = [ common = [
'src/common/accelcmn.cpp', 'src/common/accelcmn.cpp',
#'src/common/accesscmn.cpp', #'src/common/accesscmn.cpp',
'src/common/affinematrix2d.cpp',
'src/common/anidecod.cpp', 'src/common/anidecod.cpp',
'src/common/animatecmn.cpp', 'src/common/animatecmn.cpp',
'src/common/any.cpp', 'src/common/any.cpp',
@ -231,6 +232,7 @@ common = [
'src/common/textcmn.cpp', 'src/common/textcmn.cpp',
'src/common/textentrycmn.cpp', 'src/common/textentrycmn.cpp',
'src/common/textfile.cpp', 'src/common/textfile.cpp',
'src/common/time.cpp',
'src/common/timercmn.cpp', 'src/common/timercmn.cpp',
'src/common/timerimpl.cpp', 'src/common/timerimpl.cpp',
'src/common/tokenzr.cpp', 'src/common/tokenzr.cpp',
@ -249,6 +251,7 @@ common = [
'src/common/valnum.cpp', 'src/common/valnum.cpp',
'src/common/valtext.cpp', 'src/common/valtext.cpp',
'src/common/variant.cpp', 'src/common/variant.cpp',
#'src/common/webview.cpp',
'src/common/wfstream.cpp', 'src/common/wfstream.cpp',
'src/common/wincmn.cpp', 'src/common/wincmn.cpp',
'src/common/windowid.cpp', 'src/common/windowid.cpp',
@ -264,25 +267,9 @@ common = [
'src/common/zstream.cpp', 'src/common/zstream.cpp',
] ]
expat = [
#'src/expat/lib/xmlparse.c',
#'src/expat/lib/xmlrole.c',
#'src/expat/lib/xmltok.c',
#'src/expat/lib/xmltok_impl.c',
#'src/expat/lib/xmltok_ns.c',
#'src/expat/xmlwf/codepage.c',
#'src/expat/xmlwf/ct.c',
#'src/expat/xmlwf/readfilemap.c',
#'src/expat/xmlwf/unixfilemap.c',
#'src/expat/xmlwf/win32filemap.c',
#'src/expat/xmlwf/xmlfile.c',
#'src/expat/xmlwf/xmlmime.c',
#'src/expat/xmlwf/xmlwf.c',
#'src/expat/xmlwf/xmlwin32url.cxx',
]
generic = [ generic = [
'src/generic/aboutdlgg.cpp', 'src/generic/aboutdlgg.cpp',
'src/generic/bannerwindow.cpp',
'src/generic/bmpcboxg.cpp', 'src/generic/bmpcboxg.cpp',
'src/generic/busyinfo.cpp', 'src/generic/busyinfo.cpp',
'src/generic/buttonbar.cpp', 'src/generic/buttonbar.cpp',
@ -327,7 +314,6 @@ generic = [
'src/generic/notifmsgg.cpp', 'src/generic/notifmsgg.cpp',
'src/generic/numdlgg.cpp', 'src/generic/numdlgg.cpp',
'src/generic/odcombo.cpp', 'src/generic/odcombo.cpp',
'src/generic/panelg.cpp',
'src/generic/printps.cpp', 'src/generic/printps.cpp',
'src/generic/prntdlgg.cpp', 'src/generic/prntdlgg.cpp',
'src/generic/progdlgg.cpp', 'src/generic/progdlgg.cpp',
@ -348,12 +334,14 @@ generic = [
'src/generic/statusbr.cpp', 'src/generic/statusbr.cpp',
'src/generic/tabg.cpp', 'src/generic/tabg.cpp',
'src/generic/textdlgg.cpp', 'src/generic/textdlgg.cpp',
'src/generic/timectrlg.cpp',
#'src/generic/timer.cpp', #'src/generic/timer.cpp',
'src/generic/tipdlg.cpp', 'src/generic/tipdlg.cpp',
'src/generic/tipwin.cpp', 'src/generic/tipwin.cpp',
'src/generic/toolbkg.cpp', 'src/generic/toolbkg.cpp',
'src/generic/treebkg.cpp', 'src/generic/treebkg.cpp',
'src/generic/treectlg.cpp', 'src/generic/treectlg.cpp',
'src/generic/treelist.cpp',
'src/generic/vlbox.cpp', 'src/generic/vlbox.cpp',
'src/generic/vscroll.cpp', 'src/generic/vscroll.cpp',
'src/generic/wizard.cpp', 'src/generic/wizard.cpp',
@ -379,9 +367,10 @@ genericosx = [
gtk = [ gtk = [
'src/gtk/aboutdlg.cpp', 'src/gtk/aboutdlg.cpp',
'src/gtk/animate.cpp', 'src/gtk/animate.cpp',
'src/gtk/anybutton.cpp',
'src/gtk/app.cpp', 'src/gtk/app.cpp',
'src/gtk/artgtk.cpp', 'src/gtk/artgtk.cpp',
'src/gtk/assertdlg_gtk.c', 'src/gtk/assertdlg_gtk.cpp',
'src/gtk/bitmap.cpp', 'src/gtk/bitmap.cpp',
'src/gtk/bmpbuttn.cpp', 'src/gtk/bmpbuttn.cpp',
'src/gtk/bmpcbox.cpp', 'src/gtk/bmpcbox.cpp',
@ -432,6 +421,7 @@ gtk = [
'src/gtk/mnemonics.cpp', 'src/gtk/mnemonics.cpp',
'src/gtk/msgdlg.cpp', 'src/gtk/msgdlg.cpp',
'src/gtk/nativewin.cpp', 'src/gtk/nativewin.cpp',
'src/gtk/nonownedwnd.cpp',
'src/gtk/notebook.cpp', 'src/gtk/notebook.cpp',
'src/gtk/pen.cpp', 'src/gtk/pen.cpp',
'src/gtk/popupwin.cpp', 'src/gtk/popupwin.cpp',
@ -462,93 +452,15 @@ gtk = [
'src/gtk/toplevel.cpp', 'src/gtk/toplevel.cpp',
'src/gtk/treeentry_gtk.c', 'src/gtk/treeentry_gtk.c',
'src/gtk/utilsgtk.cpp', 'src/gtk/utilsgtk.cpp',
#'src/gtk/webview_webkit.cpp',
'src/gtk/win_gtk.cpp', 'src/gtk/win_gtk.cpp',
'src/gtk/window.cpp', 'src/gtk/window.cpp',
] ]
html = [
'src/html/chm.cpp',
'src/html/helpctrl.cpp',
'src/html/helpdata.cpp',
'src/html/helpdlg.cpp',
'src/html/helpfrm.cpp',
'src/html/helpwnd.cpp',
'src/html/htmlcell.cpp',
#'src/html/htmlctrl/webkit/webkit.mm',
'src/html/htmlfilt.cpp',
'src/html/htmlpars.cpp',
'src/html/htmltag.cpp',
'src/html/htmlwin.cpp',
'src/html/htmprint.cpp',
'src/html/m_dflist.cpp',
'src/html/m_fonts.cpp',
'src/html/m_hline.cpp',
'src/html/m_image.cpp',
'src/html/m_layout.cpp',
'src/html/m_links.cpp',
'src/html/m_list.cpp',
'src/html/m_pre.cpp',
'src/html/m_span.cpp',
'src/html/m_style.cpp',
'src/html/m_tables.cpp',
'src/html/styleparams.cpp',
'src/html/winpars.cpp',
]
jpeg = [
'src/jpeg/jcapimin.c',
'src/jpeg/jcapistd.c',
'src/jpeg/jccoefct.c',
'src/jpeg/jccolor.c',
'src/jpeg/jcdctmgr.c',
'src/jpeg/jchuff.c',
'src/jpeg/jcinit.c',
'src/jpeg/jcmainct.c',
'src/jpeg/jcmarker.c',
'src/jpeg/jcmaster.c',
'src/jpeg/jcomapi.c',
'src/jpeg/jcparam.c',
'src/jpeg/jcphuff.c',
'src/jpeg/jcprepct.c',
'src/jpeg/jcsample.c',
'src/jpeg/jctrans.c',
'src/jpeg/jdapimin.c',
'src/jpeg/jdapistd.c',
'src/jpeg/jdatadst.c',
'src/jpeg/jdatasrc.c',
'src/jpeg/jdcoefct.c',
'src/jpeg/jdcolor.c',
'src/jpeg/jddctmgr.c',
'src/jpeg/jdhuff.c',
'src/jpeg/jdinput.c',
'src/jpeg/jdmainct.c',
'src/jpeg/jdmarker.c',
'src/jpeg/jdmaster.c',
'src/jpeg/jdmerge.c',
'src/jpeg/jdphuff.c',
'src/jpeg/jdpostct.c',
'src/jpeg/jdsample.c',
'src/jpeg/jdtrans.c',
'src/jpeg/jerror.c',
'src/jpeg/jfdctflt.c',
'src/jpeg/jfdctfst.c',
'src/jpeg/jfdctint.c',
'src/jpeg/jidctflt.c',
'src/jpeg/jidctfst.c',
'src/jpeg/jidctint.c',
'src/jpeg/jidctred.c',
'src/jpeg/jmemansi.c',
'src/jpeg/jmemmgr.c',
'src/jpeg/jmemname.c',
'src/jpeg/jmemnobs.c',
'src/jpeg/jquant1.c',
'src/jpeg/jquant2.c',
'src/jpeg/jutils.c',
]
msw = [ msw = [
'src/msw/aboutdlg.cpp', 'src/msw/aboutdlg.cpp',
'src/msw/accel.cpp', 'src/msw/accel.cpp',
'src/msw/anybutton.cpp',
'src/msw/app.cpp', 'src/msw/app.cpp',
'src/msw/artmsw.cpp', 'src/msw/artmsw.cpp',
'src/msw/basemsw.cpp', 'src/msw/basemsw.cpp',
@ -574,6 +486,7 @@ msw = [
'src/msw/data.cpp', 'src/msw/data.cpp',
'src/msw/datecontrols.cpp', 'src/msw/datecontrols.cpp',
'src/msw/datectrl.cpp', 'src/msw/datectrl.cpp',
'src/msw/datetimectrl.cpp',
'src/msw/dc.cpp', 'src/msw/dc.cpp',
'src/msw/dcclient.cpp', 'src/msw/dcclient.cpp',
'src/msw/dcmemory.cpp', 'src/msw/dcmemory.cpp',
@ -631,6 +544,7 @@ msw = [
'src/msw/mslu.cpp', 'src/msw/mslu.cpp',
'src/msw/nativdlg.cpp', 'src/msw/nativdlg.cpp',
'src/msw/nativewin.cpp', 'src/msw/nativewin.cpp',
'src/msw/nonownedwnd.cpp',
'src/msw/notebook.cpp', 'src/msw/notebook.cpp',
'src/msw/notifmsg.cpp', 'src/msw/notifmsg.cpp',
'src/msw/ole/access.cpp', 'src/msw/ole/access.cpp',
@ -678,6 +592,7 @@ msw = [
'src/msw/textentry.cpp', 'src/msw/textentry.cpp',
'src/msw/tglbtn.cpp', 'src/msw/tglbtn.cpp',
'src/msw/thread.cpp', 'src/msw/thread.cpp',
'src/msw/timectrl.cpp',
'src/msw/timer.cpp', 'src/msw/timer.cpp',
'src/msw/toolbar.cpp', 'src/msw/toolbar.cpp',
'src/msw/tooltip.cpp', 'src/msw/tooltip.cpp',
@ -691,6 +606,7 @@ msw = [
'src/msw/uxtheme.cpp', 'src/msw/uxtheme.cpp',
'src/msw/version.rc', 'src/msw/version.rc',
'src/msw/volume.cpp', 'src/msw/volume.cpp',
#'src/msw/webview_ie.cpp',
'src/msw/wince/checklst.cpp', 'src/msw/wince/checklst.cpp',
'src/msw/wince/choicece.cpp', 'src/msw/wince/choicece.cpp',
'src/msw/wince/crt.cpp', 'src/msw/wince/crt.cpp',
@ -708,6 +624,7 @@ msw = [
osx = [ osx = [
'src/osx/accel.cpp', 'src/osx/accel.cpp',
'src/osx/anybutton_osx.cpp',
'src/osx/artmac.cpp', 'src/osx/artmac.cpp',
'src/osx/bmpbuttn_osx.cpp', 'src/osx/bmpbuttn_osx.cpp',
'src/osx/brush.cpp', 'src/osx/brush.cpp',
@ -717,6 +634,8 @@ osx = [
'src/osx/choice_osx.cpp', 'src/osx/choice_osx.cpp',
'src/osx/combobox_osx.cpp', 'src/osx/combobox_osx.cpp',
'src/osx/dataview_osx.cpp', 'src/osx/dataview_osx.cpp',
'src/osx/datectrl_osx.cpp',
'src/osx/datetimectrl_osx.cpp',
'src/osx/dialog_osx.cpp', 'src/osx/dialog_osx.cpp',
'src/osx/dnd_osx.cpp', 'src/osx/dnd_osx.cpp',
'src/osx/fontutil.cpp', 'src/osx/fontutil.cpp',
@ -746,12 +665,15 @@ osx = [
'src/osx/textctrl_osx.cpp', 'src/osx/textctrl_osx.cpp',
'src/osx/textentry_osx.cpp', 'src/osx/textentry_osx.cpp',
'src/osx/tglbtn_osx.cpp', 'src/osx/tglbtn_osx.cpp',
'src/osx/timectrl_osx.cpp',
'src/osx/toolbar_osx.cpp', 'src/osx/toolbar_osx.cpp',
'src/osx/toplevel_osx.cpp', 'src/osx/toplevel_osx.cpp',
'src/osx/uiaction_osx.cpp', 'src/osx/uiaction_osx.cpp',
'src/osx/utils_osx.cpp', 'src/osx/utils_osx.cpp',
#'src/osx/webview_webkit.mm',
'src/osx/window_osx.cpp', 'src/osx/window_osx.cpp',
#'src/osx/carbon/aboutdlg.cpp', #'src/osx/carbon/aboutdlg.cpp',
'src/osx/carbon/anybutton.cpp',
'src/osx/carbon/app.cpp', 'src/osx/carbon/app.cpp',
#'src/osx/carbon/bmpbuttn.cpp', #'src/osx/carbon/bmpbuttn.cpp',
#'src/osx/carbon/button.cpp', #'src/osx/carbon/button.cpp',
@ -829,12 +751,14 @@ osx = [
'src/osx/carbon/utilscocoa.mm', 'src/osx/carbon/utilscocoa.mm',
#'src/osx/carbon/window.cpp', #'src/osx/carbon/window.cpp',
'src/osx/cocoa/aboutdlg.mm', 'src/osx/cocoa/aboutdlg.mm',
'src/osx/cocoa/anybutton.mm',
'src/osx/cocoa/button.mm', 'src/osx/cocoa/button.mm',
'src/osx/cocoa/checkbox.mm', 'src/osx/cocoa/checkbox.mm',
'src/osx/cocoa/choice.mm', 'src/osx/cocoa/choice.mm',
'src/osx/cocoa/colour.mm', 'src/osx/cocoa/colour.mm',
'src/osx/cocoa/combobox.mm', 'src/osx/cocoa/combobox.mm',
'src/osx/cocoa/dataview.mm', 'src/osx/cocoa/dataview.mm',
'src/osx/cocoa/datetimectrl.mm',
'src/osx/cocoa/dialog.mm', 'src/osx/cocoa/dialog.mm',
'src/osx/cocoa/dirdlg.mm', 'src/osx/cocoa/dirdlg.mm',
'src/osx/cocoa/dnd.mm', 'src/osx/cocoa/dnd.mm',
@ -902,228 +826,6 @@ osx = [
#'src/osx/iphone/window.mm', #'src/osx/iphone/window.mm',
] ]
png = [
'src/png/png.c',
'src/png/pngerror.c',
'src/png/pngget.c',
'src/png/pngmem.c',
'src/png/pngpread.c',
'src/png/pngread.c',
'src/png/pngrio.c',
'src/png/pngrtran.c',
'src/png/pngrutil.c',
'src/png/pngset.c',
'src/png/pngtrans.c',
'src/png/pngwio.c',
'src/png/pngwrite.c',
'src/png/pngwtran.c',
'src/png/pngwutil.c',
]
propgrid = [
'src/propgrid/advprops.cpp',
'src/propgrid/editors.cpp',
'src/propgrid/manager.cpp',
'src/propgrid/property.cpp',
'src/propgrid/propgrid.cpp',
'src/propgrid/propgridiface.cpp',
'src/propgrid/propgridpagestate.cpp',
'src/propgrid/props.cpp',
]
regex = [
'src/regex/regcomp.c',
'src/regex/regerror.c',
'src/regex/regexec.c',
'src/regex/regfree.c',
]
ribbon = [
'src/ribbon/art_aui.cpp',
'src/ribbon/art_internal.cpp',
'src/ribbon/art_msw.cpp',
'src/ribbon/bar.cpp',
'src/ribbon/buttonbar.cpp',
'src/ribbon/control.cpp',
'src/ribbon/gallery.cpp',
'src/ribbon/page.cpp',
'src/ribbon/panel.cpp',
'src/ribbon/toolbar.cpp',
]
richtext = [
#'src/richtext/richtextbackgroundpage.cpp',
#'src/richtext/richtextborderspage.cpp',
'src/richtext/richtextbuffer.cpp',
#'src/richtext/richtextbulletspage.cpp',
'src/richtext/richtextctrl.cpp',
#'src/richtext/richtextfontpage.cpp',
'src/richtext/richtextformatdlg.cpp',
'src/richtext/richtexthtml.cpp',
'src/richtext/richtextimagedlg.cpp',
#'src/richtext/richtextindentspage.cpp',
#'src/richtext/richtextliststylepage.cpp',
#'src/richtext/richtextmarginspage.cpp',
'src/richtext/richtextprint.cpp',
#'src/richtext/richtextsizepage.cpp',
'src/richtext/richtextstyledlg.cpp',
#'src/richtext/richtextstylepage.cpp',
'src/richtext/richtextstyles.cpp',
'src/richtext/richtextsymboldlg.cpp',
#'src/richtext/richtexttabspage.cpp',
'src/richtext/richtextxml.cpp',
]
stc = [
'src/stc/PlatWX.cpp',
'src/stc/ScintillaWX.cpp',
'src/stc/scintilla/src/AutoComplete.cxx',
'src/stc/scintilla/src/CallTip.cxx',
'src/stc/scintilla/src/CellBuffer.cxx',
'src/stc/scintilla/src/CharClassify.cxx',
'src/stc/scintilla/src/ContractionState.cxx',
'src/stc/scintilla/src/Decoration.cxx',
'src/stc/scintilla/src/Document.cxx',
'src/stc/scintilla/src/DocumentAccessor.cxx',
'src/stc/scintilla/src/Editor.cxx',
'src/stc/scintilla/src/ExternalLexer.cxx',
'src/stc/scintilla/src/Indicator.cxx',
'src/stc/scintilla/src/KeyMap.cxx',
'src/stc/scintilla/src/KeyWords.cxx',
'src/stc/scintilla/src/LexAPDL.cxx',
'src/stc/scintilla/src/LexASY.cxx',
'src/stc/scintilla/src/LexAU3.cxx',
'src/stc/scintilla/src/LexAVE.cxx',
'src/stc/scintilla/src/LexAbaqus.cxx',
'src/stc/scintilla/src/LexAda.cxx',
'src/stc/scintilla/src/LexAsm.cxx',
'src/stc/scintilla/src/LexAsn1.cxx',
'src/stc/scintilla/src/LexBaan.cxx',
'src/stc/scintilla/src/LexBash.cxx',
'src/stc/scintilla/src/LexBasic.cxx',
'src/stc/scintilla/src/LexBullant.cxx',
'src/stc/scintilla/src/LexCLW.cxx',
'src/stc/scintilla/src/LexCOBOL.cxx',
'src/stc/scintilla/src/LexCPP.cxx',
'src/stc/scintilla/src/LexCSS.cxx',
'src/stc/scintilla/src/LexCaml.cxx',
'src/stc/scintilla/src/LexCmake.cxx',
'src/stc/scintilla/src/LexConf.cxx',
'src/stc/scintilla/src/LexCrontab.cxx',
'src/stc/scintilla/src/LexCsound.cxx',
'src/stc/scintilla/src/LexD.cxx',
'src/stc/scintilla/src/LexEScript.cxx',
'src/stc/scintilla/src/LexEiffel.cxx',
'src/stc/scintilla/src/LexErlang.cxx',
'src/stc/scintilla/src/LexFlagship.cxx',
'src/stc/scintilla/src/LexForth.cxx',
'src/stc/scintilla/src/LexFortran.cxx',
'src/stc/scintilla/src/LexGAP.cxx',
'src/stc/scintilla/src/LexGui4Cli.cxx',
'src/stc/scintilla/src/LexHTML.cxx',
'src/stc/scintilla/src/LexHaskell.cxx',
'src/stc/scintilla/src/LexInno.cxx',
'src/stc/scintilla/src/LexKix.cxx',
'src/stc/scintilla/src/LexLisp.cxx',
'src/stc/scintilla/src/LexLout.cxx',
'src/stc/scintilla/src/LexLua.cxx',
'src/stc/scintilla/src/LexMMIXAL.cxx',
'src/stc/scintilla/src/LexMPT.cxx',
'src/stc/scintilla/src/LexMSSQL.cxx',
'src/stc/scintilla/src/LexMagik.cxx',
'src/stc/scintilla/src/LexMarkdown.cxx',
'src/stc/scintilla/src/LexMatlab.cxx',
'src/stc/scintilla/src/LexMetapost.cxx',
'src/stc/scintilla/src/LexMySQL.cxx',
'src/stc/scintilla/src/LexNimrod.cxx',
'src/stc/scintilla/src/LexNsis.cxx',
'src/stc/scintilla/src/LexOpal.cxx',
'src/stc/scintilla/src/LexOthers.cxx',
'src/stc/scintilla/src/LexPB.cxx',
'src/stc/scintilla/src/LexPLM.cxx',
'src/stc/scintilla/src/LexPOV.cxx',
'src/stc/scintilla/src/LexPS.cxx',
'src/stc/scintilla/src/LexPascal.cxx',
'src/stc/scintilla/src/LexPerl.cxx',
'src/stc/scintilla/src/LexPowerPro.cxx',
'src/stc/scintilla/src/LexPowerShell.cxx',
'src/stc/scintilla/src/LexProgress.cxx',
'src/stc/scintilla/src/LexPython.cxx',
'src/stc/scintilla/src/LexR.cxx',
'src/stc/scintilla/src/LexRebol.cxx',
'src/stc/scintilla/src/LexRuby.cxx',
'src/stc/scintilla/src/LexSML.cxx',
'src/stc/scintilla/src/LexSQL.cxx',
'src/stc/scintilla/src/LexScriptol.cxx',
'src/stc/scintilla/src/LexSmalltalk.cxx',
'src/stc/scintilla/src/LexSorcus.cxx',
'src/stc/scintilla/src/LexSpecman.cxx',
'src/stc/scintilla/src/LexSpice.cxx',
'src/stc/scintilla/src/LexTACL.cxx',
'src/stc/scintilla/src/LexTADS3.cxx',
'src/stc/scintilla/src/LexTAL.cxx',
'src/stc/scintilla/src/LexTCL.cxx',
'src/stc/scintilla/src/LexTeX.cxx',
'src/stc/scintilla/src/LexVB.cxx',
'src/stc/scintilla/src/LexVHDL.cxx',
'src/stc/scintilla/src/LexVerilog.cxx',
'src/stc/scintilla/src/LexYAML.cxx',
'src/stc/scintilla/src/LineMarker.cxx',
'src/stc/scintilla/src/PerLine.cxx',
'src/stc/scintilla/src/PositionCache.cxx',
'src/stc/scintilla/src/PropSet.cxx',
'src/stc/scintilla/src/RESearch.cxx',
'src/stc/scintilla/src/RunStyles.cxx',
'src/stc/scintilla/src/ScintillaBase.cxx',
'src/stc/scintilla/src/Selection.cxx',
'src/stc/scintilla/src/Style.cxx',
'src/stc/scintilla/src/StyleContext.cxx',
'src/stc/scintilla/src/UniConversion.cxx',
'src/stc/scintilla/src/ViewStyle.cxx',
'src/stc/scintilla/src/WindowAccessor.cxx',
'src/stc/scintilla/src/XPM.cxx',
'src/stc/stc.cpp',
]
tiff = [
'src/tiff/libtiff/tif_aux.c',
'src/tiff/libtiff/tif_close.c',
'src/tiff/libtiff/tif_codec.c',
'src/tiff/libtiff/tif_color.c',
'src/tiff/libtiff/tif_compress.c',
'src/tiff/libtiff/tif_dir.c',
'src/tiff/libtiff/tif_dirinfo.c',
'src/tiff/libtiff/tif_dirread.c',
'src/tiff/libtiff/tif_dirwrite.c',
'src/tiff/libtiff/tif_dumpmode.c',
'src/tiff/libtiff/tif_error.c',
'src/tiff/libtiff/tif_extension.c',
'src/tiff/libtiff/tif_fax3.c',
'src/tiff/libtiff/tif_fax3sm.c',
'src/tiff/libtiff/tif_flush.c',
'src/tiff/libtiff/tif_getimage.c',
'src/tiff/libtiff/tif_jpeg.c',
'src/tiff/libtiff/tif_luv.c',
'src/tiff/libtiff/tif_lzw.c',
'src/tiff/libtiff/tif_next.c',
'src/tiff/libtiff/tif_ojpeg.c',
'src/tiff/libtiff/tif_open.c',
'src/tiff/libtiff/tif_packbits.c',
'src/tiff/libtiff/tif_pixarlog.c',
'src/tiff/libtiff/tif_predict.c',
'src/tiff/libtiff/tif_print.c',
'src/tiff/libtiff/tif_read.c',
'src/tiff/libtiff/tif_strip.c',
'src/tiff/libtiff/tif_swab.c',
'src/tiff/libtiff/tif_thunder.c',
'src/tiff/libtiff/tif_tile.c',
'src/tiff/libtiff/tif_unix.c',
'src/tiff/libtiff/tif_version.c',
'src/tiff/libtiff/tif_warning.c',
'src/tiff/libtiff/tif_write.c',
'src/tiff/libtiff/tif_zip.c',
]
unix = [ unix = [
'src/unix/apptraits.cpp', 'src/unix/apptraits.cpp',
'src/unix/appunix.cpp', 'src/unix/appunix.cpp',
@ -1160,89 +862,6 @@ unixgtk = [
'src/unix/utilsx11.cpp', 'src/unix/utilsx11.cpp',
] ]
xrc = [
'src/xml/xml.cpp',
'src/xrc/xh_animatctrl.cpp',
'src/xrc/xh_bmp.cpp',
'src/xrc/xh_bmpbt.cpp',
'src/xrc/xh_bmpcbox.cpp',
'src/xrc/xh_bttn.cpp',
'src/xrc/xh_cald.cpp',
'src/xrc/xh_chckb.cpp',
'src/xrc/xh_chckl.cpp',
'src/xrc/xh_choic.cpp',
'src/xrc/xh_choicbk.cpp',
'src/xrc/xh_clrpicker.cpp',
'src/xrc/xh_cmdlinkbn.cpp',
'src/xrc/xh_collpane.cpp',
'src/xrc/xh_combo.cpp',
'src/xrc/xh_comboctrl.cpp',
'src/xrc/xh_datectrl.cpp',
'src/xrc/xh_dirpicker.cpp',
'src/xrc/xh_dlg.cpp',
'src/xrc/xh_editlbox.cpp',
'src/xrc/xh_filectrl.cpp',
'src/xrc/xh_filepicker.cpp',
'src/xrc/xh_fontpicker.cpp',
'src/xrc/xh_frame.cpp',
'src/xrc/xh_gauge.cpp',
'src/xrc/xh_gdctl.cpp',
'src/xrc/xh_grid.cpp',
'src/xrc/xh_html.cpp',
'src/xrc/xh_htmllbox.cpp',
'src/xrc/xh_hyperlink.cpp',
'src/xrc/xh_listb.cpp',
'src/xrc/xh_listbk.cpp',
'src/xrc/xh_listc.cpp',
'src/xrc/xh_mdi.cpp',
'src/xrc/xh_menu.cpp',
'src/xrc/xh_notbk.cpp',
'src/xrc/xh_odcombo.cpp',
'src/xrc/xh_panel.cpp',
'src/xrc/xh_propdlg.cpp',
'src/xrc/xh_radbt.cpp',
'src/xrc/xh_radbx.cpp',
'src/xrc/xh_richtext.cpp',
'src/xrc/xh_scrol.cpp',
'src/xrc/xh_scwin.cpp',
'src/xrc/xh_sizer.cpp',
'src/xrc/xh_slidr.cpp',
'src/xrc/xh_spin.cpp',
'src/xrc/xh_split.cpp',
'src/xrc/xh_srchctrl.cpp',
'src/xrc/xh_statbar.cpp',
'src/xrc/xh_stbmp.cpp',
'src/xrc/xh_stbox.cpp',
'src/xrc/xh_stlin.cpp',
'src/xrc/xh_sttxt.cpp',
'src/xrc/xh_text.cpp',
'src/xrc/xh_tglbtn.cpp',
'src/xrc/xh_toolb.cpp',
'src/xrc/xh_toolbk.cpp',
'src/xrc/xh_tree.cpp',
'src/xrc/xh_treebk.cpp',
'src/xrc/xh_unkwn.cpp',
'src/xrc/xh_wizrd.cpp',
'src/xrc/xmladv.cpp',
'src/xrc/xmlres.cpp',
'src/xrc/xmlrsall.cpp',
]
zlib = [
'src/zlib/adler32.c',
'src/zlib/compress.c',
'src/zlib/crc32.c',
'src/zlib/deflate.c',
'src/zlib/gzio.c',
'src/zlib/infback.c',
'src/zlib/inffast.c',
'src/zlib/inflate.c',
'src/zlib/inftrees.c',
'src/zlib/trees.c',
'src/zlib/uncompr.c',
'src/zlib/zutil.c',
]
files = aui + common + generic files = aui + common + generic
if sys.platform == 'win32': if sys.platform == 'win32':

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

19
Externals/wxWidgets3/build_wx.sh vendored Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
svn co -r 70933 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets
case $OSTYPE in
darwin*)
BACKEND="osx_cocoa"
;;
linux*)
BACKEND="gtk"
;;
esac
mkdir build-local
cd build-local
../configure --with-$BACKEND --disable-shared --enable-unicode --disable-compat28 --disable-exceptions --disable-fswatcher --without-regex --without-expat --disable-xml --disable-ribbon --disable-propgrid --disable-stc --disable-html --disable-richtext --without-libjpeg --without-libtiff --disable-webview --disable-markup
make

View File

@ -3,7 +3,7 @@
// Purpose: declaration of wxAboutDialog class // Purpose: declaration of wxAboutDialog class
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 2006-10-07 // Created: 2006-10-07
// RCS-ID: $Id: aboutdlg.h 61534 2009-07-25 22:53:23Z VZ $ // RCS-ID: $Id: aboutdlg.h 67681 2011-05-03 16:29:04Z DS $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org> // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -69,7 +69,7 @@ public:
// icon to be shown in the dialog, defaults to the main frame icon // icon to be shown in the dialog, defaults to the main frame icon
void SetIcon(const wxIcon& icon) { m_icon = icon; } void SetIcon(const wxIcon& icon) { m_icon = icon; }
bool HasIcon() const { return m_icon.Ok(); } bool HasIcon() const { return m_icon.IsOk(); }
wxIcon GetIcon() const; wxIcon GetIcon() const;
// web site for the program and its description (defaults to URL itself if // web site for the program and its description (defaults to URL itself if

View File

@ -4,7 +4,7 @@
// Author: Julian Smart, Robert Roebling, Vadim Zeitlin // Author: Julian Smart, Robert Roebling, Vadim Zeitlin
// Modified by: // Modified by:
// Created: 31.05.01 (extracted from other files) // Created: 31.05.01 (extracted from other files)
// RCS-ID: $Id: accel.h 67280 2011-03-22 14:17:38Z DS $ // RCS-ID: $Id: accel.h 68718 2011-08-16 11:55:39Z SC $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -34,10 +34,11 @@ enum wxAcceleratorEntryFlags
wxACCEL_CTRL = 0x0002, // hold Ctrl key down wxACCEL_CTRL = 0x0002, // hold Ctrl key down
wxACCEL_SHIFT = 0x0004, // hold Shift key down wxACCEL_SHIFT = 0x0004, // hold Shift key down
#if defined(__WXMAC__) || defined(__WXCOCOA__) #if defined(__WXMAC__) || defined(__WXCOCOA__)
wxACCEL_CMD = 0x0008 // Command key on OS X wxACCEL_RAW_CTRL= 0x0008, //
#else #else
wxACCEL_CMD = wxACCEL_CTRL wxACCEL_RAW_CTRL= wxACCEL_CTRL,
#endif #endif
wxACCEL_CMD = wxACCEL_CTRL
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/affinematrix2d.h
// Purpose: wxAffineMatrix2D class.
// Author: Based on wxTransformMatrix by Chris Breeze, Julian Smart
// Created: 2011-04-05
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AFFINEMATRIX2D_H_
#define _WX_AFFINEMATRIX2D_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/affinematrix2dbase.h"
// A simple implementation of wxAffineMatrix2DBase interface done entirely in
// wxWidgets.
class WXDLLIMPEXP_CORE wxAffineMatrix2D : public wxAffineMatrix2DBase
{
public:
wxAffineMatrix2D() : m_11(1), m_12(0),
m_21(0), m_22(1),
m_tx(0), m_ty(0)
{
}
// Implement base class pure virtual methods.
virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr);
virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const;
virtual void Concat(const wxAffineMatrix2DBase& t);
virtual bool Invert();
virtual bool IsIdentity() const;
virtual bool IsEqual(const wxAffineMatrix2DBase& t) const;
virtual void Translate(wxDouble dx, wxDouble dy);
virtual void Scale(wxDouble xScale, wxDouble yScale);
virtual void Rotate(wxDouble ccRadians);
protected:
virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const;
virtual wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const;
private:
wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2D_H_

View File

@ -0,0 +1,127 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/affinematrix2dbase.h
// Purpose: Common interface for 2D transformation matrices.
// Author: Catalin Raceanu
// Created: 2011-04-06
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_AFFINEMATRIX2DBASE_H_
#define _WX_AFFINEMATRIX2DBASE_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/geometry.h"
struct wxMatrix2D
{
wxMatrix2D(wxDouble v11 = 1,
wxDouble v12 = 0,
wxDouble v21 = 0,
wxDouble v22 = 1)
{
m_11 = v11; m_12 = v12;
m_21 = v21; m_22 = v22;
}
wxDouble m_11, m_12, m_21, m_22;
};
// A 2x3 matrix representing an affine 2D transformation.
//
// This is an abstract base class implemented by wxAffineMatrix2D only so far,
// but in the future we also plan to derive wxGraphicsMatrix from it (it should
// also be documented then as currently only wxAffineMatrix2D itself is).
class WXDLLIMPEXP_CORE wxAffineMatrix2DBase
{
public:
wxAffineMatrix2DBase() {}
virtual ~wxAffineMatrix2DBase() {}
// sets the matrix to the respective values
virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr) = 0;
// gets the component valuess of the matrix
virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const = 0;
// concatenates the matrix
virtual void Concat(const wxAffineMatrix2DBase& t) = 0;
// makes this the inverse matrix
virtual bool Invert() = 0;
// return true if this is the identity matrix
virtual bool IsIdentity() const = 0;
// returns true if the elements of the transformation matrix are equal ?
virtual bool IsEqual(const wxAffineMatrix2DBase& t) const = 0;
bool operator==(const wxAffineMatrix2DBase& t) const { return IsEqual(t); }
bool operator!=(const wxAffineMatrix2DBase& t) const { return !IsEqual(t); }
//
// transformations
//
// add the translation to this matrix
virtual void Translate(wxDouble dx, wxDouble dy) = 0;
// add the scale to this matrix
virtual void Scale(wxDouble xScale, wxDouble yScale) = 0;
// add the rotation to this matrix (counter clockwise, radians)
virtual void Rotate(wxDouble ccRadians) = 0;
// add mirroring to this matrix
void Mirror(int direction = wxHORIZONTAL)
{
wxDouble x = (direction & wxHORIZONTAL) ? -1 : 1;
wxDouble y = (direction & wxVERTICAL) ? -1 : 1;
Scale(x, y);
}
// applies that matrix to the point
wxPoint2DDouble TransformPoint(const wxPoint2DDouble& src) const
{
return DoTransformPoint(src);
}
void TransformPoint(wxDouble* x, wxDouble* y) const
{
wxCHECK_RET( x && y, "Can't be NULL" );
const wxPoint2DDouble dst = DoTransformPoint(wxPoint2DDouble(*x, *y));
*x = dst.m_x;
*y = dst.m_y;
}
// applies the matrix except for translations
wxPoint2DDouble TransformDistance(const wxPoint2DDouble& src) const
{
return DoTransformDistance(src);
}
void TransformDistance(wxDouble* dx, wxDouble* dy) const
{
wxCHECK_RET( dx && dy, "Can't be NULL" );
const wxPoint2DDouble
dst = DoTransformDistance(wxPoint2DDouble(*dx, *dy));
*dx = dst.m_x;
*dy = dst.m_y;
}
protected:
virtual
wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const = 0;
virtual
wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2DBASE_H_

View File

@ -0,0 +1,200 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/anybutton.h
// Purpose: wxAnyButtonBase class
// Author: Vadim Zetlin
// Created: 2000-08-15 (extracted from button.h)
// RCS-ID: $Id: anybutton.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zetlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_ANYBUTTON_H_BASE_
#define _WX_ANYBUTTON_H_BASE_
#include "wx/defs.h"
#ifdef wxHAS_ANY_BUTTON
// ----------------------------------------------------------------------------
// wxAnyButton specific flags
// ----------------------------------------------------------------------------
// These flags affect label alignment
#define wxBU_LEFT 0x0040
#define wxBU_TOP 0x0080
#define wxBU_RIGHT 0x0100
#define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
// These two flags are obsolete
#define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004
// by default, the buttons will be created with some (system dependent)
// minimal size to make them look nicer, giving this style will make them as
// small as possible
#define wxBU_EXACTFIT 0x0001
// this flag can be used to disable using the text label in the button: it is
// mostly useful when creating buttons showing bitmap and having stock id as
// without it both the standard label corresponding to the stock id and the
// bitmap would be shown
#define wxBU_NOTEXT 0x0002
#include "wx/bitmap.h"
#include "wx/control.h"
// ----------------------------------------------------------------------------
// wxAnyButton: common button functionality
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxAnyButtonBase : public wxControl
{
public:
wxAnyButtonBase() { }
// show the image in the button in addition to the label: this method is
// supported on all (major) platforms
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
{
SetBitmapLabel(bitmap);
SetBitmapPosition(dir);
}
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
// Methods for setting individual images for different states: normal,
// selected (meaning pushed or pressed), focused (meaning normal state for
// a focused button), disabled or hover (a.k.a. hot or current).
//
// Remember that SetBitmap() itself must be called before any other
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
// for it anyhow) and that all bitmaps passed to these functions should be
// of the same size.
void SetBitmapLabel(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Normal); }
void SetBitmapPressed(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Pressed); }
void SetBitmapDisabled(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Disabled); }
void SetBitmapCurrent(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Current); }
void SetBitmapFocus(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Focused); }
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
// set the margins around the image
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
// set the image position relative to the text, i.e. wxLEFT means that the
// image is to the left of the text (this is the default)
void SetBitmapPosition(wxDirection dir);
// Buttons on MSW can look bad if they are not native colours, because
// then they become owner-drawn and not theme-drawn. Disable it here
// in wxAnyButtonBase to make it consistent.
virtual bool ShouldInheritColours() const { return false; }
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
#if WXWIN_COMPATIBILITY_2_8
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
#endif // WXWIN_COMPATIBILITY_2_8
// backwards compatible names for pressed/current bitmaps: they're not
// deprecated as there is nothing really wrong with using them and no real
// advantage to using the new names but the new names are still preferred
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
// this enum is not part of wx public API, it is public because it is used
// in non wxAnyButton-derived classes internally
//
// also notice that MSW code relies on the values of the enum elements, do
// not change them without revising src/msw/button.cpp
enum State
{
State_Normal,
State_Current, // a.k.a. hot or "hovering"
State_Pressed, // a.k.a. "selected" in public API for some reason
State_Disabled,
State_Focused,
State_Max
};
// return true if this button shouldn't show the text label, either because
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
bool DontShowLabel() const
{
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
}
// return true if we do show the label
bool ShowsLabel() const
{
return !DontShowLabel();
}
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
{ return wxBitmap(); }
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
State WXUNUSED(which))
{ }
virtual wxSize DoGetBitmapMargins() const
{ return wxSize(0, 0); }
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
{ }
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
{ }
virtual bool DoGetAuthNeeded() const { return false; }
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
wxDECLARE_NO_COPY_CLASS(wxAnyButtonBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/anybutton.h"
#elif defined(__WXMSW__)
#include "wx/msw/anybutton.h"
//#elif defined(__WXMOTIF__)
// #include "wx/motif/anybutton.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/anybutton.h"
//#elif defined(__WXGTK__)
// #include "wx/gtk1/anybutton.h"
#elif defined(__WXMAC__)
#include "wx/osx/anybutton.h"
//#elif defined(__WXCOCOA__)
// #include "wx/cocoa/anybutton.h"
//#elif defined(__WXPM__)
// #include "wx/os2/anybutton.h"
#else
typedef wxAnyButtonBase wxAnyButton;
#endif
#endif // wxHAS_ANY_BUTTON
#endif // _WX_ANYBUTTON_H_BASE_

View File

@ -5,7 +5,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: app.h 66648 2011-01-08 06:42:41Z PC $ // RCS-ID: $Id: app.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -18,6 +18,7 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/event.h" // for the base class #include "wx/event.h" // for the base class
#include "wx/eventfilter.h" // (and another one)
#include "wx/build.h" #include "wx/build.h"
#include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv #include "wx/cmdargs.h" // for wxCmdLineArgsArray used by wxApp::argv
#include "wx/init.h" // we must declare wxEntry() #include "wx/init.h" // we must declare wxEntry()
@ -70,7 +71,8 @@ extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete;
// wxAppConsoleBase: wxApp for non-GUI applications // wxAppConsoleBase: wxApp for non-GUI applications
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler,
public wxEventFilter
{ {
public: public:
// ctor and dtor // ctor and dtor
@ -238,13 +240,8 @@ public:
// event processing functions // event processing functions
// -------------------------- // --------------------------
// this method allows to filter all the events processed by the program, so // Implement the inherited wxEventFilter method but just return -1 from it
// you should try to return quickly from it to avoid slowing down the // to indicate that default processing should take place.
// program to the crawl
//
// return value should be -1 to continue with the normal event processing,
// or TRUE or FALSE to stop further processing and pretend that the event
// had been already processed or won't be processed at all, respectively
virtual int FilterEvent(wxEvent& event); virtual int FilterEvent(wxEvent& event);
// return true if we're running event loop, i.e. if the events can // return true if we're running event loop, i.e. if the events can
@ -595,10 +592,10 @@ public:
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Get display mode that is used use. This is only used in framebuffer // Get display mode that is used use. This is only used in framebuffer
// wxWin ports (such as wxMGL or wxDFB). // wxWin ports such as wxDFB.
virtual wxVideoMode GetDisplayMode() const; virtual wxVideoMode GetDisplayMode() const;
// Set display mode to use. This is only used in framebuffer wxWin // Set display mode to use. This is only used in framebuffer wxWin
// ports (such as wxMGL or wxDFB). This method should be called from // ports such as wxDFB. This method should be called from
// wxApp::OnInitGui // wxApp::OnInitGui
virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; } virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
@ -684,14 +681,10 @@ protected:
// now include the declaration of the real class // now include the declaration of the real class
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#include "wx/palmos/app.h"
#elif defined(__WXMSW__)
#include "wx/msw/app.h" #include "wx/msw/app.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/app.h" #include "wx/motif/app.h"
#elif defined(__WXMGL__)
#include "wx/mgl/app.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/dfb/app.h" #include "wx/dfb/app.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.06.2003 // Created: 19.06.2003
// RCS-ID: $Id: apptrait.h 61488 2009-07-21 14:16:44Z VZ $ // RCS-ID: $Id: apptrait.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -177,9 +177,7 @@ private:
// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the // NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
// Unix code (and otherwise __UNIX__ wouldn't be defined) // Unix code (and otherwise __UNIX__ wouldn't be defined)
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port // ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__) #if defined(__WIN32__)
#include "wx/palmos/apptbase.h"
#elif defined(__WIN32__)
#include "wx/msw/apptbase.h" #include "wx/msw/apptbase.h"
#elif defined(__UNIX__) && !defined(__EMX__) #elif defined(__UNIX__) && !defined(__EMX__)
#include "wx/unix/apptbase.h" #include "wx/unix/apptbase.h"
@ -274,9 +272,7 @@ public:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port // ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
#if defined(__WXPALMOS__) #if defined(__WIN32__)
#include "wx/palmos/apptrait.h"
#elif defined(__WIN32__)
#include "wx/msw/apptrait.h" #include "wx/msw/apptrait.h"
#elif defined(__OS2__) #elif defined(__OS2__)
#include "wx/os2/apptrait.h" #include "wx/os2/apptrait.h"

View File

@ -4,7 +4,7 @@
// Author: Mattia Barbon and Vadim Zeitlin // Author: Mattia Barbon and Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07/07/03 // Created: 07/07/03
// RCS-ID: $Id: arrstr.h 66724 2011-01-20 08:38:36Z SC $ // RCS-ID: $Id: arrstr.h 67343 2011-03-30 14:16:04Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2003 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -28,7 +28,7 @@ inline int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2)
return wxStringSortAscending(s2, s1); return wxStringSortAscending(s2, s1);
} }
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
#include "wx/dynarray.h" #include "wx/dynarray.h"
@ -100,7 +100,7 @@ private:
} }
}; };
#else // if !wxUSE_STL #else // if !wxUSE_STD_CONTAINERS
// this shouldn't be defined for compilers not supporting template methods or // this shouldn't be defined for compilers not supporting template methods or
// without std::distance() // without std::distance()
@ -384,7 +384,7 @@ public:
{ Copy(array); } { Copy(array); }
}; };
#endif // !wxUSE_STL #endif // !wxUSE_STD_CONTAINERS
// this class provides a temporary wxString* from a // this class provides a temporary wxString* from a
// wxArrayString // wxArrayString

View File

@ -3,7 +3,7 @@
// Purpose: functions to manipulate atomically integers and pointers // Purpose: functions to manipulate atomically integers and pointers
// Author: Armel Asselin // Author: Armel Asselin
// Created: 12/13/2006 // Created: 12/13/2006
// RCS-ID: $Id: atomic.h 53954 2008-06-02 20:42:23Z VZ $ // RCS-ID: $Id: atomic.h 70808 2012-03-04 20:31:42Z VZ $
// Copyright: (c) Armel Asselin // Copyright: (c) Armel Asselin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -43,7 +43,7 @@ inline wxUint32 wxAtomicDec (wxUint32 &value)
} }
#elif defined(__WXMSW__) #elif defined(__WINDOWS__)
// include standard Windows headers // include standard Windows headers
#include "wx/msw/wrapwin.h" #include "wx/msw/wrapwin.h"

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2008-08-04 // Created: 2008-08-04
// RCS-ID: $Id: auibar.h 66546 2011-01-03 18:43:30Z VZ $ // RCS-ID: $Id: auibar.h 69594 2011-10-30 16:51:10Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -65,44 +65,44 @@ enum wxAuiToolBarToolTextOrientation
class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent
{ {
public: public:
wxAuiToolBarEvent(wxEventType command_type = wxEVT_NULL, wxAuiToolBarEvent(wxEventType commandType = wxEVT_NULL,
int win_id = 0) int winId = 0)
: wxNotifyEvent(command_type, win_id) : wxNotifyEvent(commandType, winId)
{ {
is_dropdown_clicked = false; m_isDropdownClicked = false;
click_pt = wxPoint(-1, -1); m_clickPt = wxPoint(-1, -1);
rect = wxRect(-1,-1, 0, 0); m_rect = wxRect(-1,-1, 0, 0);
tool_id = -1; m_toolId = -1;
} }
#ifndef SWIG #ifndef SWIG
wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c) wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
{ {
is_dropdown_clicked = c.is_dropdown_clicked; m_isDropdownClicked = c.m_isDropdownClicked;
click_pt = c.click_pt; m_clickPt = c.m_clickPt;
rect = c.rect; m_rect = c.m_rect;
tool_id = c.tool_id; m_toolId = c.m_toolId;
} }
#endif #endif
wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); } wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); }
bool IsDropDownClicked() const { return is_dropdown_clicked; } bool IsDropDownClicked() const { return m_isDropdownClicked; }
void SetDropDownClicked(bool c) { is_dropdown_clicked = c; } void SetDropDownClicked(bool c) { m_isDropdownClicked = c; }
wxPoint GetClickPoint() const { return click_pt; } wxPoint GetClickPoint() const { return m_clickPt; }
void SetClickPoint(const wxPoint& p) { click_pt = p; } void SetClickPoint(const wxPoint& p) { m_clickPt = p; }
wxRect GetItemRect() const { return rect; } wxRect GetItemRect() const { return m_rect; }
void SetItemRect(const wxRect& r) { rect = r; } void SetItemRect(const wxRect& r) { m_rect = r; }
int GetToolId() const { return tool_id; } int GetToolId() const { return m_toolId; }
void SetToolId(int toolid) { tool_id = toolid; } void SetToolId(int toolId) { m_toolId = toolId; }
private: private:
bool is_dropdown_clicked; bool m_isDropdownClicked;
wxPoint click_pt; wxPoint m_clickPt;
wxRect rect; wxRect m_rect;
int tool_id; int m_toolId;
private: private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent)
@ -117,18 +117,18 @@ public:
wxAuiToolBarItem() wxAuiToolBarItem()
{ {
window = NULL; m_window = NULL;
sizer_item = NULL; m_sizerItem = NULL;
spacer_pixels = 0; m_spacerPixels = 0;
toolid = 0; m_toolId = 0;
kind = wxITEM_NORMAL; m_kind = wxITEM_NORMAL;
state = 0; // normal, enabled m_state = 0; // normal, enabled
proportion = 0; m_proportion = 0;
active = true; m_active = true;
dropdown = true; m_dropDown = true;
sticky = true; m_sticky = true;
user_data = 0; m_userData = 0;
alignment = wxALIGN_CENTER; m_alignment = wxALIGN_CENTER;
} }
wxAuiToolBarItem(const wxAuiToolBarItem& c) wxAuiToolBarItem(const wxAuiToolBarItem& c)
@ -144,106 +144,106 @@ public:
void Assign(const wxAuiToolBarItem& c) void Assign(const wxAuiToolBarItem& c)
{ {
window = c.window; m_window = c.m_window;
label = c.label; m_label = c.m_label;
bitmap = c.bitmap; m_bitmap = c.m_bitmap;
disabled_bitmap = c.disabled_bitmap; m_disabledBitmap = c.m_disabledBitmap;
hover_bitmap = c.hover_bitmap; m_hoverBitmap = c.m_hoverBitmap;
short_help = c.short_help; m_shortHelp = c.m_shortHelp;
long_help = c.long_help; m_longHelp = c.m_longHelp;
sizer_item = c.sizer_item; m_sizerItem = c.m_sizerItem;
min_size = c.min_size; m_minSize = c.m_minSize;
spacer_pixels = c.spacer_pixels; m_spacerPixels = c.m_spacerPixels;
toolid = c.toolid; m_toolId = c.m_toolId;
kind = c.kind; m_kind = c.m_kind;
state = c.state; m_state = c.m_state;
proportion = c.proportion; m_proportion = c.m_proportion;
active = c.active; m_active = c.m_active;
dropdown = c.dropdown; m_dropDown = c.m_dropDown;
sticky = c.sticky; m_sticky = c.m_sticky;
user_data = c.user_data; m_userData = c.m_userData;
alignment = c.alignment; m_alignment = c.m_alignment;
} }
void SetWindow(wxWindow* w) { window = w; } void SetWindow(wxWindow* w) { m_window = w; }
wxWindow* GetWindow() { return window; } wxWindow* GetWindow() { return m_window; }
void SetId(int new_id) { toolid = new_id; } void SetId(int newId) { m_toolId = newId; }
int GetId() const { return toolid; } int GetId() const { return m_toolId; }
void SetKind(int new_kind) { kind = new_kind; } void SetKind(int newKind) { m_kind = newKind; }
int GetKind() const { return kind; } int GetKind() const { return m_kind; }
void SetState(int new_state) { state = new_state; } void SetState(int newState) { m_state = newState; }
int GetState() const { return state; } int GetState() const { return m_state; }
void SetSizerItem(wxSizerItem* s) { sizer_item = s; } void SetSizerItem(wxSizerItem* s) { m_sizerItem = s; }
wxSizerItem* GetSizerItem() const { return sizer_item; } wxSizerItem* GetSizerItem() const { return m_sizerItem; }
void SetLabel(const wxString& s) { label = s; } void SetLabel(const wxString& s) { m_label = s; }
const wxString& GetLabel() const { return label; } const wxString& GetLabel() const { return m_label; }
void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; } void SetBitmap(const wxBitmap& bmp) { m_bitmap = bmp; }
const wxBitmap& GetBitmap() const { return bitmap; } const wxBitmap& GetBitmap() const { return m_bitmap; }
void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; } void SetDisabledBitmap(const wxBitmap& bmp) { m_disabledBitmap = bmp; }
const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; } const wxBitmap& GetDisabledBitmap() const { return m_disabledBitmap; }
void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; } void SetHoverBitmap(const wxBitmap& bmp) { m_hoverBitmap = bmp; }
const wxBitmap& GetHoverBitmap() const { return hover_bitmap; } const wxBitmap& GetHoverBitmap() const { return m_hoverBitmap; }
void SetShortHelp(const wxString& s) { short_help = s; } void SetShortHelp(const wxString& s) { m_shortHelp = s; }
const wxString& GetShortHelp() const { return short_help; } const wxString& GetShortHelp() const { return m_shortHelp; }
void SetLongHelp(const wxString& s) { long_help = s; } void SetLongHelp(const wxString& s) { m_longHelp = s; }
const wxString& GetLongHelp() const { return long_help; } const wxString& GetLongHelp() const { return m_longHelp; }
void SetMinSize(const wxSize& s) { min_size = s; } void SetMinSize(const wxSize& s) { m_minSize = s; }
const wxSize& GetMinSize() const { return min_size; } const wxSize& GetMinSize() const { return m_minSize; }
void SetSpacerPixels(int s) { spacer_pixels = s; } void SetSpacerPixels(int s) { m_spacerPixels = s; }
int GetSpacerPixels() const { return spacer_pixels; } int GetSpacerPixels() const { return m_spacerPixels; }
void SetProportion(int p) { proportion = p; } void SetProportion(int p) { m_proportion = p; }
int GetProportion() const { return proportion; } int GetProportion() const { return m_proportion; }
void SetActive(bool b) { active = b; } void SetActive(bool b) { m_active = b; }
bool IsActive() const { return active; } bool IsActive() const { return m_active; }
void SetHasDropDown(bool b) { dropdown = b; } void SetHasDropDown(bool b) { m_dropDown = b; }
bool HasDropDown() const { return dropdown; } bool HasDropDown() const { return m_dropDown; }
void SetSticky(bool b) { sticky = b; } void SetSticky(bool b) { m_sticky = b; }
bool IsSticky() const { return sticky; } bool IsSticky() const { return m_sticky; }
void SetUserData(long l) { user_data = l; } void SetUserData(long l) { m_userData = l; }
long GetUserData() const { return user_data; } long GetUserData() const { return m_userData; }
void SetAlignment(int l) { alignment = l; } void SetAlignment(int l) { m_alignment = l; }
int GetAlignment() const { return alignment; } int GetAlignment() const { return m_alignment; }
private: private:
wxWindow* window; // item's associated window wxWindow* m_window; // item's associated window
wxString label; // label displayed on the item wxString m_label; // label displayed on the item
wxBitmap bitmap; // item's bitmap wxBitmap m_bitmap; // item's bitmap
wxBitmap disabled_bitmap; // item's disabled bitmap wxBitmap m_disabledBitmap; // item's disabled bitmap
wxBitmap hover_bitmap; // item's hover bitmap wxBitmap m_hoverBitmap; // item's hover bitmap
wxString short_help; // short help (for tooltip) wxString m_shortHelp; // short help (for tooltip)
wxString long_help; // long help (for status bar) wxString m_longHelp; // long help (for status bar)
wxSizerItem* sizer_item; // sizer item wxSizerItem* m_sizerItem; // sizer item
wxSize min_size; // item's minimum size wxSize m_minSize; // item's minimum size
int spacer_pixels; // size of a spacer int m_spacerPixels; // size of a spacer
int toolid; // item's id int m_toolId; // item's id
int kind; // item's kind int m_kind; // item's kind
int state; // state int m_state; // state
int proportion; // proportion int m_proportion; // proportion
bool active; // true if the item is currently active bool m_active; // true if the item is currently active
bool dropdown; // true if the item has a dropdown button bool m_dropDown; // true if the item has a dropdown button
bool sticky; // overrides button states if true (always active) bool m_sticky; // overrides button states if true (always active)
long user_data; // user-specified data long m_userData; // user-specified data
int alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other int m_alignment; // sizer alignment flag, defaults to wxCENTER, may be wxEXPAND or any other
}; };
#ifndef SWIG #ifndef SWIG
@ -325,8 +325,8 @@ public:
wxWindow* wnd, wxWindow* wnd,
const wxAuiToolBarItem& item) = 0; const wxAuiToolBarItem& item) = 0;
virtual int GetElementSize(int element_id) = 0; virtual int GetElementSize(int elementId) = 0;
virtual void SetElementSize(int element_id, int size) = 0; virtual void SetElementSize(int elementId, int size) = 0;
virtual int ShowDropDown( virtual int ShowDropDown(
wxWindow* wnd, wxWindow* wnd,
@ -407,30 +407,30 @@ public:
const wxAuiToolBarItem& item); const wxAuiToolBarItem& item);
virtual int GetElementSize(int element); virtual int GetElementSize(int element);
virtual void SetElementSize(int element_id, int size); virtual void SetElementSize(int elementId, int size);
virtual int ShowDropDown(wxWindow* wnd, virtual int ShowDropDown(wxWindow* wnd,
const wxAuiToolBarItemArray& items); const wxAuiToolBarItemArray& items);
protected: protected:
wxBitmap m_button_dropdown_bmp; wxBitmap m_buttonDropDownBmp;
wxBitmap m_disabled_button_dropdown_bmp; wxBitmap m_disabledButtonDropDownBmp;
wxBitmap m_overflow_bmp; wxBitmap m_overflowBmp;
wxBitmap m_disabled_overflow_bmp; wxBitmap m_disabledOverflowBmp;
wxColour m_base_colour; wxColour m_baseColour;
wxColour m_highlight_colour; wxColour m_highlightColour;
wxFont m_font; wxFont m_font;
unsigned int m_flags; unsigned int m_flags;
int m_text_orientation; int m_textOrientation;
wxPen m_gripper_pen1; wxPen m_gripperPen1;
wxPen m_gripper_pen2; wxPen m_gripperPen2;
wxPen m_gripper_pen3; wxPen m_gripperPen3;
int m_separator_size; int m_separatorSize;
int m_gripper_size; int m_gripperSize;
int m_overflow_size; int m_overflowSize;
}; };
@ -456,40 +456,40 @@ public:
bool SetFont(const wxFont& font); bool SetFont(const wxFont& font);
wxAuiToolBarItem* AddTool(int tool_id, wxAuiToolBarItem* AddTool(int toolId,
const wxString& label, const wxString& label,
const wxBitmap& bitmap, const wxBitmap& bitmap,
const wxString& short_help_string = wxEmptyString, const wxString& shortHelpString = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL); wxItemKind kind = wxITEM_NORMAL);
wxAuiToolBarItem* AddTool(int tool_id, wxAuiToolBarItem* AddTool(int toolId,
const wxString& label, const wxString& label,
const wxBitmap& bitmap, const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap, const wxBitmap& disabledBitmap,
wxItemKind kind, wxItemKind kind,
const wxString& short_help_string, const wxString& shortHelpString,
const wxString& long_help_string, const wxString& longHelpString,
wxObject* client_data); wxObject* clientData);
wxAuiToolBarItem* AddTool(int tool_id, wxAuiToolBarItem* AddTool(int toolId,
const wxBitmap& bitmap, const wxBitmap& bitmap,
const wxBitmap& disabled_bitmap, const wxBitmap& disabledBitmap,
bool toggle = false, bool toggle = false,
wxObject* client_data = NULL, wxObject* clientData = NULL,
const wxString& short_help_string = wxEmptyString, const wxString& shortHelpString = wxEmptyString,
const wxString& long_help_string = wxEmptyString) const wxString& longHelpString = wxEmptyString)
{ {
return AddTool(tool_id, return AddTool(toolId,
wxEmptyString, wxEmptyString,
bitmap, bitmap,
disabled_bitmap, disabledBitmap,
toggle ? wxITEM_CHECK : wxITEM_NORMAL, toggle ? wxITEM_CHECK : wxITEM_NORMAL,
short_help_string, shortHelpString,
long_help_string, longHelpString,
client_data); clientData);
} }
wxAuiToolBarItem* AddLabel(int tool_id, wxAuiToolBarItem* AddLabel(int toolId,
const wxString& label = wxEmptyString, const wxString& label = wxEmptyString,
const int width = -1); const int width = -1);
wxAuiToolBarItem* AddControl(wxControl* control, wxAuiToolBarItem* AddControl(wxControl* control,
@ -500,22 +500,22 @@ public:
bool Realize(); bool Realize();
wxControl* FindControl(int window_id); wxControl* FindControl(int windowId);
wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const; wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
wxAuiToolBarItem* FindToolByIndex(int idx) const; wxAuiToolBarItem* FindToolByIndex(int idx) const;
wxAuiToolBarItem* FindTool(int tool_id) const; wxAuiToolBarItem* FindTool(int toolId) const;
void ClearTools() { Clear() ; } void ClearTools() { Clear() ; }
void Clear(); void Clear();
bool DeleteTool(int tool_id); bool DeleteTool(int toolId);
bool DeleteByIndex(int tool_id); bool DeleteByIndex(int toolId);
size_t GetToolCount() const; size_t GetToolCount() const;
int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); } int GetToolPos(int toolId) const { return GetToolIndex(toolId); }
int GetToolIndex(int tool_id) const; int GetToolIndex(int toolId) const;
bool GetToolFits(int tool_id) const; bool GetToolFits(int toolId) const;
wxRect GetToolRect(int tool_id) const; wxRect GetToolRect(int toolId) const;
bool GetToolFitsByIndex(int tool_id) const; bool GetToolFitsByIndex(int toolId) const;
bool GetToolBarFits() const; bool GetToolBarFits() const;
void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); } void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
@ -531,14 +531,14 @@ public:
bool GetGripperVisible() const; bool GetGripperVisible() const;
void SetGripperVisible(bool visible); void SetGripperVisible(bool visible);
void ToggleTool(int tool_id, bool state); void ToggleTool(int toolId, bool state);
bool GetToolToggled(int tool_id) const; bool GetToolToggled(int toolId) const;
void EnableTool(int tool_id, bool state); void EnableTool(int toolId, bool state);
bool GetToolEnabled(int tool_id) const; bool GetToolEnabled(int toolId) const;
void SetToolDropDown(int tool_id, bool dropdown); void SetToolDropDown(int toolId, bool dropdown);
bool GetToolDropDown(int tool_id) const; bool GetToolDropDown(int toolId) const;
void SetToolBorderPadding(int padding); void SetToolBorderPadding(int padding);
int GetToolBorderPadding() const; int GetToolBorderPadding() const;
@ -549,34 +549,37 @@ public:
void SetToolPacking(int packing); void SetToolPacking(int packing);
int GetToolPacking() const; int GetToolPacking() const;
void SetToolProportion(int tool_id, int proportion); void SetToolProportion(int toolId, int proportion);
int GetToolProportion(int tool_id) const; int GetToolProportion(int toolId) const;
void SetToolSeparation(int separation); void SetToolSeparation(int separation);
int GetToolSeparation() const; int GetToolSeparation() const;
void SetToolSticky(int tool_id, bool sticky); void SetToolSticky(int toolId, bool sticky);
bool GetToolSticky(int tool_id) const; bool GetToolSticky(int toolId) const;
wxString GetToolLabel(int tool_id) const; wxString GetToolLabel(int toolId) const;
void SetToolLabel(int tool_id, const wxString& label); void SetToolLabel(int toolId, const wxString& label);
wxBitmap GetToolBitmap(int tool_id) const; wxBitmap GetToolBitmap(int toolId) const;
void SetToolBitmap(int tool_id, const wxBitmap& bitmap); void SetToolBitmap(int toolId, const wxBitmap& bitmap);
wxString GetToolShortHelp(int tool_id) const; wxString GetToolShortHelp(int toolId) const;
void SetToolShortHelp(int tool_id, const wxString& help_string); void SetToolShortHelp(int toolId, const wxString& helpString);
wxString GetToolLongHelp(int tool_id) const; wxString GetToolLongHelp(int toolId) const;
void SetToolLongHelp(int tool_id, const wxString& help_string); void SetToolLongHelp(int toolId, const wxString& helpString);
void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend, void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
const wxAuiToolBarItemArray& append); const wxAuiToolBarItemArray& append);
// get size of hint rectangle for a particular dock location // get size of hint rectangle for a particular dock location
wxSize GetHintSize(int dock_direction) const; wxSize GetHintSize(int dockDirection) const;
bool IsPaneValid(const wxAuiPaneInfo& pane) const; bool IsPaneValid(const wxAuiPaneInfo& pane) const;
// Override to call DoIdleUpdate().
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
protected: protected:
virtual void OnCustomRender(wxDC& WXUNUSED(dc), virtual void OnCustomRender(wxDC& WXUNUSED(dc),
@ -624,30 +627,30 @@ protected:
wxAuiToolBarItemArray m_items; // array of toolbar items wxAuiToolBarItemArray m_items; // array of toolbar items
wxAuiToolBarArt* m_art; // art provider wxAuiToolBarArt* m_art; // art provider
wxBoxSizer* m_sizer; // main sizer for toolbar wxBoxSizer* m_sizer; // main sizer for toolbar
wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed) wxAuiToolBarItem* m_actionItem; // item that's being acted upon (pressed)
wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown wxAuiToolBarItem* m_tipItem; // item that has its tooltip shown
wxBitmap m_bitmap; // double-buffer bitmap wxBitmap m_bitmap; // double-buffer bitmap
wxSizerItem* m_gripper_sizer_item; wxSizerItem* m_gripperSizerItem;
wxSizerItem* m_overflow_sizer_item; wxSizerItem* m_overflowSizerItem;
wxSize m_absolute_min_size; wxSize m_absoluteMinSize;
wxPoint m_action_pos; // position of left-mouse down wxPoint m_actionPos; // position of left-mouse down
wxAuiToolBarItemArray m_custom_overflow_prepend; wxAuiToolBarItemArray m_customOverflowPrepend;
wxAuiToolBarItemArray m_custom_overflow_append; wxAuiToolBarItemArray m_customOverflowAppend;
int m_button_width; int m_buttonWidth;
int m_button_height; int m_buttonHeight;
int m_sizer_element_count; int m_sizerElementCount;
int m_left_padding; int m_leftPadding;
int m_right_padding; int m_rightPadding;
int m_top_padding; int m_topPadding;
int m_bottom_padding; int m_bottomPadding;
int m_tool_packing; int m_toolPacking;
int m_tool_border_padding; int m_toolBorderPadding;
int m_tool_text_orientation; int m_toolTextOrientation;
int m_overflow_state; int m_overflowState;
bool m_dragging; bool m_dragging;
bool m_gripper_visible; bool m_gripperVisible;
bool m_overflow_visible; bool m_overflowVisible;
long m_style; long m_style;
bool RealizeHelper(wxClientDC& dc, bool horizontal); bool RealizeHelper(wxClientDC& dc, bool horizontal);

View File

@ -24,7 +24,7 @@
#include "wx/aui/framemanager.h" #include "wx/aui/framemanager.h"
#include "wx/aui/dockart.h" #include "wx/aui/dockart.h"
#include "wx/aui/floatpane.h" #include "wx/aui/floatpane.h"
#include "wx/control.h" #include "wx/bookctrl.h"
class wxAuiNotebook; class wxAuiNotebook;
@ -60,40 +60,28 @@ enum wxAuiNotebookOption
// aui notebook event class // aui notebook event class
class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxNotifyEvent class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxBookCtrlEvent
{ {
public: public:
wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL, wxAuiNotebookEvent(wxEventType commandType = wxEVT_NULL,
int win_id = 0) int winId = 0)
: wxNotifyEvent(command_type, win_id) : wxBookCtrlEvent(commandType, winId)
{ {
old_selection = -1; m_dragSource = NULL;
selection = -1;
drag_source = NULL;
} }
#ifndef SWIG #ifndef SWIG
wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxNotifyEvent(c) wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c)
{ {
old_selection = c.old_selection; m_dragSource = c.m_dragSource;
selection = c.selection;
drag_source = c.drag_source;
} }
#endif #endif
wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); } wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
void SetSelection(int s) { selection = s; m_commandInt = s; } void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; }
int GetSelection() const { return selection; } wxAuiNotebook* GetDragSource() const { return m_dragSource; }
void SetOldSelection(int s) { old_selection = s; } private:
int GetOldSelection() const { return old_selection; } wxAuiNotebook* m_dragSource;
void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
wxAuiNotebook* GetDragSource() const { return drag_source; }
public:
int old_selection;
int selection;
wxAuiNotebook* drag_source;
#ifndef SWIG #ifndef SWIG
private: private:
@ -117,10 +105,10 @@ class WXDLLIMPEXP_AUI wxAuiTabContainerButton
public: public:
int id; // button's id int id; // button's id
int cur_state; // current state (normal, hover, pressed, etc.) int curState; // current state (normal, hover, pressed, etc.)
int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER) int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
wxBitmap bitmap; // button's hover bitmap wxBitmap bitmap; // button's hover bitmap
wxBitmap dis_bitmap; // button's disabled bitmap wxBitmap disBitmap; // button's disabled bitmap
wxRect rect; // button's hit rectangle wxRect rect; // button's hit rectangle
}; };
@ -143,12 +131,14 @@ public:
virtual wxAuiTabArt* Clone() = 0; virtual wxAuiTabArt* Clone() = 0;
virtual void SetFlags(unsigned int flags) = 0; virtual void SetFlags(unsigned int flags) = 0;
virtual void SetSizingInfo(const wxSize& tab_ctrl_size, virtual void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tab_count) = 0; size_t tabCount) = 0;
virtual void SetNormalFont(const wxFont& font) = 0; virtual void SetNormalFont(const wxFont& font) = 0;
virtual void SetSelectedFont(const wxFont& font) = 0; virtual void SetSelectedFont(const wxFont& font) = 0;
virtual void SetMeasuringFont(const wxFont& font) = 0; virtual void SetMeasuringFont(const wxFont& font) = 0;
virtual void SetColour(const wxColour& colour) = 0;
virtual void SetActiveColour(const wxColour& colour) = 0;
virtual void DrawBackground( virtual void DrawBackground(
wxDC& dc, wxDC& dc,
@ -158,20 +148,20 @@ public:
virtual void DrawTab(wxDC& dc, virtual void DrawTab(wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPage& pane, const wxAuiNotebookPage& pane,
const wxRect& in_rect, const wxRect& inRect,
int close_button_state, int closeButtonState,
wxRect* out_tab_rect, wxRect* outTabRect,
wxRect* out_button_rect, wxRect* outButtonRect,
int* x_extent) = 0; int* xExtent) = 0;
virtual void DrawButton( virtual void DrawButton(
wxDC& dc, wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxRect& in_rect, const wxRect& inRect,
int bitmap_id, int bitmapId,
int button_state, int buttonState,
int orientation, int orientation,
wxRect* out_rect) = 0; wxRect* outRect) = 0;
virtual wxSize GetTabSize( virtual wxSize GetTabSize(
wxDC& dc, wxDC& dc,
@ -179,20 +169,20 @@ public:
const wxString& caption, const wxString& caption,
const wxBitmap& bitmap, const wxBitmap& bitmap,
bool active, bool active,
int close_button_state, int closeButtonState,
int* x_extent) = 0; int* xExtent) = 0;
virtual int ShowDropDown( virtual int ShowDropDown(
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPageArray& items, const wxAuiNotebookPageArray& items,
int active_idx) = 0; int activeIdx) = 0;
virtual int GetIndentSize() = 0; virtual int GetIndentSize() = 0;
virtual int GetBestTabCtrlSize( virtual int GetBestTabCtrlSize(
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPageArray& pages, const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size) = 0; const wxSize& requiredBmpSize) = 0;
}; };
@ -206,12 +196,14 @@ public:
wxAuiTabArt* Clone(); wxAuiTabArt* Clone();
void SetFlags(unsigned int flags); void SetFlags(unsigned int flags);
void SetSizingInfo(const wxSize& tab_ctrl_size, void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tab_count); size_t tabCount);
void SetNormalFont(const wxFont& font); void SetNormalFont(const wxFont& font);
void SetSelectedFont(const wxFont& font); void SetSelectedFont(const wxFont& font);
void SetMeasuringFont(const wxFont& font); void SetMeasuringFont(const wxFont& font);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DrawBackground( void DrawBackground(
wxDC& dc, wxDC& dc,
@ -221,20 +213,20 @@ public:
void DrawTab(wxDC& dc, void DrawTab(wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPage& pane, const wxAuiNotebookPage& pane,
const wxRect& in_rect, const wxRect& inRect,
int close_button_state, int closeButtonState,
wxRect* out_tab_rect, wxRect* outTabRect,
wxRect* out_button_rect, wxRect* outButtonRect,
int* x_extent); int* xExtent);
void DrawButton( void DrawButton(
wxDC& dc, wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxRect& in_rect, const wxRect& inRect,
int bitmap_id, int bitmapId,
int button_state, int buttonState,
int orientation, int orientation,
wxRect* out_rect); wxRect* outRect);
int GetIndentSize(); int GetIndentSize();
@ -244,38 +236,39 @@ public:
const wxString& caption, const wxString& caption,
const wxBitmap& bitmap, const wxBitmap& bitmap,
bool active, bool active,
int close_button_state, int closeButtonState,
int* x_extent); int* xExtent);
int ShowDropDown( int ShowDropDown(
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPageArray& items, const wxAuiNotebookPageArray& items,
int active_idx); int activeIdx);
int GetBestTabCtrlSize(wxWindow* wnd, int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages, const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size); const wxSize& requiredBmpSize);
protected: protected:
wxFont m_normal_font; wxFont m_normalFont;
wxFont m_selected_font; wxFont m_selectedFont;
wxFont m_measuring_font; wxFont m_measuringFont;
wxColour m_base_colour; wxColour m_baseColour;
wxPen m_base_colour_pen; wxPen m_baseColourPen;
wxPen m_border_pen; wxPen m_borderPen;
wxBrush m_base_colour_brush; wxBrush m_baseColourBrush;
wxBitmap m_active_close_bmp; wxColour m_activeColour;
wxBitmap m_disabled_close_bmp; wxBitmap m_activeCloseBmp;
wxBitmap m_active_left_bmp; wxBitmap m_disabledCloseBmp;
wxBitmap m_disabled_left_bmp; wxBitmap m_activeLeftBmp;
wxBitmap m_active_right_bmp; wxBitmap m_disabledLeftBmp;
wxBitmap m_disabled_right_bmp; wxBitmap m_activeRightBmp;
wxBitmap m_active_windowlist_bmp; wxBitmap m_disabledRightBmp;
wxBitmap m_disabled_windowlist_bmp; wxBitmap m_activeWindowListBmp;
wxBitmap m_disabledWindowListBmp;
int m_fixed_tab_width; int m_fixedTabWidth;
int m_tab_ctrl_height; int m_tabCtrlHeight;
unsigned int m_flags; unsigned int m_flags;
}; };
@ -291,12 +284,14 @@ public:
wxAuiTabArt* Clone(); wxAuiTabArt* Clone();
void SetFlags(unsigned int flags); void SetFlags(unsigned int flags);
void SetSizingInfo(const wxSize& tab_ctrl_size, void SetSizingInfo(const wxSize& tabCtrlSize,
size_t tab_count); size_t tabCount);
void SetNormalFont(const wxFont& font); void SetNormalFont(const wxFont& font);
void SetSelectedFont(const wxFont& font); void SetSelectedFont(const wxFont& font);
void SetMeasuringFont(const wxFont& font); void SetMeasuringFont(const wxFont& font);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DrawBackground( void DrawBackground(
wxDC& dc, wxDC& dc,
@ -306,20 +301,20 @@ public:
void DrawTab(wxDC& dc, void DrawTab(wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPage& pane, const wxAuiNotebookPage& pane,
const wxRect& in_rect, const wxRect& inRect,
int close_button_state, int closeButtonState,
wxRect* out_tab_rect, wxRect* outTabRect,
wxRect* out_button_rect, wxRect* outButtonRect,
int* x_extent); int* xExtent);
void DrawButton( void DrawButton(
wxDC& dc, wxDC& dc,
wxWindow* wnd, wxWindow* wnd,
const wxRect& in_rect, const wxRect& inRect,
int bitmap_id, int bitmapId,
int button_state, int buttonState,
int orientation, int orientation,
wxRect* out_rect); wxRect* outRect);
int GetIndentSize(); int GetIndentSize();
@ -329,38 +324,38 @@ public:
const wxString& caption, const wxString& caption,
const wxBitmap& bitmap, const wxBitmap& bitmap,
bool active, bool active,
int close_button_state, int closeButtonState,
int* x_extent); int* xExtent);
int ShowDropDown( int ShowDropDown(
wxWindow* wnd, wxWindow* wnd,
const wxAuiNotebookPageArray& items, const wxAuiNotebookPageArray& items,
int active_idx); int activeIdx);
int GetBestTabCtrlSize(wxWindow* wnd, int GetBestTabCtrlSize(wxWindow* wnd,
const wxAuiNotebookPageArray& pages, const wxAuiNotebookPageArray& pages,
const wxSize& required_bmp_size); const wxSize& requiredBmpSize);
protected: protected:
wxFont m_normal_font; wxFont m_normalFont;
wxFont m_selected_font; wxFont m_selectedFont;
wxFont m_measuring_font; wxFont m_measuringFont;
wxPen m_normal_bkpen; wxPen m_normalBkPen;
wxPen m_selected_bkpen; wxPen m_selectedBkPen;
wxBrush m_normal_bkbrush; wxBrush m_normalBkBrush;
wxBrush m_selected_bkbrush; wxBrush m_selectedBkBrush;
wxBrush m_bkbrush; wxBrush m_bkBrush;
wxBitmap m_active_close_bmp; wxBitmap m_activeCloseBmp;
wxBitmap m_disabled_close_bmp; wxBitmap m_disabledCloseBmp;
wxBitmap m_active_left_bmp; wxBitmap m_activeLeftBmp;
wxBitmap m_disabled_left_bmp; wxBitmap m_disabledLeftBmp;
wxBitmap m_active_right_bmp; wxBitmap m_activeRightBmp;
wxBitmap m_disabled_right_bmp; wxBitmap m_disabledRightBmp;
wxBitmap m_active_windowlist_bmp; wxBitmap m_activeWindowListBmp;
wxBitmap m_disabled_windowlist_bmp; wxBitmap m_disabledWindowListBmp;
int m_fixed_tab_width; int m_fixedTabWidth;
unsigned int m_flags; unsigned int m_flags;
}; };
@ -387,7 +382,7 @@ public:
bool AddPage(wxWindow* page, const wxAuiNotebookPage& info); bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx); bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
bool MovePage(wxWindow* page, size_t new_idx); bool MovePage(wxWindow* page, size_t newIdx);
bool RemovePage(wxWindow* page); bool RemovePage(wxWindow* page);
bool SetActivePage(wxWindow* page); bool SetActivePage(wxWindow* page);
bool SetActivePage(size_t page); bool SetActivePage(size_t page);
@ -401,17 +396,19 @@ public:
wxAuiNotebookPage& GetPage(size_t idx); wxAuiNotebookPage& GetPage(size_t idx);
const wxAuiNotebookPage& GetPage(size_t idx) const; const wxAuiNotebookPage& GetPage(size_t idx) const;
wxAuiNotebookPageArray& GetPages(); wxAuiNotebookPageArray& GetPages();
void SetNormalFont(const wxFont& normal_font); void SetNormalFont(const wxFont& normalFont);
void SetSelectedFont(const wxFont& selected_font); void SetSelectedFont(const wxFont& selectedFont);
void SetMeasuringFont(const wxFont& measuring_font); void SetMeasuringFont(const wxFont& measuringFont);
void SetColour(const wxColour& colour);
void SetActiveColour(const wxColour& colour);
void DoShowHide(); void DoShowHide();
void SetRect(const wxRect& rect); void SetRect(const wxRect& rect);
void RemoveButton(int id); void RemoveButton(int id);
void AddButton(int id, void AddButton(int id,
int location, int location,
const wxBitmap& normal_bitmap = wxNullBitmap, const wxBitmap& normalBitmap = wxNullBitmap,
const wxBitmap& disabled_bitmap = wxNullBitmap); const wxBitmap& disabledBitmap = wxNullBitmap);
size_t GetTabOffset() const; size_t GetTabOffset() const;
void SetTabOffset(size_t offset); void SetTabOffset(size_t offset);
@ -431,9 +428,9 @@ protected:
wxAuiTabArt* m_art; wxAuiTabArt* m_art;
wxAuiNotebookPageArray m_pages; wxAuiNotebookPageArray m_pages;
wxAuiTabContainerButtonArray m_buttons; wxAuiTabContainerButtonArray m_buttons;
wxAuiTabContainerButtonArray m_tab_close_buttons; wxAuiTabContainerButtonArray m_tabCloseButtons;
wxRect m_rect; wxRect m_rect;
size_t m_tab_offset; size_t m_tabOffset;
unsigned int m_flags; unsigned int m_flags;
}; };
@ -452,7 +449,7 @@ public:
~wxAuiTabCtrl(); ~wxAuiTabCtrl();
bool IsDragging() const { return m_is_dragging; } bool IsDragging() const { return m_isDragging; }
protected: protected:
// choose the default border for this window // choose the default border for this window
@ -478,11 +475,11 @@ protected:
protected: protected:
wxPoint m_click_pt; wxPoint m_clickPt;
wxWindow* m_click_tab; wxWindow* m_clickTab;
bool m_is_dragging; bool m_isDragging;
wxAuiTabContainerButton* m_hover_button; wxAuiTabContainerButton* m_hoverButton;
wxAuiTabContainerButton* m_pressed_button; wxAuiTabContainerButton* m_pressedButton;
#ifndef SWIG #ifndef SWIG
DECLARE_CLASS(wxAuiTabCtrl) DECLARE_CLASS(wxAuiTabCtrl)
@ -493,18 +490,22 @@ protected:
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxBookCtrlBase>
{ {
public: public:
wxAuiNotebook(); wxAuiNotebook() { Init(); }
wxAuiNotebook(wxWindow* parent, wxAuiNotebook(wxWindow* parent,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,
long style = wxAUI_NB_DEFAULT_STYLE); long style = wxAUI_NB_DEFAULT_STYLE)
{
Init();
Create(parent, id, pos, size, style);
}
virtual ~wxAuiNotebook(); virtual ~wxAuiNotebook();
@ -526,7 +527,7 @@ public:
bool select = false, bool select = false,
const wxBitmap& bitmap = wxNullBitmap); const wxBitmap& bitmap = wxNullBitmap);
bool InsertPage(size_t page_idx, bool InsertPage(size_t pageIdx,
wxWindow* page, wxWindow* page,
const wxString& caption, const wxString& caption,
bool select = false, bool select = false,
@ -536,16 +537,16 @@ public:
bool RemovePage(size_t page); bool RemovePage(size_t page);
size_t GetPageCount() const; size_t GetPageCount() const;
wxWindow* GetPage(size_t page_idx) const; wxWindow* GetPage(size_t pageIdx) const;
int GetPageIndex(wxWindow* page_wnd) const; int GetPageIndex(wxWindow* pageWnd) const;
bool SetPageText(size_t page, const wxString& text); bool SetPageText(size_t page, const wxString& text);
wxString GetPageText(size_t page_idx) const; wxString GetPageText(size_t pageIdx) const;
bool SetPageBitmap(size_t page, const wxBitmap& bitmap); bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
wxBitmap GetPageBitmap(size_t page_idx) const; wxBitmap GetPageBitmap(size_t pageIdx) const;
size_t SetSelection(size_t new_page); int SetSelection(size_t newPage);
int GetSelection() const; int GetSelection() const;
virtual void Split(size_t page, int direction); virtual void Split(size_t page, int direction);
@ -585,7 +586,28 @@ public:
// Redo sizing after thawing // Redo sizing after thawing
virtual void Thaw(); virtual void Thaw();
//wxBookCtrlBase functions
virtual void SetPageSize (const wxSize &size);
virtual int HitTest (const wxPoint &pt, long *flags=NULL) const;
virtual int GetPageImage(size_t n) const;
virtual bool SetPageImage(size_t n, int imageId);
wxWindow* GetCurrentPage () const;
virtual int ChangeSelection(size_t n);
virtual bool AddPage(wxWindow *page, const wxString &text, bool select,
int imageId);
virtual bool DeleteAllPages();
virtual bool InsertPage(size_t index, wxWindow *page, const wxString &text,
bool select, int imageId);
protected: protected:
// Common part of all ctors.
void Init();
// 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; }
@ -598,12 +620,18 @@ protected:
virtual int CalculateTabCtrlHeight(); virtual int CalculateTabCtrlHeight();
virtual wxSize CalculateNewSplitSize(); virtual wxSize CalculateNewSplitSize();
// remove the page and return a pointer to it
virtual wxWindow *DoRemovePage(size_t WXUNUSED(page)) { return NULL; }
//A general selection function
virtual int DoModifySelection(size_t n, bool events);
protected: protected:
void DoSizing(); void DoSizing();
void InitNotebook(long style); void InitNotebook(long style);
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt); wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tab_ctrl); wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
wxAuiTabCtrl* GetActiveTabCtrl(); wxAuiTabCtrl* GetActiveTabCtrl();
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx); bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
void RemoveEmptyTabFrames(); void RemoveEmptyTabFrames();
@ -618,6 +646,7 @@ protected:
void OnTabBeginDrag(wxAuiNotebookEvent& evt); void OnTabBeginDrag(wxAuiNotebookEvent& evt);
void OnTabDragMotion(wxAuiNotebookEvent& evt); void OnTabDragMotion(wxAuiNotebookEvent& evt);
void OnTabEndDrag(wxAuiNotebookEvent& evt); void OnTabEndDrag(wxAuiNotebookEvent& evt);
void OnTabCancelDrag(wxAuiNotebookEvent& evt);
void OnTabButton(wxAuiNotebookEvent& evt); void OnTabButton(wxAuiNotebookEvent& evt);
void OnTabMiddleDown(wxAuiNotebookEvent& evt); void OnTabMiddleDown(wxAuiNotebookEvent& evt);
void OnTabMiddleUp(wxAuiNotebookEvent& evt); void OnTabMiddleUp(wxAuiNotebookEvent& evt);
@ -638,26 +667,23 @@ protected:
wxAuiManager m_mgr; wxAuiManager m_mgr;
wxAuiTabContainer m_tabs; wxAuiTabContainer m_tabs;
int m_curpage; int m_curPage;
int m_tab_id_counter; int m_tabIdCounter;
wxWindow* m_dummy_wnd; wxWindow* m_dummyWnd;
wxSize m_requested_bmp_size; wxSize m_requestedBmpSize;
int m_requested_tabctrl_height; int m_requestedTabCtrlHeight;
wxFont m_selected_font; wxFont m_selectedFont;
wxFont m_normal_font; wxFont m_normalFont;
int m_tab_ctrl_height; int m_tabCtrlHeight;
int m_last_drag_x; int m_lastDragX;
unsigned int m_flags; unsigned int m_flags;
#ifndef SWIG #ifndef SWIG
DECLARE_CLASS(wxAuiNotebook) DECLARE_CLASS(wxAuiNotebook)
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
#endif #endif
WX_DECLARE_CONTROL_CONTAINER();
}; };

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: dockart.h 66670 2011-01-12 13:39:36Z VZ $ // RCS-ID: $Id: dockart.h 69590 2011-10-30 14:20:03Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -37,7 +37,7 @@ public:
virtual ~wxAuiDockArt() { } virtual ~wxAuiDockArt() { }
virtual int GetMetric(int id) = 0; virtual int GetMetric(int id) = 0;
virtual void SetMetric(int id, int new_val) = 0; virtual void SetMetric(int id, int newVal) = 0;
virtual void SetFont(int id, const wxFont& font) = 0; virtual void SetFont(int id, const wxFont& font) = 0;
virtual wxFont GetFont(int id) = 0; virtual wxFont GetFont(int id) = 0;
virtual wxColour GetColour(int id) = 0; virtual wxColour GetColour(int id) = 0;
@ -74,7 +74,7 @@ public:
virtual void DrawPaneButton(wxDC& dc, virtual void DrawPaneButton(wxDC& dc,
wxWindow* window, wxWindow* window,
int button, int button,
int button_state, int buttonState,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane) = 0; wxAuiPaneInfo& pane) = 0;
}; };
@ -90,8 +90,8 @@ public:
wxAuiDefaultDockArt(); wxAuiDefaultDockArt();
int GetMetric(int metric_id); int GetMetric(int metricId);
void SetMetric(int metric_id, int new_val); void SetMetric(int metricId, int newVal);
wxColour GetColour(int id); wxColour GetColour(int id);
void SetColour(int id, const wxColor& colour); void SetColour(int id, const wxColor& colour);
void SetFont(int id, const wxFont& font); void SetFont(int id, const wxFont& font);
@ -126,7 +126,7 @@ public:
void DrawPaneButton(wxDC& dc, void DrawPaneButton(wxDC& dc,
wxWindow *window, wxWindow *window,
int button, int button,
int button_state, int buttonState,
const wxRect& rect, const wxRect& rect,
wxAuiPaneInfo& pane); wxAuiPaneInfo& pane);
@ -142,35 +142,35 @@ protected:
protected: protected:
wxPen m_border_pen; wxPen m_borderPen;
wxBrush m_sash_brush; wxBrush m_sashBrush;
wxBrush m_background_brush; wxBrush m_backgroundBrush;
wxBrush m_gripper_brush; wxBrush m_gripperBrush;
wxFont m_caption_font; wxFont m_captionFont;
wxBitmap m_inactive_close_bitmap; wxBitmap m_inactiveCloseBitmap;
wxBitmap m_inactive_pin_bitmap; wxBitmap m_inactivePinBitmap;
wxBitmap m_inactive_maximize_bitmap; wxBitmap m_inactiveMaximizeBitmap;
wxBitmap m_inactive_restore_bitmap; wxBitmap m_inactiveRestoreBitmap;
wxBitmap m_active_close_bitmap; wxBitmap m_activeCloseBitmap;
wxBitmap m_active_pin_bitmap; wxBitmap m_activePinBitmap;
wxBitmap m_active_maximize_bitmap; wxBitmap m_activeMaximizeBitmap;
wxBitmap m_active_restore_bitmap; wxBitmap m_activeRestoreBitmap;
wxPen m_gripper_pen1; wxPen m_gripperPen1;
wxPen m_gripper_pen2; wxPen m_gripperPen2;
wxPen m_gripper_pen3; wxPen m_gripperPen3;
wxColour m_base_colour; wxColour m_baseColour;
wxColour m_active_caption_colour; wxColour m_activeCaptionColour;
wxColour m_active_caption_gradient_colour; wxColour m_activeCaptionGradientColour;
wxColour m_active_caption_text_colour; wxColour m_activeCaptionTextColour;
wxColour m_inactive_caption_colour; wxColour m_inactiveCaptionColour;
wxColour m_inactive_caption_gradient_colour; wxColour m_inactiveCaptionGradientColour;
wxColour m_inactive_caption_text_colour; wxColour m_inactiveCaptionTextColour;
int m_border_size; int m_borderSize;
int m_caption_size; int m_captionSize;
int m_sash_size; int m_sashSize;
int m_button_size; int m_buttonSize;
int m_gripper_size; int m_gripperSize;
int m_gradient_type; int m_gradientType;
}; };

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: floatpane.h 61724 2009-08-21 10:41:26Z VZ $ // RCS-ID: $Id: floatpane.h 69590 2011-10-30 14:20:03Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -33,7 +33,7 @@ class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
{ {
public: public:
wxAuiFloatingFrame(wxWindow* parent, wxAuiFloatingFrame(wxWindow* parent,
wxAuiManager* owner_mgr, wxAuiManager* ownerMgr,
const wxAuiPaneInfo& pane, const wxAuiPaneInfo& pane,
wxWindowID id = wxID_ANY, wxWindowID id = wxID_ANY,
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
@ -46,7 +46,7 @@ public:
protected: protected:
virtual void OnMoveStart(); virtual void OnMoveStart();
virtual void OnMoving(const wxRect& window_rect, wxDirection dir); virtual void OnMoving(const wxRect& windowRect, wxDirection dir);
virtual void OnMoveFinished(); virtual void OnMoveFinished();
private: private:
@ -58,16 +58,16 @@ private:
static bool isMouseDown(); static bool isMouseDown();
private: private:
wxWindow* m_pane_window; // pane window being managed wxWindow* m_paneWindow; // pane window being managed
bool m_solid_drag; // true if system uses solid window drag bool m_solidDrag; // true if system uses solid window drag
bool m_moving; bool m_moving;
wxRect m_last_rect; wxRect m_lastRect;
wxRect m_last2_rect; wxRect m_last2Rect;
wxRect m_last3_rect; wxRect m_last3Rect;
wxSize m_last_size; wxSize m_lastSize;
wxDirection m_lastDirection; wxDirection m_lastDirection;
wxWeakRef<wxAuiManager> m_owner_mgr; wxWeakRef<wxAuiManager> m_ownerMgr;
wxAuiManager m_mgr; wxAuiManager m_mgr;
#ifndef SWIG #ifndef SWIG

View File

@ -4,7 +4,7 @@
// Author: Benjamin I. Williams // Author: Benjamin I. Williams
// Modified by: // Modified by:
// Created: 2005-05-17 // Created: 2005-05-17
// RCS-ID: $Id: framemanager.h 66673 2011-01-12 18:04:39Z PC $ // RCS-ID: $Id: framemanager.h 70807 2012-03-04 20:31:34Z VZ $
// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
// Licence: wxWindows Library Licence, Version 3.1 // Licence: wxWindows Library Licence, Version 3.1
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -458,7 +458,7 @@ class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
public: public:
wxAuiManager(wxWindow* managed_wnd = NULL, wxAuiManager(wxWindow* managedWnd = NULL,
unsigned int flags = wxAUI_MGR_DEFAULT); unsigned int flags = wxAUI_MGR_DEFAULT);
virtual ~wxAuiManager(); virtual ~wxAuiManager();
void UnInit(); void UnInit();
@ -466,12 +466,12 @@ public:
void SetFlags(unsigned int flags); void SetFlags(unsigned int flags);
unsigned int GetFlags() const; unsigned int GetFlags() const;
void SetManagedWindow(wxWindow* managed_wnd); void SetManagedWindow(wxWindow* managedWnd);
wxWindow* GetManagedWindow() const; wxWindow* GetManagedWindow() const;
static wxAuiManager* GetManager(wxWindow* window); static wxAuiManager* GetManager(wxWindow* window);
void SetArtProvider(wxAuiDockArt* art_provider); void SetArtProvider(wxAuiDockArt* artProvider);
wxAuiDockArt* GetArtProvider() const; wxAuiDockArt* GetArtProvider() const;
wxAuiPaneInfo& GetPane(wxWindow* window); wxAuiPaneInfo& GetPane(wxWindow* window);
@ -479,35 +479,35 @@ public:
wxAuiPaneInfoArray& GetAllPanes(); wxAuiPaneInfoArray& GetAllPanes();
bool AddPane(wxWindow* window, bool AddPane(wxWindow* window,
const wxAuiPaneInfo& pane_info); const wxAuiPaneInfo& paneInfo);
bool AddPane(wxWindow* window, bool AddPane(wxWindow* window,
const wxAuiPaneInfo& pane_info, const wxAuiPaneInfo& paneInfo,
const wxPoint& drop_pos); const wxPoint& dropPos);
bool AddPane(wxWindow* window, bool AddPane(wxWindow* window,
int direction = wxLEFT, int direction = wxLEFT,
const wxString& caption = wxEmptyString); const wxString& caption = wxEmptyString);
bool InsertPane(wxWindow* window, bool InsertPane(wxWindow* window,
const wxAuiPaneInfo& insert_location, const wxAuiPaneInfo& insertLocation,
int insert_level = wxAUI_INSERT_PANE); int insertLevel = wxAUI_INSERT_PANE);
bool DetachPane(wxWindow* window); bool DetachPane(wxWindow* window);
void Update(); void Update();
wxString SavePaneInfo(wxAuiPaneInfo& pane); wxString SavePaneInfo(wxAuiPaneInfo& pane);
void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane); void LoadPaneInfo(wxString panePart, wxAuiPaneInfo &pane);
wxString SavePerspective(); wxString SavePerspective();
bool LoadPerspective(const wxString& perspective, bool update = true); bool LoadPerspective(const wxString& perspective, bool update = true);
void SetDockSizeConstraint(double width_pct, double height_pct); void SetDockSizeConstraint(double widthPct, double heightPct);
void GetDockSizeConstraint(double* width_pct, double* height_pct) const; void GetDockSizeConstraint(double* widthPct, double* heightPct) const;
void ClosePane(wxAuiPaneInfo& pane_info); void ClosePane(wxAuiPaneInfo& paneInfo);
void MaximizePane(wxAuiPaneInfo& pane_info); void MaximizePane(wxAuiPaneInfo& paneInfo);
void RestorePane(wxAuiPaneInfo& pane_info); void RestorePane(wxAuiPaneInfo& paneInfo);
void RestoreMaximizedPane(); void RestoreMaximizedPane();
public: public:
@ -516,16 +516,16 @@ public:
virtual bool CanDockPanel(const wxAuiPaneInfo & p); virtual bool CanDockPanel(const wxAuiPaneInfo & p);
void StartPaneDrag( void StartPaneDrag(
wxWindow* pane_window, wxWindow* paneWindow,
const wxPoint& offset); const wxPoint& offset);
wxRect CalculateHintRect( wxRect CalculateHintRect(
wxWindow* pane_window, wxWindow* paneWindow,
const wxPoint& pt, const wxPoint& pt,
const wxPoint& offset); const wxPoint& offset);
void DrawHintRect( void DrawHintRect(
wxWindow* pane_window, wxWindow* paneWindow,
const wxPoint& pt, const wxPoint& pt,
const wxPoint& offset); const wxPoint& offset);
@ -552,26 +552,26 @@ protected:
wxAuiDockInfo& dock, wxAuiDockInfo& dock,
wxAuiPaneInfo& pane, wxAuiPaneInfo& pane,
wxAuiDockUIPartArray& uiparts, wxAuiDockUIPartArray& uiparts,
bool spacer_only); bool spacerOnly);
void LayoutAddDock(wxSizer* container, void LayoutAddDock(wxSizer* container,
wxAuiDockInfo& dock, wxAuiDockInfo& dock,
wxAuiDockUIPartArray& uiparts, wxAuiDockUIPartArray& uiParts,
bool spacer_only); bool spacerOnly);
wxSizer* LayoutAll(wxAuiPaneInfoArray& panes, wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
wxAuiDockInfoArray& docks, wxAuiDockInfoArray& docks,
wxAuiDockUIPartArray& uiparts, wxAuiDockUIPartArray & uiParts,
bool spacer_only = false); bool spacerOnly = false);
virtual bool ProcessDockResult(wxAuiPaneInfo& target, virtual bool ProcessDockResult(wxAuiPaneInfo& target,
const wxAuiPaneInfo& new_pos); const wxAuiPaneInfo& newPos);
bool DoDrop(wxAuiDockInfoArray& docks, bool DoDrop(wxAuiDockInfoArray& docks,
wxAuiPaneInfoArray& panes, wxAuiPaneInfoArray& panes,
wxAuiPaneInfo& drop, wxAuiPaneInfo& drop,
const wxPoint& pt, const wxPoint& pt,
const wxPoint& action_offset = wxPoint(0,0)); const wxPoint& actionOffset = wxPoint(0,0));
wxAuiDockUIPart* HitTest(int x, int y); wxAuiDockUIPart* HitTest(int x, int y);
wxAuiDockUIPart* GetPanePart(wxWindow* pane); wxAuiDockUIPart* GetPanePart(wxWindow* pane);
@ -585,7 +585,7 @@ protected:
void Render(wxDC* dc); void Render(wxDC* dc);
void Repaint(wxDC* dc = NULL); void Repaint(wxDC* dc = NULL);
void ProcessMgrEvent(wxAuiManagerEvent& event); void ProcessMgrEvent(wxAuiManagerEvent& event);
void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part, void UpdateButtonOnScreen(wxAuiDockUIPart* buttonUiPart,
const wxMouseEvent& event); const wxMouseEvent& event);
void GetPanePositionsAndSizes(wxAuiDockInfo& dock, void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
wxArrayInt& positions, wxArrayInt& positions,
@ -594,6 +594,8 @@ protected:
/// Ends a resize action, or for live update, resizes the sash /// Ends a resize action, or for live update, resizes the sash
bool DoEndResizeAction(wxMouseEvent& event); bool DoEndResizeAction(wxMouseEvent& event);
void SetActivePane(wxWindow* active_pane);
public: public:
// public events (which can be invoked externally) // public events (which can be invoked externally)
@ -636,29 +638,29 @@ protected:
wxAuiPaneInfoArray m_panes; // array of panes structures wxAuiPaneInfoArray m_panes; // array of panes structures
wxAuiDockInfoArray m_docks; // array of docks structures wxAuiDockInfoArray m_docks; // array of docks structures
wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc) wxAuiDockUIPartArray m_uiParts; // array of UI parts (captions, buttons, etc)
int m_action; // current mouse action int m_action; // current mouse action
wxPoint m_action_start; // position where the action click started wxPoint m_actionStart; // position where the action click started
wxPoint m_action_offset; // offset from upper left of the item clicked wxPoint m_actionOffset; // offset from upper left of the item clicked
wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to wxAuiDockUIPart* m_actionPart; // ptr to the part the action happened to
wxWindow* m_action_window; // action frame or window (NULL if none) wxWindow* m_actionWindow; // action frame or window (NULL if none)
wxRect m_action_hintrect; // hint rectangle for the action wxRect m_actionHintRect; // hint rectangle for the action
wxRect m_last_rect; wxRect m_lastRect;
wxAuiDockUIPart* m_hover_button;// button uipart being hovered over wxAuiDockUIPart* m_hoverButton;// button uipart being hovered over
wxRect m_last_hint; // last hint rectangle wxRect m_lastHint; // last hint rectangle
wxPoint m_last_mouse_move; // last mouse move position (see OnMotion) wxPoint m_lastMouseMove; // last mouse move position (see OnMotion)
int m_currentDragItem; int m_currentDragItem;
bool m_skipping; bool m_skipping;
bool m_has_maximized; bool m_hasMaximized;
double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume double m_dockConstraintX; // 0.0 .. 1.0; max pct of window width a dock can consume
double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume double m_dockConstraintY; // 0.0 .. 1.0; max pct of window height a dock can consume
wxFrame* m_hint_wnd; // transparent hint window, if supported by platform wxFrame* m_hintWnd; // transparent hint window, if supported by platform
wxTimer m_hint_fadetimer; // transparent fade timer wxTimer m_hintFadeTimer; // transparent fade timer
wxByte m_hint_fadeamt; // transparent fade amount wxByte m_hintFadeAmt; // transparent fade amount
wxByte m_hint_fademax; // maximum value of hint fade wxByte m_hintFadeMax; // maximum value of hint fade
void* m_reserved; void* m_reserved;
@ -839,6 +841,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, wxAuiManagerEv
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, wxAuiManagerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, wxAuiManagerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, wxAuiManagerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, wxAuiManagerEvent );
wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, wxAuiManagerEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, wxAuiManagerEvent );
@ -855,6 +858,8 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func)) wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANE_RESTORE(func) \ #define EVT_AUI_PANE_RESTORE(func) \
wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func)) wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func))
#define EVT_AUI_PANE_ACTIVATED(func) \
wx__DECLARE_EVT0(wxEVT_AUI_PANE_ACTIVATED, wxAuiManagerEventHandler(func))
#define EVT_AUI_RENDER(func) \ #define EVT_AUI_RENDER(func) \
wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func)) wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
#define EVT_AUI_FIND_MANAGER(func) \ #define EVT_AUI_FIND_MANAGER(func) \
@ -866,6 +871,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
%constant wxEventType wxEVT_AUI_PANE_CLOSE; %constant wxEventType wxEVT_AUI_PANE_CLOSE;
%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE; %constant wxEventType wxEVT_AUI_PANE_MAXIMIZE;
%constant wxEventType wxEVT_AUI_PANE_RESTORE; %constant wxEventType wxEVT_AUI_PANE_RESTORE;
%constant wxEventType wxEVT_AUI_PANE_ACTIVATED;
%constant wxEventType wxEVT_AUI_RENDER; %constant wxEventType wxEVT_AUI_RENDER;
%constant wxEventType wxEVT_AUI_FIND_MANAGER; %constant wxEventType wxEVT_AUI_FIND_MANAGER;
@ -874,6 +880,7 @@ typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE ) EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE )
EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE ) EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE )
EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE ) EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE )
EVT_AUI_PANE_ACTIVATED = wx.PyEventBinder( wxEVT_AUI_PANE_ACTIVATED )
EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER ) EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER ) EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER )
} }

View File

@ -4,7 +4,7 @@
// Author: Hans Van Leemputten // Author: Hans Van Leemputten
// Modified by: Benjamin I. Williams / Kirix Corporation // Modified by: Benjamin I. Williams / Kirix Corporation
// Created: 29/07/2002 // Created: 29/07/2002
// RCS-ID: $Id: tabmdi.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: tabmdi.h 70909 2012-03-15 13:49:54Z VZ $
// Copyright: (c) Hans Van Leemputten // Copyright: (c) Hans Van Leemputten
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -101,6 +101,7 @@ protected:
void AddWindowMenu(wxMenuBar *pMenuBar); void AddWindowMenu(wxMenuBar *pMenuBar);
void DoHandleMenu(wxCommandEvent &event); void DoHandleMenu(wxCommandEvent &event);
void DoHandleUpdateUI(wxUpdateUIEvent &event);
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
virtual bool ProcessEvent(wxEvent& event); virtual bool ProcessEvent(wxEvent& event);
@ -138,7 +139,7 @@ public:
const wxString& name = wxFrameNameStr); const wxString& name = wxFrameNameStr);
#if wxUSE_MENUS #if wxUSE_MENUS
virtual void SetMenuBar(wxMenuBar *menu_bar); virtual void SetMenuBar(wxMenuBar *menuBar);
virtual wxMenuBar *GetMenuBar() const; virtual wxMenuBar *GetMenuBar() const;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
@ -199,7 +200,7 @@ public:
protected: protected:
void Init(); void Init();
virtual void DoSetSize(int x, int y, int width, int height, int size_flags); virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
// no size hints // no size hints
@ -215,12 +216,12 @@ public:
protected: protected:
wxAuiMDIParentFrame* m_pMDIParentFrame; wxAuiMDIParentFrame* m_pMDIParentFrame;
wxRect m_mdi_newrect; wxRect m_mdiNewRect;
wxRect m_mdi_currect; wxRect m_mdiCurRect;
wxString m_title; wxString m_title;
wxIcon m_icon; wxIcon m_icon;
wxIconBundle m_icon_bundle; wxIconBundle m_iconBundle;
bool m_activate_on_create; bool m_activateOnCreate;
#if wxUSE_MENUS #if wxUSE_MENUS
wxMenuBar* m_pMenuBar; wxMenuBar* m_pMenuBar;
@ -244,7 +245,6 @@ class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
public: public:
wxAuiMDIClientWindow(); wxAuiMDIClientWindow();
wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0); wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
~wxAuiMDIClientWindow();
virtual bool CreateClient(wxAuiMDIParentFrame *parent, virtual bool CreateClient(wxAuiMDIParentFrame *parent,
long style = wxVSCROLL | wxHSCROLL); long style = wxVSCROLL | wxHSCROLL);
@ -253,7 +253,7 @@ public:
protected: protected:
void PageChanged(int old_selection, int new_selection); void PageChanged(int oldSelection, int newSelection);
void OnPageClose(wxAuiNotebookEvent& evt); void OnPageClose(wxAuiNotebookEvent& evt);
void OnPageChanged(wxAuiNotebookEvent& evt); void OnPageChanged(wxAuiNotebookEvent& evt);
void OnSize(wxSizeEvent& evt); void OnSize(wxSizeEvent& evt);

View File

@ -0,0 +1,145 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/bannerwindow.h
// Purpose: wxBannerWindow class declaration
// Author: Vadim Zeitlin
// Created: 2011-08-16
// RCS-ID: $Id: bannerwindow.h 69859 2011-11-28 18:58:52Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_BANNERWINDOW_H_
#define _WX_BANNERWINDOW_H_
#include "wx/defs.h"
#if wxUSE_BANNERWINDOW
#include "wx/bitmap.h"
#include "wx/event.h"
#include "wx/window.h"
class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxColour;
class WXDLLIMPEXP_FWD_CORE wxDC;
extern WXDLLIMPEXP_DATA_ADV(const char) wxBannerWindowNameStr[];
// ----------------------------------------------------------------------------
// A simple banner window showing either a bitmap or text.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxBannerWindow : public wxWindow
{
public:
// Default constructor, use Create() later.
wxBannerWindow() { Init(); }
// Convenient constructor that should be used in the majority of cases.
//
// The banner orientation changes how the text in it is displayed and also
// defines where is the bitmap truncated if it's too big to fit but doesn't
// do anything for the banner position, this is supposed to be taken care
// of in the usual way, e.g. using sizers.
wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT)
{
Init();
Create(parent, wxID_ANY, dir);
}
// Full constructor provided for consistency with the other classes only.
wxBannerWindow(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr)
{
Init();
Create(parent, winid, dir, pos, size, style, name);
}
// Can be only called on objects created with the default constructor.
bool Create(wxWindow* parent,
wxWindowID winid,
wxDirection dir = wxLEFT,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxBannerWindowNameStr);
// Provide an existing bitmap to show. For wxLEFT orientation the bitmap is
// truncated from the top, for wxTOP and wxBOTTOM -- from the right and for
// wxRIGHT -- from the bottom, so put the most important part of the bitmap
// information in the opposite direction.
void SetBitmap(const wxBitmap& bmp);
// Set the text to display. This is mutually exclusive with SetBitmap().
// Title is rendered in bold and should be single line, message can have
// multiple lines but is not wrapped automatically.
void SetText(const wxString& title, const wxString& message);
// Set the colours between which the gradient runs. This can be combined
// with SetText() but not SetBitmap().
void SetGradient(const wxColour& start, const wxColour& end);
protected:
virtual wxSize DoGetBestClientSize() const;
private:
// Common part of all constructors.
void Init();
// Fully invalidates the window.
void OnSize(wxSizeEvent& event);
// Redraws the window using either m_bitmap or m_title/m_message.
void OnPaint(wxPaintEvent& event);
// Helper of OnPaint(): draw the bitmap at the correct position depending
// on our orientation.
void DrawBitmapBackground(wxDC& dc);
// Helper of OnPaint(): draw the text in the appropriate direction.
void DrawBannerTextLine(wxDC& dc, const wxString& str, const wxPoint& pos);
// Return the font to use for the title. Currently this is hardcoded as a
// larger bold version of the standard window font but could be made
// configurable in the future.
wxFont GetTitleFont() const;
// Return the colour to use for extending the bitmap. Non-const as it
// updates m_colBitmapBg if needed.
wxColour GetBitmapBg();
// The window side along which the banner is laid out.
wxDirection m_direction;
// If valid, this bitmap is drawn as is.
wxBitmap m_bitmap;
// If bitmap is valid, this is the colour we use to extend it if the bitmap
// is smaller than this window. It is computed on demand by GetBitmapBg().
wxColour m_colBitmapBg;
// The title and main message to draw, used if m_bitmap is invalid.
wxString m_title,
m_message;
// Start and stop gradient colours, only used when drawing text.
wxColour m_colStart,
m_colEnd;
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxBannerWindow);
};
#endif // wxUSE_BANNERWINDOW
#endif // _WX_BANNERWINDOW_H_

View File

@ -4,7 +4,7 @@
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Modified by: // Modified by:
// Created: 22.04.01 // Created: 22.04.01
// RCS-ID: $Id: bitmap.h 66086 2010-11-10 13:51:51Z VZ $ // RCS-ID: $Id: bitmap.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -68,8 +68,7 @@ protected:
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0; virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
}; };
#if defined(__WXMGL__) || \ #if defined(__WXDFB__) || \
defined(__WXDFB__) || \
defined(__WXMAC__) || \ defined(__WXMAC__) || \
defined(__WXGTK__) || \ defined(__WXGTK__) || \
defined(__WXCOCOA__) || \ defined(__WXCOCOA__) || \
@ -84,9 +83,9 @@ protected:
#define wxBITMAP_SCREEN_DEPTH (-1) #define wxBITMAP_SCREEN_DEPTH (-1)
// All ports except wxMSW,wxOS2,wxPalmOS use wxBitmapHandler and wxBitmapBase as base class // All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as
// for wxBitmapHandler; wxMSW,wxOS2,wxPalmOS use wxGDIImageHandler as base class // base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as
// since it allows some code reuse there. // base class since it allows some code reuse there.
#if wxUSE_BITMAP_BASE #if wxUSE_BITMAP_BASE
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -237,10 +236,7 @@ protected:
// the wxBITMAP_DEFAULT_TYPE constant defines the default argument value // the wxBITMAP_DEFAULT_TYPE constant defines the default argument value
// for wxBitmap's ctor and wxBitmap::LoadFile() functions. // for wxBitmap's ctor and wxBitmap::LoadFile() functions.
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/palmos/bitmap.h"
#elif defined(__WXMSW__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/msw/bitmap.h" #include "wx/msw/bitmap.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
@ -255,11 +251,8 @@ protected:
#elif defined(__WXX11__) #elif defined(__WXX11__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/bitmap.h" #include "wx/x11/bitmap.h"
#elif defined(__WXMGL__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_RESOURCE
#include "wx/mgl/bitmap.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_RESOURCE #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE
#include "wx/dfb/bitmap.h" #include "wx/dfb/bitmap.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_PICT_RESOURCE #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_PICT_RESOURCE
@ -287,7 +280,7 @@ ConvertToDisabled(unsigned char brightness) const
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE
// we must include generic mask.h after wxBitmap definition // we must include generic mask.h after wxBitmap definition
#if defined(__WXMGL__) || defined(__WXDFB__) #if defined(__WXDFB__)
#define wxUSE_GENERIC_MASK 1 #define wxUSE_GENERIC_MASK 1
#else #else
#define wxUSE_GENERIC_MASK 0 #define wxUSE_GENERIC_MASK 0

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 25.08.00 // Created: 25.08.00
// RCS-ID: $Id: bmpbuttn.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: bmpbuttn.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin // Copyright: (c) 2000 Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -130,8 +130,6 @@ protected:
#include "wx/cocoa/bmpbuttn.h" #include "wx/cocoa/bmpbuttn.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/bmpbuttn.h" #include "wx/os2/bmpbuttn.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/bmpbuttn.h"
#endif #endif
#endif // wxUSE_BMPBUTTON #endif // wxUSE_BMPBUTTON

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.08.03 // Created: 19.08.03
// RCS-ID: $Id: bookctrl.h 65967 2010-10-31 13:33:34Z VZ $ // RCS-ID: $Id: bookctrl.h 69082 2011-09-14 08:24:06Z SJL $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -22,6 +22,7 @@
#include "wx/control.h" #include "wx/control.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/withimages.h"
WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages); WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
@ -54,7 +55,8 @@ enum
// wxBookCtrlBase // wxBookCtrlBase
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl class WXDLLIMPEXP_CORE wxBookCtrlBase : public wxControl,
public wxWithImages
{ {
public: public:
// construction // construction
@ -85,9 +87,6 @@ public:
long style = 0, long style = 0,
const wxString& name = wxEmptyString); const wxString& name = wxEmptyString);
// dtor
virtual ~wxBookCtrlBase();
// accessors // accessors
// --------- // ---------
@ -106,7 +105,7 @@ public:
} }
// get the currently selected page or wxNOT_FOUND if none // get the currently selected page or wxNOT_FOUND if none
int GetSelection() const { return m_selection; } virtual int GetSelection() const { return m_selection; }
// set/get the title of a page // set/get the title of a page
virtual bool SetPageText(size_t n, const wxString& strText) = 0; virtual bool SetPageText(size_t n, const wxString& strText) = 0;
@ -117,15 +116,6 @@ public:
// images belong to the same image list) // images belong to the same image list)
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// sets the image list to use, it is *not* deleted by the control
virtual void SetImageList(wxImageList *imageList);
// as SetImageList() but we will delete the image list ourselves
void AssignImageList(wxImageList *imageList);
// get pointer (may be NULL) to the associated image list
wxImageList* GetImageList() const { return m_imageList; }
// sets/returns item's image index in the current image list // sets/returns item's image index in the current image list
virtual int GetPageImage(size_t n) const = 0; virtual int GetPageImage(size_t n) const = 0;
virtual bool SetPageImage(size_t n, int imageId) = 0; virtual bool SetPageImage(size_t n, int imageId) = 0;
@ -191,7 +181,7 @@ public:
virtual bool AddPage(wxWindow *page, virtual bool AddPage(wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1) int imageId = NO_IMAGE)
{ {
DoInvalidateBestSize(); DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId); return InsertPage(GetPageCount(), page, text, bSelect, imageId);
@ -202,7 +192,7 @@ public:
wxWindow *page, wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1) = 0; int imageId = NO_IMAGE) = 0;
// set the currently selected page, return the index of the previously // set the currently selected page, return the index of the previously
// selected one (or wxNOT_FOUND on error) // selected one (or wxNOT_FOUND on error)
@ -320,12 +310,6 @@ protected:
// the array of all pages of this control // the array of all pages of this control
wxArrayPages m_pages; wxArrayPages m_pages;
// the associated image list or NULL
wxImageList *m_imageList;
// true if we must delete m_imageList
bool m_ownsImageList;
// get the page area // get the page area
virtual wxRect GetPageRect() const; virtual wxRect GetPageRect() const;

View File

@ -4,7 +4,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: // Created:
// RCS-ID: $Id: brush.h 66054 2010-11-07 13:16:20Z VZ $ // RCS-ID: $Id: brush.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: Julian Smart // Copyright: Julian Smart
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -70,9 +70,7 @@ public:
} }
}; };
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#include "wx/palmos/brush.h"
#elif defined(__WXMSW__)
#include "wx/msw/brush.h" #include "wx/msw/brush.h"
#elif defined(__WXMOTIF__) || defined(__WXX11__) #elif defined(__WXMOTIF__) || defined(__WXX11__)
#include "wx/x11/brush.h" #include "wx/x11/brush.h"
@ -80,8 +78,6 @@ public:
#include "wx/gtk/brush.h" #include "wx/gtk/brush.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/brush.h" #include "wx/gtk1/brush.h"
#elif defined(__WXMGL__)
#include "wx/mgl/brush.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/dfb/brush.h" #include "wx/dfb/brush.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 12.04.99 // Created: 12.04.99
// RCS-ID: $Id: buffer.h 66780 2011-01-27 11:00:26Z SC $ // RCS-ID: $Id: buffer.h 70417 2012-01-20 22:11:51Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -15,9 +15,7 @@
#include "wx/chartype.h" #include "wx/chartype.h"
#include "wx/wxcrtbase.h" #include "wx/wxcrtbase.h"
#ifndef __WXPALMOS5__
#include <stdlib.h> // malloc() and free() #include <stdlib.h> // malloc() and free()
#endif // ! __WXPALMOS5__
class WXDLLIMPEXP_FWD_BASE wxCStrData; class WXDLLIMPEXP_FWD_BASE wxCStrData;
@ -314,6 +312,10 @@ public:
if ( !str ) if ( !str )
return false; return false;
// For consistency with the ctor taking just the length, NUL-terminate
// the buffer.
str[len] = (CharType)0;
if ( this->m_data == this->GetNullData() ) if ( this->m_data == this->GetNullData() )
{ {
this->m_data = new Data(str, len); this->m_data = new Data(str, len);
@ -537,6 +539,8 @@ public:
size_t GetBufSize() const { return m_bufdata->m_size; } size_t GetBufSize() const { return m_bufdata->m_size; }
size_t GetDataLen() const { return m_bufdata->m_len; } size_t GetDataLen() const { return m_bufdata->m_len; }
bool IsEmpty() const { return GetDataLen() == 0; }
void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); } void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
void SetDataLen(size_t len) void SetDataLen(size_t len)
{ {
@ -544,6 +548,8 @@ public:
m_bufdata->m_len = len; m_bufdata->m_len = len;
} }
void Clear() { SetDataLen(0); }
// Ensure the buffer is big enough and return a pointer to it // Ensure the buffer is big enough and return a pointer to it
void *GetWriteBuf(size_t sizeNeeded) void *GetWriteBuf(size_t sizeNeeded)
{ {

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin, Vaclav Slavik // Author: Vadim Zeitlin, Vaclav Slavik
// Modified by: // Modified by:
// Created: 07.05.02 // Created: 07.05.02
// RCS-ID: $Id: build.h 64531 2010-06-09 13:23:13Z FM $ // RCS-ID: $Id: build.h 67343 2011-03-30 14:16:04Z VZ $
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -85,7 +85,7 @@
#endif #endif
// deriving wxWin containers from STL ones changes them completely: // deriving wxWin containers from STL ones changes them completely:
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
#define __WX_BO_STL ",STL containers" #define __WX_BO_STL ",STL containers"
#else #else
#define __WX_BO_STL ",wx containers" #define __WX_BO_STL ",wx containers"

View File

@ -4,7 +4,7 @@
// Author: Vadim Zetlin // Author: Vadim Zetlin
// Modified by: // Modified by:
// Created: 15.08.00 // Created: 15.08.00
// RCS-ID: $Id: button.h 65680 2010-09-30 11:44:45Z VZ $ // RCS-ID: $Id: button.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zetlin // Copyright: (c) Vadim Zetlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -14,44 +14,9 @@
#include "wx/defs.h" #include "wx/defs.h"
// ----------------------------------------------------------------------------
// wxButton flags shared with other classes
// ----------------------------------------------------------------------------
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
// These flags affect label alignment
#define wxBU_LEFT 0x0040
#define wxBU_TOP 0x0080
#define wxBU_RIGHT 0x0100
#define wxBU_BOTTOM 0x0200
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
#endif
#if wxUSE_BUTTON #if wxUSE_BUTTON
// ---------------------------------------------------------------------------- #include "wx/anybutton.h"
// wxButton specific flags
// ----------------------------------------------------------------------------
// These two flags are obsolete
#define wxBU_NOAUTODRAW 0x0000
#define wxBU_AUTODRAW 0x0004
// by default, the buttons will be created with some (system dependent)
// minimal size to make them look nicer, giving this style will make them as
// small as possible
#define wxBU_EXACTFIT 0x0001
// this flag can be used to disable using the text label in the button: it is
// mostly useful when creating buttons showing bitmap and having stock id as
// without it both the standard label corresponding to the stock id and the
// bitmap would be shown
#define wxBU_NOTEXT 0x0002
#include "wx/bitmap.h"
#include "wx/control.h"
extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
@ -59,7 +24,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
// wxButton: a push button // wxButton: a push button
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxButtonBase : public wxControl class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
{ {
public: public:
wxButtonBase() { } wxButtonBase() { }
@ -70,132 +35,15 @@ public:
void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); } void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
bool GetAuthNeeded() const { return DoGetAuthNeeded(); } bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
// show the image in the button in addition to the label: this method is
// supported on all (major) platforms
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
{
SetBitmapLabel(bitmap);
SetBitmapPosition(dir);
}
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
// Methods for setting individual images for different states: normal,
// selected (meaning pushed or pressed), focused (meaning normal state for
// a focused button), disabled or hover (a.k.a. hot or current).
//
// Remember that SetBitmap() itself must be called before any other
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
// for it anyhow) and that all bitmaps passed to these functions should be
// of the same size.
void SetBitmapLabel(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Normal); }
void SetBitmapPressed(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Pressed); }
void SetBitmapDisabled(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Disabled); }
void SetBitmapCurrent(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Current); }
void SetBitmapFocus(const wxBitmap& bitmap)
{ DoSetBitmap(bitmap, State_Focused); }
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
// set the margins around the image
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
// set the image position relative to the text, i.e. wxLEFT means that the
// image is to the left of the text (this is the default)
void SetBitmapPosition(wxDirection dir);
// make this button the default button in its top level window // make this button the default button in its top level window
// //
// returns the old default item (possibly NULL) // returns the old default item (possibly NULL)
virtual wxWindow *SetDefault(); virtual wxWindow *SetDefault();
// Buttons on MSW can look bad if they are not native colours, because
// then they become owner-drawn and not theme-drawn. Disable it here
// in wxButtonBase to make it consistent.
virtual bool ShouldInheritColours() const { return false; }
// returns the default button size for this platform // returns the default button size for this platform
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
#if WXWIN_COMPATIBILITY_2_8
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
#endif // WXWIN_COMPATIBILITY_2_8
// backwards compatible names for pressed/current bitmaps: they're not
// deprecated as there is nothing really wrong with using them and no real
// advantage to using the new names but the new names are still preferred
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
// this enum is not part of wx public API, it is public because it is used
// in non wxButton-derived classes internally
//
// also notice that MSW code relies on the values of the enum elements, do
// not change them without revising src/msw/button.cpp
enum State
{
State_Normal,
State_Current, // a.k.a. hot or "hovering"
State_Pressed, // a.k.a. "selected" in public API for some reason
State_Disabled,
State_Focused,
State_Max
};
// return true if this button shouldn't show the text label, either because
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
bool DontShowLabel() const
{
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
}
// return true if we do show the label
bool ShowsLabel() const
{
return !DontShowLabel();
}
protected: protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual bool DoGetAuthNeeded() const { return false; }
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
{ return wxBitmap(); }
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
State WXUNUSED(which))
{ }
virtual wxSize DoGetBitmapMargins() const
{ return wxSize(0, 0); }
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
{ }
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
{ }
wxDECLARE_NO_COPY_CLASS(wxButtonBase); wxDECLARE_NO_COPY_CLASS(wxButtonBase);
}; };
@ -215,11 +63,8 @@ protected:
#include "wx/cocoa/button.h" #include "wx/cocoa/button.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/button.h" #include "wx/os2/button.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/button.h"
#endif #endif
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
#endif #endif // _WX_BUTTON_H_BASE_
// _WX_BUTTON_H_BASE_

View File

@ -3,7 +3,7 @@
// Purpose: Cairo library // Purpose: Cairo library
// Author: Anthony Bretaudeau // Author: Anthony Bretaudeau
// Created: 2007-08-25 // Created: 2007-08-25
// RCS-ID: $Id: cairo.h 67232 2011-03-18 15:10:15Z DS $ // RCS-ID: $Id: cairo.h 68935 2011-08-27 23:26:53Z RD $
// Copyright: (c) Anthony Bretaudeau // Copyright: (c) Anthony Bretaudeau
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -16,129 +16,13 @@
#include "wx/dynlib.h" #include "wx/dynlib.h"
#include <cairo.h> #include <cairo.h>
extern "C"
class wxCairoLibrary
{ {
public:
// return the pointer to the global instance of this class or NULL if we bool wxCairoInit();
// failed to load/initialize it void wxCairoCleanUp();
static wxCairoLibrary *Get();
}
// for internal use only
static void CleanUp();
private:
// the single wxCairoLibrary instance or NULL
static wxCairoLibrary *ms_lib;
wxCairoLibrary();
~wxCairoLibrary();
bool IsOk();
bool InitializeMethods();
wxDynamicLibrary m_libCairo;
wxDynamicLibrary m_libPangoCairo;
// true if we successfully loaded the libraries and can use them
//
// note that this field must have this name as it's used by wxDL_XXX macros
bool m_ok;
public:
wxDL_VOIDMETHOD_DEFINE( cairo_arc,
(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) )
wxDL_VOIDMETHOD_DEFINE( cairo_arc_negative,
(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2), (cr, xc, yc, radius, angle1, angle2) )
wxDL_VOIDMETHOD_DEFINE( cairo_clip,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_close_path,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_t*, cairo_create,
(cairo_surface_t *target), (target), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_curve_to,
(cairo_t *cr, double x1, double y1, double x2, double y2, double x3, double y3), (cr, x1, y1, x2, y2, x3, y3) )
wxDL_VOIDMETHOD_DEFINE( cairo_destroy,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_fill,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_fill_preserve,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_get_target,
(cairo_t *cr), (cr), NULL)
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_image_surface_create_for_data,
(unsigned char *data, cairo_format_t format, int width, int height, int stride), (data, format, width, height, stride), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_line_to,
(cairo_t *cr, double x, double y), (cr, x, y) )
wxDL_VOIDMETHOD_DEFINE( cairo_move_to,
(cairo_t *cr, double x, double y), (cr, x, y) )
wxDL_VOIDMETHOD_DEFINE( cairo_new_path,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_paint,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_add_color_stop_rgba,
(cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha), (pattern, offset, red, green, blue, alpha) )
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_for_surface,
(cairo_surface_t *surface), (surface), NULL)
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_linear,
(double x0, double y0, double x1, double y1), (x0, y0, x1, y1), NULL)
wxDL_METHOD_DEFINE( cairo_pattern_t*, cairo_pattern_create_radial,
(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1), (cx0, cy0, radius0, cx1, cy1, radius1), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_destroy,
(cairo_pattern_t *pattern), (pattern) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_set_extend,
(cairo_pattern_t *pattern, cairo_extend_t extend), (pattern, extend) )
wxDL_VOIDMETHOD_DEFINE( cairo_pattern_set_filter,
(cairo_pattern_t *pattern, cairo_filter_t filter), (pattern, filter) )
wxDL_VOIDMETHOD_DEFINE( cairo_rectangle,
(cairo_t *cr, double x, double y, double width, double height), (cr, x, y, width, height) )
wxDL_METHOD_DEFINE( cairo_t*, cairo_reference,
(cairo_t *cr), (cr), NULL )
wxDL_VOIDMETHOD_DEFINE( cairo_reset_clip,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_restore,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_rotate,
(cairo_t *cr, double angle), (cr, angle) )
wxDL_VOIDMETHOD_DEFINE( cairo_save,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_scale,
(cairo_t *cr, double sx, double sy), (cr, sx, sy) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_dash,
(cairo_t *cr, const double *dashes, int num_dashes, double offset), (cr, dashes, num_dashes, offset) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_fill_rule,
(cairo_t *cr, cairo_fill_rule_t fill_rule), (cr, fill_rule) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_cap,
(cairo_t *cr, cairo_line_cap_t line_cap), (cr, line_cap) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_join,
(cairo_t *cr, cairo_line_join_t line_join), (cr, line_join) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_line_width,
(cairo_t *cr, double width), (cr, width) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_operator,
(cairo_t *cr, cairo_operator_t op), (cr, op) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_source,
(cairo_t *cr, cairo_pattern_t *source), (cr, source) )
wxDL_VOIDMETHOD_DEFINE( cairo_set_source_rgba,
(cairo_t *cr, double red, double green, double blue, double alpha), (cr, red, green, blue, alpha) )
wxDL_VOIDMETHOD_DEFINE( cairo_stroke,
(cairo_t *cr), (cr) )
wxDL_VOIDMETHOD_DEFINE( cairo_stroke_preserve,
(cairo_t *cr), (cr) )
wxDL_METHOD_DEFINE( cairo_surface_t*, cairo_surface_create_similar,
(cairo_surface_t *other, cairo_content_t content, int width, int height), (other, content, width, height), NULL)
wxDL_VOIDMETHOD_DEFINE( cairo_surface_destroy,
(cairo_surface_t *surface), (surface) )
wxDL_VOIDMETHOD_DEFINE( cairo_translate,
(cairo_t *cr, double tx, double ty), (cr, tx, ty) )
wxDL_VOIDMETHOD_DEFINE( pango_cairo_update_layout,
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
wxDL_VOIDMETHOD_DEFINE( pango_cairo_show_layout,
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
wxDECLARE_NO_COPY_CLASS(wxCairoLibrary);
};
#endif // wxUSE_CAIRO #endif // wxUSE_CAIRO

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 29.12.99 // Created: 29.12.99
// RCS-ID: $Id: calctrl.h 58718 2009-02-07 18:59:25Z VZ $ // RCS-ID: $Id: calctrl.h 67681 2011-05-03 16:29:04Z DS $
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -112,10 +112,10 @@ public:
void SetHoliday(bool holiday) { m_holiday = holiday; } void SetHoliday(bool holiday) { m_holiday = holiday; }
// accessors // accessors
bool HasTextColour() const { return m_colText.Ok(); } bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); } bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasBorderColour() const { return m_colBorder.Ok(); } bool HasBorderColour() const { return m_colBorder.IsOk(); }
bool HasFont() const { return m_font.Ok(); } bool HasFont() const { return m_font.IsOk(); }
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; } bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
bool IsHoliday() const { return m_holiday; } bool IsHoliday() const { return m_holiday; }

View File

@ -4,7 +4,7 @@
* Author: Joel Farley, Ove Kåven * Author: Joel Farley, Ove Kåven
* Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
* Created: 1998/06/12 * Created: 1998/06/12
* RCS-ID: $Id: chartype.h 66968 2011-02-19 13:44:19Z VZ $ * RCS-ID: $Id: chartype.h 70345 2012-01-15 01:05:28Z VZ $
* Copyright: (c) 1998-2006 wxWidgets dev team * Copyright: (c) 1998-2006 wxWidgets dev team
* Licence: wxWindows licence * Licence: wxWindows licence
*/ */
@ -105,8 +105,6 @@
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#elif defined(__DMC__) #elif defined(__DMC__)
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#elif defined(__WXPALMOS__)
#include <stddef.h>
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
#define wxHAVE_TCHAR_SUPPORT #define wxHAVE_TCHAR_SUPPORT
#include <stddef.h> #include <stddef.h>

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07.09.00 // Created: 07.09.00
// RCS-ID: $Id: checkbox.h 65942 2010-10-28 14:23:09Z VZ $ // RCS-ID: $Id: checkbox.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -41,18 +41,6 @@
*/ */
#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000 #define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
/*
* The possible states of a 3-state checkbox (Compatible
* with the 2-state checkbox).
*/
enum wxCheckBoxState
{
wxCHK_UNCHECKED,
wxCHK_CHECKED,
wxCHK_UNDETERMINED /* 3-state checkbox only */
};
extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -196,8 +184,6 @@ private:
#elif defined(__WXPM__) #elif defined(__WXPM__)
#undef wxHAS_3STATE_CHECKBOX #undef wxHAS_3STATE_CHECKBOX
#include "wx/os2/checkbox.h" #include "wx/os2/checkbox.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/checkbox.h"
#endif #endif
#endif // wxUSE_CHECKBOX #endif // wxUSE_CHECKBOX

View File

@ -4,7 +4,7 @@
* Author: Vadim Zeitlin * Author: Vadim Zeitlin
* Modified by: * Modified by:
* Created: 09.08.00 * Created: 09.08.00
* RCS-ID: $Id: chkconf.h 67280 2011-03-22 14:17:38Z DS $ * RCS-ID: $Id: chkconf.h 70703 2012-02-26 20:24:25Z VZ $
* Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwidgets.org> * Copyright: (c) 2000 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence * Licence: wxWindows licence
*/ */
@ -57,11 +57,6 @@
global features global features
*/ */
/* GUI build by default */
#if !defined(wxUSE_GUI)
# define wxUSE_GUI 1
#endif /* !defined(wxUSE_GUI) */
/* /*
If we're compiling without support for threads/exceptions we have to If we're compiling without support for threads/exceptions we have to
disable the corresponding features. disable the corresponding features.
@ -299,6 +294,22 @@
# endif # endif
#endif /* !defined(wxUSE_SOCKETS) */ #endif /* !defined(wxUSE_SOCKETS) */
#ifndef wxUSE_STD_CONTAINERS
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_CONTAINERS must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_CONTAINERS 0
# endif
#endif /* !defined(wxUSE_STD_CONTAINERS) */
#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
# else
# define wxUSE_STD_STRING_CONV_IN_WXSTRING 0
# endif
#endif /* !defined(wxUSE_STD_STRING_CONV_IN_WXSTRING) */
#ifndef wxUSE_STREAMS #ifndef wxUSE_STREAMS
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_STREAMS must be defined, please read comment near the top of this file." # error "wxUSE_STREAMS must be defined, please read comment near the top of this file."
@ -599,6 +610,14 @@
# endif # endif
#endif /* !defined(wxUSE_DATEPICKCTRL) */ #endif /* !defined(wxUSE_DATEPICKCTRL) */
#ifndef wxUSE_DC_TRANSFORM_MATRIX
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DC_TRANSFORM_MATRIX must be defined, please read comment near the top of this file."
# else
# define wxUSE_DC_TRANSFORM_MATRIX 1
# endif
#endif /* wxUSE_DC_TRANSFORM_MATRIX */
#ifndef wxUSE_DIRPICKERCTRL #ifndef wxUSE_DIRPICKERCTRL
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file." # error "wxUSE_DIRPICKERCTRL must be defined, please read comment near the top of this file."
@ -729,7 +748,7 @@
#endif /* !defined(wxUSE_HTML) */ #endif /* !defined(wxUSE_HTML) */
#ifndef wxUSE_LIBMSPACK #ifndef wxUSE_LIBMSPACK
# if !defined(__UNIX__) || defined(__WXPALMOS__) # if !defined(__UNIX__)
/* set to 0 on platforms that don't have libmspack */ /* set to 0 on platforms that don't have libmspack */
# define wxUSE_LIBMSPACK 0 # define wxUSE_LIBMSPACK 0
# else # else
@ -955,7 +974,15 @@
# else # else
# define wxUSE_RICHMSGDLG 0 # define wxUSE_RICHMSGDLG 0
# endif # endif
#endif /* !defined(wxUSE_RIBBON) */ #endif /* !defined(wxUSE_RICHMSGDLG) */
#ifndef wxUSE_RICHTOOLTIP
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RICHTOOLTIP must be defined, please read comment near the top of this file."
# else
# define wxUSE_RICHTOOLTIP 0
# endif
#endif /* !defined(wxUSE_RICHTOOLTIP) */
#ifndef wxUSE_SASH #ifndef wxUSE_SASH
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
@ -1077,6 +1104,14 @@
# endif # endif
#endif /* !defined(wxUSE_TEXTCTRL) */ #endif /* !defined(wxUSE_TEXTCTRL) */
#ifndef wxUSE_TIMEPICKCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TIMEPICKCTRL 0
# endif
#endif /* !defined(wxUSE_TIMEPICKCTRL) */
#ifndef wxUSE_TIPWINDOW #ifndef wxUSE_TIPWINDOW
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file." # error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file."
@ -1109,6 +1144,14 @@
# endif # endif
#endif /* !defined(wxUSE_TREECTRL) */ #endif /* !defined(wxUSE_TREECTRL) */
#ifndef wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL must be defined, please read comment near the top of this file."
# else
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* !defined(wxUSE_TREELISTCTRL) */
#ifndef wxUSE_UIACTIONSIMULATOR #ifndef wxUSE_UIACTIONSIMULATOR
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file." # error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file."
@ -1125,6 +1168,14 @@
# endif # endif
#endif /* !defined(wxUSE_VALIDATORS) */ #endif /* !defined(wxUSE_VALIDATORS) */
#ifndef wxUSE_WEBVIEW
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW must be defined, please read comment near the top of this file."
# else
# define wxUSE_WEBVIEW 0
# endif
#endif /* !defined(wxUSE_WEBVIEW) */
#ifndef wxUSE_WXHTML_HELP #ifndef wxUSE_WXHTML_HELP
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file." # error "wxUSE_WXHTML_HELP must be defined, please read comment near the top of this file."
@ -1150,9 +1201,7 @@
checks use wxUSE_XXX symbols in #if tests. checks use wxUSE_XXX symbols in #if tests.
*/ */
#if defined(__WXPALMOS__) #if defined(__WXWINCE__)
# include "wx/palmos/chkconf.h"
#elif defined(__WXWINCE__)
# include "wx/msw/wince/chkconf.h" # include "wx/msw/wince/chkconf.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
# include "wx/msw/chkconf.h" # include "wx/msw/chkconf.h"
@ -1164,14 +1213,14 @@
# include "wx/osx/chkconf.h" # include "wx/osx/chkconf.h"
#elif defined(__OS2__) #elif defined(__OS2__)
# include "wx/os2/chkconf.h" # include "wx/os2/chkconf.h"
#elif defined(__WXMGL__)
# include "wx/mgl/chkconf.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
# include "wx/dfb/chkconf.h" # include "wx/dfb/chkconf.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
# include "wx/motif/chkconf.h" # include "wx/motif/chkconf.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)
# include "wx/x11/chkconf.h" # include "wx/x11/chkconf.h"
#elif defined(__WXANDROID__)
# include "wx/android/chkconf.h"
#endif #endif
/* /*
@ -1439,7 +1488,8 @@
wxUSE_STATUSBAR || \ wxUSE_STATUSBAR || \
wxUSE_TEXTCTRL || \ wxUSE_TEXTCTRL || \
wxUSE_TOOLBAR || \ wxUSE_TOOLBAR || \
wxUSE_TREECTRL wxUSE_TREECTRL || \
wxUSE_TREELISTCTRL
# if !wxUSE_CONTROLS # if !wxUSE_CONTROLS
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_CONTROLS unset but some controls used" # error "wxUSE_CONTROLS unset but some controls used"
@ -1582,9 +1632,7 @@
#ifndef wxUSE_NATIVE_STATUSBAR #ifndef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0 # define wxUSE_NATIVE_STATUSBAR 0
#elif wxUSE_NATIVE_STATUSBAR #elif wxUSE_NATIVE_STATUSBAR
# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \ # if defined(__WXUNIVERSAL__) || !(defined(__WXMSW__) || defined(__WXMAC__))
defined(__WXMAC__) || \
defined(__WXPALMOS__) )
# undef wxUSE_NATIVE_STATUSBAR # undef wxUSE_NATIVE_STATUSBAR
# define wxUSE_NATIVE_STATUSBAR 0 # define wxUSE_NATIVE_STATUSBAR 0
# endif # endif
@ -1672,16 +1720,16 @@
# endif # endif
#endif /* wxUSE_CALENDARCTRL */ #endif /* wxUSE_CALENDARCTRL */
#if wxUSE_DATEPICKCTRL #if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
# if !wxUSE_DATETIME # if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxDatePickerCtrl requires wxUSE_DATETIME" # error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME"
# else # else
# undef wxUSE_DATETIME # undef wxUSE_DATETIME
# define wxUSE_DATETIME 1 # define wxUSE_DATETIME 1
# endif # endif
# endif # endif
#endif /* wxUSE_DATEPICKCTRL */ #endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */
#if wxUSE_CHECKLISTBOX #if wxUSE_CHECKLISTBOX
# if !wxUSE_LISTBOX # if !wxUSE_LISTBOX
@ -1705,6 +1753,17 @@
# endif # endif
#endif /* wxUSE_CHOICEDLG */ #endif /* wxUSE_CHOICEDLG */
#if wxUSE_FILECTRL
# if !wxUSE_DATETIME
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxFileCtrl requires wxDateTime"
# else
# undef wxUSE_DATETIME
# define wxUSE_DATETIME 1
# endif
# endif
#endif /* wxUSE_FILECTRL */
#if wxUSE_HELP #if wxUSE_HELP
# if !wxUSE_BMPBUTTON # if !wxUSE_BMPBUTTON
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
@ -1935,7 +1994,7 @@
#endif /* wxUSE_FILEDLG */ #endif /* wxUSE_FILEDLG */
#if !wxUSE_GAUGE || !wxUSE_BUTTON #if !wxUSE_GAUGE || !wxUSE_BUTTON
# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__) # if wxUSE_PROGRESSDLG
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON" # error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
# else # else
@ -1977,7 +2036,7 @@
#endif #endif
#if !wxUSE_IMAGLIST #if !wxUSE_IMAGLIST
# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL # if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL || wxUSE_TREELISTCTRL
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxImageList must be compiled as well" # error "wxImageList must be compiled as well"
# else # else
@ -1996,7 +2055,7 @@
# define wxUSE_RADIOBTN 1 # define wxUSE_RADIOBTN 1
# endif # endif
# endif # endif
# if !wxUSE_STATBOX && !defined(__WXPALMOS__) # if !wxUSE_STATBOX
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_RADIOBOX requires wxUSE_STATBOX" # error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
# else # else
@ -2104,6 +2163,24 @@
# endif # endif
#endif /* wxUSE_VARIANT */ #endif /* wxUSE_VARIANT */
#if wxUSE_TREELISTCTRL && !wxUSE_DATAVIEWCTRL
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_TREELISTCTRL requires wxDataViewCtrl"
# else
# undef wxUSE_TREELISTCTRL
# define wxUSE_TREELISTCTRL 0
# endif
#endif /* wxUSE_TREELISTCTRL */
#if wxUSE_WEBVIEW && !(wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE)
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_WEBVIEW requires at least one backend"
# else
# undef wxUSE_WEBVIEW
# define wxUSE_WEBVIEW 0
# endif
#endif /* wxUSE_WEBVIEW && !any web view backend */
#endif /* wxUSE_GUI */ #endif /* wxUSE_GUI */
#endif /* _WX_CHKCONF_H_ */ #endif /* _WX_CHKCONF_H_ */

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 26.07.99 // Created: 26.07.99
// RCS-ID: $Id: choice.h 58757 2009-02-08 11:45:59Z VZ $ // RCS-ID: $Id: choice.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -84,8 +84,6 @@ private:
#include "wx/cocoa/choice.h" #include "wx/cocoa/choice.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#include "wx/os2/choice.h" #include "wx/os2/choice.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/choice.h"
#endif #endif
#endif // wxUSE_CHOICE #endif // wxUSE_CHOICE

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h // Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
// Created: 15.09.04 // Created: 15.09.04
// RCS-ID: $Id: choicebk.h 66233 2010-11-22 01:23:21Z VZ $ // RCS-ID: $Id: choicebk.h 68810 2011-08-21 14:08:49Z VZ $
// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba // Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -68,7 +68,7 @@ public:
wxWindow *page, wxWindow *page,
const wxString& text, const wxString& text,
bool bSelect = false, bool bSelect = false,
int imageId = -1); int imageId = NO_IMAGE);
virtual int SetSelection(size_t n) virtual int SetSelection(size_t n)
{ return DoSetSelection(n, SetSelection_SendEvent); } { return DoSetSelection(n, SetSelection_SendEvent); }
virtual int ChangeSelection(size_t n) { return DoSetSelection(n); } virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.10.99 // Created: 19.10.99
// RCS-ID: $Id: clipbrd.h 61485 2009-07-20 23:54:08Z VZ $ // RCS-ID: $Id: clipbrd.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) wxWidgets Team // Copyright: (c) wxWidgets Team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -160,8 +160,6 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&);
#include "wx/gtk1/clipbrd.h" #include "wx/gtk1/clipbrd.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)
#include "wx/x11/clipbrd.h" #include "wx/x11/clipbrd.h"
#elif defined(__WXMGL__)
#include "wx/mgl/clipbrd.h"
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#include "wx/osx/clipbrd.h" #include "wx/osx/clipbrd.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)

View File

@ -5,7 +5,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 04.01.00 // Created: 04.01.00
// RCS-ID: $Id: cmdline.h 66253 2010-11-24 00:42:53Z VZ $ // RCS-ID: $Id: cmdline.h 69797 2011-11-22 13:18:58Z VZ $
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -183,12 +183,25 @@ public:
void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString, void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString, const wxString& desc = wxEmptyString,
int flags = 0); int flags = 0);
void AddLongSwitch(const wxString& lng,
const wxString& desc = wxEmptyString,
int flags = 0)
{
AddSwitch(wxString(), lng, desc, flags);
}
// an option taking a value of the given type // an option taking a value of the given type
void AddOption(const wxString& name, const wxString& lng = wxEmptyString, void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
const wxString& desc = wxEmptyString, const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING, wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0); int flags = 0);
void AddLongOption(const wxString& lng,
const wxString& desc = wxEmptyString,
wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
int flags = 0)
{
AddOption(wxString(), lng, desc, type, flags);
}
// a parameter // a parameter
void AddParam(const wxString& desc = wxEmptyString, void AddParam(const wxString& desc = wxEmptyString,

View File

@ -4,7 +4,7 @@
// Author: Julian Smart (extracted from docview.h by VZ) // Author: Julian Smart (extracted from docview.h by VZ)
// Modified by: // Modified by:
// Created: 05.11.00 // Created: 05.11.00
// RCS-ID: $Id: cmdproc.h 58757 2009-02-08 11:45:59Z VZ $ // RCS-ID: $Id: cmdproc.h 70459 2012-01-25 00:05:09Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -97,10 +97,7 @@ public:
virtual void ClearCommands(); virtual void ClearCommands();
// Has the current project been changed? // Has the current project been changed?
virtual bool IsDirty() const virtual bool IsDirty() const;
{
return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
}
// Mark the current command as the one where the last save took place // Mark the current command as the one where the last save took place
void MarkAsSaved() void MarkAsSaved()

View File

@ -4,7 +4,7 @@
// Author: Julian Smart and others // Author: Julian Smart and others
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: cmndata.h 66615 2011-01-07 05:26:57Z PC $ // RCS-ID: $Id: cmndata.h 70636 2012-02-20 21:55:55Z VZ $
// Copyright: (c) // Copyright: (c)
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -189,7 +189,7 @@ public:
// Is this data OK for showing the print dialog? // Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; } bool IsOk() const { return m_printData.IsOk() ; }
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; } void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@ -249,7 +249,7 @@ public:
// Is this data OK for showing the page setup dialog? // Is this data OK for showing the page setup dialog?
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; } bool IsOk() const { return m_printData.IsOk() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData // If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well. // paper size id member as well.
@ -280,7 +280,7 @@ public:
// Use paper id in wxPrintData to set this object's paper size // Use paper id in wxPrintData to set this object's paper size
void CalculatePaperSizeFromId(); void CalculatePaperSizeFromId();
wxPageSetupDialogData& operator=(const wxPageSetupData& data); wxPageSetupDialogData& operator=(const wxPageSetupDialogData& data);
wxPageSetupDialogData& operator=(const wxPrintData& data); wxPageSetupDialogData& operator=(const wxPrintData& data);
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }

View File

@ -3,7 +3,7 @@
* Purpose: wxCocoa-specific config settings checks * Purpose: wxCocoa-specific config settings checks
* Author: Vadim Zeitlin * Author: Vadim Zeitlin
* Created: 2008-09-11 * Created: 2008-09-11
* RCS-ID: $Id: chkconf.h 55546 2008-09-11 11:20:33Z VZ $ * RCS-ID: $Id: chkconf.h 67497 2011-04-15 19:18:34Z DS $
* Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> * Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence * Licence: wxWindows licence
*/ */
@ -19,4 +19,4 @@
#undef wxUSE_LOG_DIALOG #undef wxUSE_LOG_DIALOG
#define wxUSE_LOG_DIALOG 0 #define wxUSE_LOG_DIALOG 0
#endif // _WX_COCOA_CHKCONF_H_ #endif /* _WX_COCOA_CHKCONF_H_ */

View File

@ -4,7 +4,7 @@
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2003/04/01 // Created: 2003/04/01
// RCS-ID: $Id: dc.h 58757 2009-02-08 11:45:59Z VZ $ // RCS-ID: $Id: dc.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) 2003 David Elliott // Copyright: (c) 2003 David Elliott
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -80,10 +80,10 @@ public:
virtual void Clear(); virtual void Clear();
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; } virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
virtual void EndDoc(void) {}; virtual void EndDoc(void) {}
virtual void StartPage(void) {}; virtual void StartPage(void) {}
virtual void EndPage(void) {}; virtual void EndPage(void) {}
virtual void SetFont(const wxFont& font); virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen); virtual void SetPen(const wxPen& pen);

View File

@ -4,7 +4,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: font.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: font.h 70445 2012-01-23 11:28:21Z VZ $
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -75,6 +75,19 @@ public:
SetPixelSize(pixelSize); SetPixelSize(pixelSize);
} }
wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Create(pointSize, family,
GetStyleFromFlags(flags),
GetWeightFromFlags(flags),
GetUnderlinedFromFlags(flags),
face, encoding);
}
/*! @abstract Construction with opaque wxNativeFontInfo /*! @abstract Construction with opaque wxNativeFontInfo
*/ */
wxFont(const wxNativeFontInfo& info) wxFont(const wxNativeFontInfo& info)

View File

@ -4,7 +4,7 @@
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2004/04/08 // Created: 2004/04/08
// RCS-ID: $Id: notebook.h 65930 2010-10-27 16:54:24Z VZ $ // RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $
// Copyright: (c) 2004 David Elliott // Copyright: (c) 2004 David Elliott
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -97,7 +97,7 @@ public:
wxNotebookPage *win, wxNotebookPage *win,
const wxString& strText, const wxString& strText,
bool bSelect = false, bool bSelect = false,
int imageId = -1 ); int imageId = NO_IMAGE );
protected: protected:
}; };

View File

@ -5,7 +5,7 @@
// Authors: David Elliott, Ryan Norton // Authors: David Elliott, Ryan Norton
// Modified by: // Modified by:
// Created: 2004-10-02 // Created: 2004-10-02
// RCS-ID: $Id: sound.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $
// Copyright: (c) 2004 David Elliott, Ryan Norton // Copyright: (c) 2004 David Elliott, Ryan Norton
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -25,7 +25,7 @@ public:
wxSound(const wxString& fileName, bool isResource = false) wxSound(const wxString& fileName, bool isResource = false)
: m_cocoaNSSound(NULL) : m_cocoaNSSound(NULL)
{ Create(fileName, isResource); } { Create(fileName, isResource); }
wxSound(int size, const wxByte* data) wxSound(size_t size, const void* data)
: m_cocoaNSSound(NULL) : m_cocoaNSSound(NULL)
{ LoadWAV(data,size,true); } { LoadWAV(data,size,true); }
wxSound(const wxSound& sound); // why not? wxSound(const wxSound& sound); // why not?
@ -43,7 +43,7 @@ public:
{ return m_cocoaNSSound; } { return m_cocoaNSSound; }
protected: protected:
bool DoPlay(unsigned flags) const; bool DoPlay(unsigned flags) const;
bool LoadWAV(const wxUint8 *data, size_t length, bool copyData); bool LoadWAV(const void* data, size_t length, bool copyData);
private: private:
WX_NSSound m_cocoaNSSound; WX_NSSound m_cocoaNSSound;
static const wxObjcAutoRefFromAlloc<struct objc_object *> sm_cocoaDelegate; static const wxObjcAutoRefFromAlloc<struct objc_object *> sm_cocoaDelegate;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitiln // Author: Vadim Zeitiln
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $ // RCS-ID: $Id: colordlg.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -24,8 +24,6 @@
#include "wx/osx/colordlg.h" #include "wx/osx/colordlg.h"
#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/colordlg.h" #include "wx/gtk/colordlg.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/colordlg.h"
#else #else
#include "wx/generic/colrdlgg.h" #include "wx/generic/colrdlgg.h"

View File

@ -4,7 +4,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: Francesco Montorsi // Modified by: Francesco Montorsi
// Created: // Created:
// RCS-ID: $Id: colour.h 66966 2011-02-19 12:32:59Z VZ $ // RCS-ID: $Id: colour.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: Julian Smart // Copyright: Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -213,9 +213,7 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#include "wx/generic/colour.h"
#elif defined(__WXMSW__)
#include "wx/msw/colour.h" #include "wx/msw/colour.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/colour.h" #include "wx/motif/colour.h"
@ -223,8 +221,6 @@ WXDLLIMPEXP_CORE bool wxFromString(const wxString& str, wxColourBase* col);
#include "wx/gtk/colour.h" #include "wx/gtk/colour.h"
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "wx/gtk1/colour.h" #include "wx/gtk1/colour.h"
#elif defined(__WXMGL__)
#include "wx/generic/colour.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#include "wx/generic/colour.h" #include "wx/generic/colour.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)

View File

@ -4,7 +4,7 @@
// Author: Jaakko Salli // Author: Jaakko Salli
// Modified by: // Modified by:
// Created: Apr-30-2006 // Created: Apr-30-2006
// RCS-ID: $Id: combo.h 67280 2011-03-22 14:17:38Z DS $ // RCS-ID: $Id: combo.h 69942 2011-12-07 14:05:11Z VZ $
// Copyright: (c) Jaakko Salli // Copyright: (c) Jaakko Salli
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -560,7 +560,8 @@ protected:
// Standard textctrl positioning routine. Just give it platform-dependant // Standard textctrl positioning routine. Just give it platform-dependant
// textctrl coordinate adjustment. // textctrl coordinate adjustment.
virtual void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust ); virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
int textCtrlYAdjust = 0);
// event handlers // event handlers
void OnSizeEvent( wxSizeEvent& event ); void OnSizeEvent( wxSizeEvent& event );
@ -641,7 +642,7 @@ protected:
// main (ie. topmost) window of a composite control (default = this) // main (ie. topmost) window of a composite control (default = this)
wxWindow* m_mainCtrlWnd; wxWindow* m_mainCtrlWnd;
// used to prevent immediate re-popupping incase closed popup // used to prevent immediate re-popupping in case closed popup
// by clicking on the combo control (needed because of inconsistent // by clicking on the combo control (needed because of inconsistent
// transient implementation across platforms). // transient implementation across platforms).
wxLongLong m_timeCanAcceptClick; wxLongLong m_timeCanAcceptClick;
@ -767,6 +768,13 @@ public:
// Return true for success. // Return true for success.
virtual bool Create(wxWindow* parent) = 0; virtual bool Create(wxWindow* parent) = 0;
// Calls Destroy() for the popup control (i.e. one returned by
// GetControl()) and makes sure that 'this' is deleted at the end.
// Default implementation works for both cases where popup control
// class is multiple inherited or created on heap as a separate
// object.
virtual void DestroyPopup();
// We must have an associated control which is subclassed by the combobox. // We must have an associated control which is subclassed by the combobox.
virtual wxWindow *GetControl() = 0; virtual wxWindow *GetControl() = 0;

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 24.12.00 // Created: 24.12.00
// RCS-ID: $Id: combobox.h 63242 2010-01-24 01:00:45Z VZ $ // RCS-ID: $Id: combobox.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) 1996-2000 wxWidgets team // Copyright: (c) 1996-2000 wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -36,7 +36,13 @@ public:
wxItemContainer::Clear(); wxItemContainer::Clear();
} }
bool IsEmpty() const { return wxItemContainer::IsEmpty(); } // IsEmpty() is ambiguous because we inherit it from both wxItemContainer
// and wxTextEntry, and even if defined it here to help the compiler with
// choosing one of them, it would still be confusing for the human users of
// this class. So instead define the clearly named methods below and leave
// IsEmpty() ambiguous to trigger a compilation error if it's used.
bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
// also bring in GetSelection() versions of both base classes in scope // also bring in GetSelection() versions of both base classes in scope
// //
@ -47,8 +53,8 @@ public:
virtual int GetSelection() const = 0; virtual int GetSelection() const = 0;
virtual void GetSelection(long *from, long *to) const = 0; virtual void GetSelection(long *from, long *to) const = 0;
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }; virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); }
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }; virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); }
// may return value different from GetSelection() when the combobox // may return value different from GetSelection() when the combobox
// dropdown is shown and the user selected, but not yet accepted, a value // dropdown is shown and the user selected, but not yet accepted, a value

View File

@ -3,7 +3,7 @@
// Purpose: wxCompositeWindow<> declaration // Purpose: wxCompositeWindow<> declaration
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 2011-01-02 // Created: 2011-01-02
// RCS-ID: $Id: compositewin.h 66931 2011-02-16 23:45:04Z VZ $ // RCS-ID: $Id: compositewin.h 69470 2011-10-19 16:20:01Z VS $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -12,22 +12,15 @@
#define _WX_COMPOSITEWIN_H_ #define _WX_COMPOSITEWIN_H_
#include "wx/window.h" #include "wx/window.h"
#include "wx/containr.h"
class WXDLLIMPEXP_FWD_CORE wxToolTip;
// NB: This is an experimental and, as for now, undocumented class used only by // NB: This is an experimental and, as for now, undocumented class used only by
// wxWidgets itself internally. Don't use it in your code until its API is // wxWidgets itself internally. Don't use it in your code until its API is
// officially stabilized unless you are ready to change it with the next // officially stabilized unless you are ready to change it with the next
// wxWidgets release. // wxWidgets release.
// FIXME-VC6: This compiler can't compile DoSetForAllParts() template function,
// it can't determine whether the deduced type should be "T" or "const T&". And
// without this function wxCompositeWindow is pretty useless so simply disable
// this code for it, this does mean that setting colours/fonts/... for
// composite controls won't work in the library compiled with it but so far
// this only affects the generic wxDatePickerCtrl which is not used by default
// under MSW anyhow so it doesn't seem to be worth it to spend time and uglify
// the code to fix it.
#ifndef __VISUALC6__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCompositeWindow is a helper for implementing composite windows: to define // wxCompositeWindow is a helper for implementing composite windows: to define
// a class using subwindows, simply inherit from it specialized with the real // a class using subwindows, simply inherit from it specialized with the real
@ -42,7 +35,25 @@ public:
typedef W BaseWindowClass; typedef W BaseWindowClass;
// Default ctor doesn't do anything. // Default ctor doesn't do anything.
wxCompositeWindow() { } wxCompositeWindow()
{
this->Connect
(
wxEVT_CREATE,
wxWindowCreateEventHandler(wxCompositeWindow::OnWindowCreate)
);
}
#ifndef __VISUALC6__
// FIXME-VC6: This compiler can't compile DoSetForAllParts() template function,
// it can't determine whether the deduced type should be "T" or "const T&". And
// without this function wxCompositeWindow is pretty useless so simply disable
// this code for it, this does mean that setting colours/fonts/... for
// composite controls won't work in the library compiled with it but so far
// this only affects the generic wxDatePickerCtrl which is not used by default
// under MSW anyhow so it doesn't seem to be worth it to spend time and uglify
// the code to fix it.
// Override all wxWindow methods which must be forwarded to the composite // Override all wxWindow methods which must be forwarded to the composite
// window parts. // window parts.
@ -59,7 +70,7 @@ public:
if ( !BaseWindowClass::SetForegroundColour(colour) ) if ( !BaseWindowClass::SetForegroundColour(colour) )
return false; return false;
DoSetForAllParts(&wxWindowBase::SetForegroundColour, colour); SetForAllParts(&wxWindowBase::SetForegroundColour, colour);
return true; return true;
} }
@ -69,7 +80,7 @@ public:
if ( !BaseWindowClass::SetBackgroundColour(colour) ) if ( !BaseWindowClass::SetBackgroundColour(colour) )
return false; return false;
DoSetForAllParts(&wxWindowBase::SetBackgroundColour, colour); SetForAllParts(&wxWindowBase::SetBackgroundColour, colour);
return true; return true;
} }
@ -79,7 +90,7 @@ public:
if ( !BaseWindowClass::SetFont(font) ) if ( !BaseWindowClass::SetFont(font) )
return false; return false;
DoSetForAllParts(&wxWindowBase::SetFont, font); SetForAllParts(&wxWindowBase::SetFont, font);
return true; return true;
} }
@ -89,18 +100,112 @@ public:
if ( !BaseWindowClass::SetCursor(cursor) ) if ( !BaseWindowClass::SetCursor(cursor) )
return false; return false;
DoSetForAllParts(&wxWindowBase::SetCursor, cursor); SetForAllParts(&wxWindowBase::SetCursor, cursor);
return true; return true;
} }
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip(wxToolTip *tip)
{
BaseWindowClass::DoSetToolTip(tip);
SetForAllParts(&wxWindowBase::CopyToolTip, tip);
}
#endif // wxUSE_TOOLTIPS
#endif // !__VISUALC6__
virtual void SetFocus()
{
wxSetFocusToChild(this, NULL);
}
private: private:
// Must be implemented by the derived class to return all children to which // Must be implemented by the derived class to return all children to which
// the public methods we override should forward to. // the public methods we override should forward to.
virtual wxWindowList GetCompositeWindowParts() const = 0; virtual wxWindowList GetCompositeWindowParts() const = 0;
void OnWindowCreate(wxWindowCreateEvent& event)
{
event.Skip();
// Attach a few event handlers to all parts of the composite window.
// This makes the composite window behave more like a simple control
// and allows other code (such as wxDataViewCtrl's inline editing
// support) to hook into its event processing.
wxWindow *child = event.GetWindow();
if ( child == this )
return; // not a child, we don't want to Connect() to ourselves
// Always capture wxEVT_KILL_FOCUS:
child->Connect(wxEVT_KILL_FOCUS,
wxFocusEventHandler(wxCompositeWindow::OnKillFocus),
NULL, this);
// Some events should be only handled for non-toplevel children. For
// example, we want to close the control in wxDataViewCtrl when Enter
// is pressed in the inline editor, but not when it's pressed in a
// popup dialog it opens.
wxWindow *win = child;
while ( win && win != this )
{
if ( win->IsTopLevel() )
return;
win = win->GetParent();
}
child->Connect(wxEVT_CHAR,
wxKeyEventHandler(wxCompositeWindow::OnChar),
NULL, this);
}
void OnChar(wxKeyEvent& event)
{
if ( !this->ProcessWindowEvent(event) )
event.Skip();
}
void OnKillFocus(wxFocusEvent& event)
{
// Ignore focus changes within the composite control:
wxWindow *win = event.GetWindow();
while ( win )
{
if ( win == this )
{
event.Skip();
return;
}
// Note that we don't use IsTopLevel() check here, because we do
// want to ignore focus changes going to toplevel window that have
// the composite control as its parent; these would typically be
// some kind of control's popup window.
win = win->GetParent();
}
// The event shouldn't be ignored, forward it to the main control:
if ( !this->ProcessWindowEvent(event) )
event.Skip();
}
#ifndef __VISUALC6__
template <class T> template <class T>
void DoSetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg) void SetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg)
{
DoSetForAllParts<const T&>(func, arg);
}
template <class T>
void SetForAllParts(bool (wxWindowBase::*func)(T*), T* arg)
{
DoSetForAllParts<T*>(func, arg);
}
template <class T>
void DoSetForAllParts(bool (wxWindowBase::*func)(T), T arg)
{ {
// Simply call the setters for all parts of this composite window. // Simply call the setters for all parts of this composite window.
const wxWindowList parts = GetCompositeWindowParts(); const wxWindowList parts = GetCompositeWindowParts();
@ -110,20 +215,16 @@ private:
{ {
wxWindow * const child = *i; wxWindow * const child = *i;
(child->*func)(arg); // Allow NULL elements in the list, this makes the code of derived
// composite controls which may have optionally shown children
// simpler and it doesn't cost us much here.
if ( child )
(child->*func)(arg);
} }
} }
#endif // !__VISUALC6__
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W); wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W);
}; };
#else // __VISUALC6__
template <class W>
class wxCompositeWindow : public W
{
};
#endif // !__VISUALC6__/__VISUALC6__
#endif // _WX_COMPOSITEWIN_H_ #endif // _WX_COMPOSITEWIN_H_

View File

@ -5,7 +5,7 @@
// Modified by: // Modified by:
// Created: // Created:
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// RCS-ID: $Id: config.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: config.h 70808 2012-03-04 20:31:42Z VZ $
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -22,15 +22,12 @@
// under Windows we prefer to use the native implementation but can be forced // under Windows we prefer to use the native implementation but can be forced
// to use the file-based one // to use the file-based one
#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE #if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
#include "wx/msw/regconf.h" #include "wx/msw/regconf.h"
#define wxConfig wxRegConfig #define wxConfig wxRegConfig
#elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE #elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE
#include "wx/os2/iniconf.h" #include "wx/os2/iniconf.h"
#define wxConfig wxIniConfig #define wxConfig wxIniConfig
#elif defined(__WXPALMOS__) && wxUSE_CONFIG_NATIVE
#include "wx/palmos/prefconf.h"
#define wxConfig wxPrefConfig
#else // either we're under Unix or wish to always use config files #else // either we're under Unix or wish to always use config files
#include "wx/fileconf.h" #include "wx/fileconf.h"
#define wxConfig wxFileConfig #define wxConfig wxFileConfig

View File

@ -1,12 +1,11 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/containr.h // Name: wx/containr.h
// Purpose: wxControlContainer class declration: a "mix-in" class which // Purpose: wxControlContainer and wxNavigationEnabled declarations
// implements the TAB navigation between the controls
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 06.08.01 // Created: 06.08.01
// RCS-ID: $Id: containr.h 61508 2009-07-23 20:30:22Z VZ $ // RCS-ID: $Id: containr.h 70805 2012-03-04 09:42:51Z SC $
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 2001, 2011 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -15,16 +14,20 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
// We need wxEVT_XXX declarations in this case.
#include "wx/event.h"
#endif
class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase; class WXDLLIMPEXP_FWD_CORE wxWindowBase;
/* /*
Implementation note: wxControlContainer is not a real mix-in but rather This header declares wxControlContainer class however it's not a real
a class meant to be aggregated with (and not inherited from). Although container of controls but rather just a helper used to implement TAB
logically it should be a mix-in, doing it like this has no advantage from navigation among the window children. You should rarely need to use it
the point of view of the existing code but does have some problems (we'd directly, derive from the documented public wxNavigationEnabled<> class to
need to play tricks with event handlers which may be difficult to do implement TAB navigation in a custom composite window.
safely). The price we pay for this simplicity is the ugly macros below.
*/ */
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -102,6 +105,161 @@ private:
bool m_inSetFocus; bool m_inSetFocus;
}; };
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for native TAB navigation
// ----------------------------------------------------------------------------
// this must be a real class as we forward-declare it elsewhere
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
protected:
// set the focus to the child which had it the last time
virtual bool SetFocusToChild();
};
#else // !wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for TAB navigation implemented in wx itself
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
public:
// default ctor, SetContainerWindow() must be called later
wxControlContainer();
// the methods to be called from the window event handlers
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
// called from OnChildFocus() handler, i.e. when one of our (grand)
// children gets the focus
void SetLastFocus(wxWindow *win);
protected:
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
};
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
// this function is for wxWidgets internal use only
extern WXDLLIMPEXP_CORE bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
// ----------------------------------------------------------------------------
// wxNavigationEnabled: Derive from this class to support keyboard navigation
// among window children in a wxWindow-derived class. The details of this class
// don't matter, you just need to derive from it to make navigation work.
// ----------------------------------------------------------------------------
// The template parameter W must be a wxWindow-derived class.
template <class W>
class wxNavigationEnabled : public W
{
public:
typedef W BaseWindowClass;
wxNavigationEnabled()
{
m_container.SetContainerWindow(this);
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY,
wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
BaseWindowClass::Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(wxNavigationEnabled::OnFocus));
BaseWindowClass::Connect(wxEVT_CHILD_FOCUS,
wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocus() const
{
return m_container.AcceptsFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusRecursively() const
{
return m_container.AcceptsFocusRecursively();
}
WXDLLIMPEXP_INLINE_CORE virtual bool AcceptsFocusFromKeyboard() const
{
return m_container.AcceptsFocusFromKeyboard();
}
WXDLLIMPEXP_INLINE_CORE virtual void AddChild(wxWindowBase *child)
{
BaseWindowClass::AddChild(child);
m_container.UpdateCanFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child)
{
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
m_container.HandleOnWindowDestroy(child);
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
BaseWindowClass::RemoveChild(child);
m_container.UpdateCanFocus();
}
WXDLLIMPEXP_INLINE_CORE virtual void SetFocus()
{
if ( !m_container.DoSetFocus() )
BaseWindowClass::SetFocus();
}
void SetFocusIgnoringChildren()
{
BaseWindowClass::SetFocus();
}
void AcceptFocus(bool acceptFocus)
{
m_container.SetCanFocus(acceptFocus);
}
protected:
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
void OnNavigationKey(wxNavigationKeyEvent& event)
{
m_container.HandleOnNavigationKey(event);
}
void OnFocus(wxFocusEvent& event)
{
m_container.HandleOnFocus(event);
}
void OnChildFocus(wxChildFocusEvent& event)
{
m_container.SetLastFocus(event.GetWindow());
event.Skip();
}
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
wxControlContainer m_container;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxNavigationEnabled, W);
};
// ----------------------------------------------------------------------------
// Compatibility macros from now on, do NOT use them and preferably do not even
// look at them.
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_8
// common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases, // common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases,
// it should be used in the wxWindow-derived class declaration // it should be used in the wxWindow-derived class declaration
#define WX_DECLARE_CONTROL_CONTAINER_BASE() \ #define WX_DECLARE_CONTROL_CONTAINER_BASE() \
@ -156,20 +314,9 @@ protected: \
return m_container.AcceptsFocusFromKeyboard(); \ return m_container.AcceptsFocusFromKeyboard(); \
} }
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL #ifdef wxHAS_NATIVE_TAB_TRAVERSAL
// ----------------------------------------------------------------------------
// wxControlContainer for native TAB navigation
// ----------------------------------------------------------------------------
// this must be a real class as we forward-declare it elsewhere
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
protected:
// set the focus to the child which had it the last time
virtual bool SetFocusToChild();
};
#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname) #define WX_EVENT_TABLE_CONTROL_CONTAINER(classname)
#define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE #define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE
@ -191,38 +338,6 @@ protected:
#else // !wxHAS_NATIVE_TAB_TRAVERSAL #else // !wxHAS_NATIVE_TAB_TRAVERSAL
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
// ----------------------------------------------------------------------------
// wxControlContainer for TAB navigation implemented in wx itself
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
{
public:
// default ctor, SetContainerWindow() must be called later
wxControlContainer();
// the methods to be called from the window event handlers
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
// called from OnChildFocus() handler, i.e. when one of our (grand)
// children gets the focus
void SetLastFocus(wxWindow *win);
protected:
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
};
// ----------------------------------------------------------------------------
// macros which may be used by the classes wishing to implement TAB navigation
// among their children
// ----------------------------------------------------------------------------
// declare the methods to be forwarded // declare the methods to be forwarded
#define WX_DECLARE_CONTROL_CONTAINER() \ #define WX_DECLARE_CONTROL_CONTAINER() \
WX_DECLARE_CONTROL_CONTAINER_BASE(); \ WX_DECLARE_CONTROL_CONTAINER_BASE(); \
@ -274,7 +389,6 @@ public: \
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL #endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
// this function is for wxWidgets internal use only #endif // WXWIN_COMPATIBILITY_2_8
extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
#endif // _WX_CONTAINR_H_ #endif // _WX_CONTAINR_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 26.07.99 // Created: 26.07.99
// RCS-ID: $Id: control.h 67062 2011-02-27 12:48:07Z VZ $ // RCS-ID: $Id: control.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -221,8 +221,6 @@ protected:
#if defined(__WXUNIVERSAL__) #if defined(__WXUNIVERSAL__)
#include "wx/univ/control.h" #include "wx/univ/control.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/control.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/control.h" #include "wx/msw/control.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)

View File

@ -3,7 +3,7 @@
// Purpose: wxConvAuto class declaration // Purpose: wxConvAuto class declaration
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 2006-04-03 // Created: 2006-04-03
// RCS-ID: $Id: convauto.h 63991 2010-04-16 10:43:18Z VS $ // RCS-ID: $Id: convauto.h 69675 2011-11-05 11:23:41Z VZ $
// Copyright: (c) 2006 Vadim Zeitlin // Copyright: (c) 2006 Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -18,6 +18,18 @@
// wxConvAuto: uses BOM to automatically detect input encoding // wxConvAuto: uses BOM to automatically detect input encoding
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// All currently recognized BOM values.
enum wxBOM
{
wxBOM_Unknown = -1,
wxBOM_None,
wxBOM_UTF32BE,
wxBOM_UTF32LE,
wxBOM_UTF16BE,
wxBOM_UTF16LE,
wxBOM_UTF8
};
class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv
{ {
public: public:
@ -69,29 +81,27 @@ public:
virtual wxMBConv *Clone() const { return new wxConvAuto(*this); } virtual wxMBConv *Clone() const { return new wxConvAuto(*this); }
private:
// all currently recognized BOM values
enum BOMType
{
BOM_Unknown = -1,
BOM_None,
BOM_UTF32BE,
BOM_UTF32LE,
BOM_UTF16BE,
BOM_UTF16LE,
BOM_UTF8
};
// return the BOM type of this buffer // return the BOM type of this buffer
static BOMType DetectBOM(const char *src, size_t srcLen); static wxBOM DetectBOM(const char *src, size_t srcLen);
// return the characters composing the given BOM.
static const char* GetBOMChars(wxBOM bomType, size_t* count);
wxBOM GetBOM() const
{
return m_bomType;
}
private:
// common part of all ctors // common part of all ctors
void Init() void Init()
{ {
// no need to initialize m_bomType and m_consumedBOM here, this will be // We don't initialize m_encDefault here as different ctors do it
// done when m_conv is created // differently.
m_conv = NULL; m_conv = NULL;
m_bomType = wxBOM_Unknown;
m_ownsConv = false; m_ownsConv = false;
m_consumedBOM = false;
} }
// initialize m_conv with the UTF-8 conversion // initialize m_conv with the UTF-8 conversion
@ -102,7 +112,7 @@ private:
} }
// create the correct conversion object for the given BOM type // create the correct conversion object for the given BOM type
void InitFromBOM(BOMType bomType); void InitFromBOM(wxBOM bomType);
// create the correct conversion object for the BOM present in the // create the correct conversion object for the BOM present in the
// beginning of the buffer // beginning of the buffer
@ -128,7 +138,7 @@ private:
wxFontEncoding m_encDefault; wxFontEncoding m_encDefault;
// our BOM type // our BOM type
BOMType m_bomType; wxBOM m_bomType;
// true if we allocated m_conv ourselves, false if we just use an existing // true if we allocated m_conv ourselves, false if we just use an existing
// global conversion // global conversion

View File

@ -3,7 +3,7 @@
// Purpose: wrapper header for CppUnit headers // Purpose: wrapper header for CppUnit headers
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 15.02.04 // Created: 15.02.04
// RCS-ID: $Id: cppunit.h 66711 2011-01-19 10:47:49Z VZ $ // RCS-ID: $Id: cppunit.h 69241 2011-09-30 14:00:52Z JJ $
// Copyright: (c) 2004 Vadim Zeitlin // Copyright: (c) 2004 Vadim Zeitlin
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -200,6 +200,10 @@ WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned) WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long) WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long)
#if defined( __VMS ) && defined( __ia64 )
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::basic_streambuf<char>::pos_type);
#endif
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG #ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t) WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t)
WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t) WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 22.10.99 // Created: 22.10.99
// RCS-ID: $Id: ctrlsub.h 65040 2010-07-22 12:09:15Z VZ $ // RCS-ID: $Id: ctrlsub.h 68460 2011-07-30 11:30:08Z VZ $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -395,41 +395,48 @@ private:
wxClientDataType m_clientDataItemsType; wxClientDataType m_clientDataItemsType;
}; };
// this macro must (unfortunately) be used in any class deriving from both // Inheriting directly from a wxWindow-derived class and wxItemContainer
// wxItemContainer and wxControl because otherwise there is ambiguity when // unfortunately introduces an ambiguity for all GetClientXXX() methods as they
// calling GetClientXXX() functions -- the compiler can't choose between the // are inherited twice: the "global" versions from wxWindow and the per-item
// two versions // versions taking the index from wxItemContainer.
#define wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST \ //
void SetClientData(void *data) \ // So we need to explicitly resolve them and this helper template class is
{ wxEvtHandler::SetClientData(data); } \ // provided to do it. To use it, simply inherit from wxWindowWithItems<Window,
void *GetClientData() const \ // Container> instead of Window and Container interface directly.
{ return wxEvtHandler::GetClientData(); } \ template <class W, class C>
void SetClientObject(wxClientData *data) \ class wxWindowWithItems : public W, public C
{ wxEvtHandler::SetClientObject(data); } \ {
wxClientData *GetClientObject() const \ public:
{ return wxEvtHandler::GetClientObject(); } \ typedef W BaseWindowClass;
void SetClientData(unsigned int n, void* clientData) \ typedef C BaseContainerInterface;
{ wxItemContainer::SetClientData(n, clientData); } \
void* GetClientData(unsigned int n) const \
{ return wxItemContainer::GetClientData(n); } \
void SetClientObject(unsigned int n, wxClientData* clientData) \
{ wxItemContainer::SetClientObject(n, clientData); } \
wxClientData* GetClientObject(unsigned int n) const \
{ return wxItemContainer::GetClientObject(n); }
class WXDLLIMPEXP_CORE wxControlWithItemsBase : public wxControl, wxWindowWithItems() { }
public wxItemContainer
void SetClientData(void *data)
{ BaseWindowClass::SetClientData(data); }
void *GetClientData() const
{ return BaseWindowClass::GetClientData(); }
void SetClientObject(wxClientData *data)
{ BaseWindowClass::SetClientObject(data); }
wxClientData *GetClientObject() const
{ return BaseWindowClass::GetClientObject(); }
void SetClientData(unsigned int n, void* clientData)
{ wxItemContainer::SetClientData(n, clientData); }
void* GetClientData(unsigned int n) const
{ return wxItemContainer::GetClientData(n); }
void SetClientObject(unsigned int n, wxClientData* clientData)
{ wxItemContainer::SetClientObject(n, clientData); }
wxClientData* GetClientObject(unsigned int n) const
{ return wxItemContainer::GetClientObject(n); }
};
class WXDLLIMPEXP_CORE wxControlWithItemsBase :
public wxWindowWithItems<wxControl, wxItemContainer>
{ {
public: public:
wxControlWithItemsBase() { } wxControlWithItemsBase() { }
// we have to redefine these functions here to avoid ambiguities in classes
// deriving from us which would arise otherwise because both base classses
// have the methods with the same names - hopefully, a smart compiler can
// optimize away these simple inline wrappers so we don't suffer much from
// this
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// usually the controls like list/combo boxes have their own background // usually the controls like list/combo boxes have their own background
// colour // colour
virtual bool ShouldInheritColours() const { return false; } virtual bool ShouldInheritColours() const { return false; }

View File

@ -5,7 +5,7 @@
// Modified by: // Modified by:
// Created: // Created:
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// RCS-ID: $Id: cursor.h 60648 2009-05-16 10:42:48Z FM $ // RCS-ID: $Id: cursor.h 70353 2012-01-15 14:46:41Z VZ $
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -34,10 +34,7 @@ public:
*/ */
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/palmos/cursor.h"
#elif defined(__WXMSW__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/msw/cursor.h" #include "wx/msw/cursor.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
@ -52,9 +49,6 @@ public:
#elif defined(__WXX11__) #elif defined(__WXX11__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
#include "wx/x11/cursor.h" #include "wx/x11/cursor.h"
#elif defined(__WXMGL__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/mgl/cursor.h"
#elif defined(__WXDFB__) #elif defined(__WXDFB__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
#include "wx/dfb/cursor.h" #include "wx/dfb/cursor.h"
@ -62,7 +56,7 @@ public:
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
#include "wx/osx/cursor.h" #include "wx/osx/cursor.h"
#elif defined(__WXCOCOA__) #elif defined(__WXCOCOA__)
#define wxCURSOR_DEFAULT_TYPE 0 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
#include "wx/cocoa/cursor.h" #include "wx/cocoa/cursor.h"
#elif defined(__WXPM__) #elif defined(__WXPM__)
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE

View File

@ -0,0 +1,53 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/custombgwin.h
// Purpose: Class adding support for custom window backgrounds.
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69930 2011-12-04 23:57:36Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CUSTOMBGWIN_H_
#define _WX_CUSTOMBGWIN_H_
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow: Adds support for custom backgrounds to any
// wxWindow-derived class.
// ----------------------------------------------------------------------------
class wxCustomBackgroundWindowBase
{
public:
// Trivial default ctor.
wxCustomBackgroundWindowBase() { }
// Also a trivial but virtual -- to suppress g++ warnings -- dtor.
virtual ~wxCustomBackgroundWindowBase() { }
// Use the given bitmap to tile the background of this window. This bitmap
// will show through any transparent children.
//
// Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
// handler from running (i.e. not to handle this event yourself) for this
// to work.
void SetBackgroundBitmap(const wxBitmap& bmp)
{
DoSetBackgroundBitmap(bmp);
}
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0;
wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase);
};
#if defined(__WXUNIVERSAL__)
#include "wx/univ/custombgwin.h"
#elif defined(__WXMSW__)
#include "wx/msw/custombgwin.h"
#else
#include "wx/generic/custombgwin.h"
#endif
#endif // _WX_CUSTOMBGWIN_H_

View File

@ -4,7 +4,7 @@
// Author: Robert Roebling // Author: Robert Roebling
// Modified by: Bo Yang // Modified by: Bo Yang
// Created: 08.01.06 // Created: 08.01.06
// RCS-ID: $Id: dataview.h 66783 2011-01-27 11:53:51Z SC $ // RCS-ID: $Id: dataview.h 70377 2012-01-17 14:05:17Z VS $
// Copyright: (c) Robert Roebling // Copyright: (c) Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -21,9 +21,11 @@
#include "wx/variant.h" #include "wx/variant.h"
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/itemid.h"
#include "wx/weakref.h" #include "wx/weakref.h"
#include "wx/vector.h" #include "wx/vector.h"
#include "wx/dataobj.h" #include "wx/dataobj.h"
#include "wx/withimages.h"
class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_FWD_CORE wxImageList;
@ -44,7 +46,6 @@ class WXDLLIMPEXP_FWD_CORE wxImageList;
// wxDataViewCtrl globals // wxDataViewCtrl globals
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_ADV wxDataViewItem;
class WXDLLIMPEXP_FWD_ADV wxDataViewModel; class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
class WXDLLIMPEXP_FWD_ADV wxDataViewColumn; class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
@ -78,33 +79,14 @@ extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
// wxDataViewItem // wxDataViewItem
// --------------------------------------------------------- // ---------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewItem // Make it a class and not a typedef to allow forward declaring it.
class wxDataViewItem : public wxItemId<void*>
{ {
public: public:
wxDataViewItem( void* id = NULL ) wxDataViewItem() : wxItemId<void*>() { }
{ m_id = id; } wxEXPLICIT wxDataViewItem(void* pItem) : wxItemId<void*>(pItem) { }
wxDataViewItem( const wxDataViewItem &item )
{ m_id = item.m_id; }
bool IsOk() const { return m_id != NULL; }
void* GetID() const { return m_id; }
operator const void* () const { return m_id; }
private:
void* m_id;
}; };
inline
bool operator==(const wxDataViewItem& left, const wxDataViewItem& right)
{
return left.GetID() == right.GetID();
}
inline
bool operator!=(const wxDataViewItem& left, const wxDataViewItem& right)
{
return !(left == right);
}
WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray); WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
// --------------------------------------------------------- // ---------------------------------------------------------
@ -161,16 +143,20 @@ public:
void SetColour(const wxColour& colour) { m_colour = colour; } void SetColour(const wxColour& colour) { m_colour = colour; }
void SetBold( bool set ) { m_bold = set; } void SetBold( bool set ) { m_bold = set; }
void SetItalic( bool set ) { m_italic = set; } void SetItalic( bool set ) { m_italic = set; }
void SetBackgroundColour(const wxColour& colour) { m_bgColour = colour; }
// accessors // accessors
bool HasColour() const { return m_colour.Ok(); } bool HasColour() const { return m_colour.IsOk(); }
const wxColour& GetColour() const { return m_colour; } const wxColour& GetColour() const { return m_colour; }
bool HasFont() const { return m_bold || m_italic; } bool HasFont() const { return m_bold || m_italic; }
bool GetBold() const { return m_bold; } bool GetBold() const { return m_bold; }
bool GetItalic() const { return m_italic; } bool GetItalic() const { return m_italic; }
bool IsDefault() const { return !(HasColour() || HasFont()); } bool HasBackgroundColour() const { return m_bgColour.IsOk(); }
const wxColour& GetBackgroundColour() const { return m_bgColour; }
bool IsDefault() const { return !(HasColour() || HasFont() || HasBackgroundColour()); }
// Return the font based on the given one with this attribute applied to it. // Return the font based on the given one with this attribute applied to it.
wxFont GetEffectiveFont(const wxFont& font) const; wxFont GetEffectiveFont(const wxFont& font) const;
@ -179,6 +165,7 @@ private:
wxColour m_colour; wxColour m_colour;
bool m_bold; bool m_bold;
bool m_italic; bool m_italic;
wxColour m_bgColour;
}; };
@ -681,7 +668,18 @@ public:
wxDataViewItem GetCurrentItem() const; wxDataViewItem GetCurrentItem() const;
void SetCurrentItem(const wxDataViewItem& item); void SetCurrentItem(const wxDataViewItem& item);
virtual wxDataViewItem GetSelection() const = 0; // Currently focused column of the current item or NULL if no column has focus
virtual wxDataViewColumn *GetCurrentColumn() const = 0;
// Selection: both GetSelection() and GetSelections() can be used for the
// controls both with and without wxDV_MULTIPLE style. For single selection
// controls GetSelections() is not very useful however. And for multi
// selection controls GetSelection() returns an invalid item if more than
// one item is selected. Use GetSelectedItemsCount() or HasSelection() to
// check if any items are selected at all.
virtual int GetSelectedItemsCount() const = 0;
bool HasSelection() const { return GetSelectedItemsCount() != 0; }
wxDataViewItem GetSelection() const;
virtual int GetSelections( wxDataViewItemArray & sel ) const = 0; virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
virtual void SetSelections( const wxDataViewItemArray & sel ) = 0; virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
virtual void Select( const wxDataViewItem & item ) = 0; virtual void Select( const wxDataViewItem & item ) = 0;
@ -701,6 +699,13 @@ public:
virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0; virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0; virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; }
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) = 0;
// Use EditItem() instead
wxDEPRECATED( void StartEditor(const wxDataViewItem& item, unsigned int column) );
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format)) virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format))
{ return false; } { return false; }
@ -757,7 +762,8 @@ public:
m_column(NULL), m_column(NULL),
m_pos(-1,-1), m_pos(-1,-1),
m_cacheFrom(0), m_cacheFrom(0),
m_cacheTo(0) m_cacheTo(0),
m_editCancelled(false)
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
, m_dataObject(NULL), , m_dataObject(NULL),
m_dataBuffer(NULL), m_dataBuffer(NULL),
@ -774,7 +780,8 @@ public:
m_column(event.m_column), m_column(event.m_column),
m_pos(event.m_pos), m_pos(event.m_pos),
m_cacheFrom(event.m_cacheFrom), m_cacheFrom(event.m_cacheFrom),
m_cacheTo(event.m_cacheTo) m_cacheTo(event.m_cacheTo),
m_editCancelled(event.m_editCancelled)
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
, m_dataObject(event.m_dataObject), , m_dataObject(event.m_dataObject),
m_dataFormat(event.m_dataFormat), m_dataFormat(event.m_dataFormat),
@ -795,6 +802,10 @@ public:
const wxVariant &GetValue() const { return m_value; } const wxVariant &GetValue() const { return m_value; }
void SetValue( const wxVariant &value ) { m_value = value; } void SetValue( const wxVariant &value ) { m_value = value; }
// for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only
bool IsEditCancelled() const { return m_editCancelled; }
void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
// for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; } void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
wxDataViewColumn *GetDataViewColumn() const { return m_column; } wxDataViewColumn *GetDataViewColumn() const { return m_column; }
@ -834,6 +845,7 @@ protected:
wxPoint m_pos; wxPoint m_pos;
int m_cacheFrom; int m_cacheFrom;
int m_cacheTo; int m_cacheTo;
bool m_editCancelled;
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
wxDataObject *m_dataObject; wxDataObject *m_dataObject;
@ -1202,7 +1214,7 @@ public:
virtual bool HasDefaultCompare() const virtual bool HasDefaultCompare() const
{ return true; } { return true; }
virtual unsigned int GetColumnCount() const virtual unsigned int GetColumnCount() const
{ return 1; }; { return 1; }
virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const
{ return wxT("wxDataViewIconText"); } { return wxT("wxDataViewIconText"); }
@ -1216,10 +1228,11 @@ public:
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl,
public wxWithImages
{ {
public: public:
wxDataViewTreeCtrl() { Init(); } wxDataViewTreeCtrl() { }
wxDataViewTreeCtrl(wxWindow *parent, wxDataViewTreeCtrl(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@ -1227,13 +1240,9 @@ public:
long style = wxDV_NO_HEADER | wxDV_ROW_LINES, long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
const wxValidator& validator = wxDefaultValidator) const wxValidator& validator = wxDefaultValidator)
{ {
Init();
Create(parent, id, pos, size, style, validator); Create(parent, id, pos, size, style, validator);
} }
virtual ~wxDataViewTreeCtrl();
bool Create(wxWindow *parent, bool Create(wxWindow *parent,
wxWindowID id, wxWindowID id,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@ -1249,24 +1258,21 @@ public:
bool IsContainer( const wxDataViewItem& item ) const bool IsContainer( const wxDataViewItem& item ) const
{ return GetStore()->IsContainer(item); } { return GetStore()->IsContainer(item); }
void SetImageList( wxImageList *imagelist );
wxImageList* GetImageList() { return m_imageList; }
wxDataViewItem AppendItem( const wxDataViewItem& parent, wxDataViewItem AppendItem( const wxDataViewItem& parent,
const wxString &text, int icon = -1, wxClientData *data = NULL ); const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem PrependItem( const wxDataViewItem& parent, wxDataViewItem PrependItem( const wxDataViewItem& parent,
const wxString &text, int icon = -1, wxClientData *data = NULL ); const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
const wxString &text, int icon = -1, wxClientData *data = NULL ); const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
wxDataViewItem PrependContainer( const wxDataViewItem& parent, wxDataViewItem PrependContainer( const wxDataViewItem& parent,
const wxString &text, int icon = -1, int expanded = -1, const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL ); wxClientData *data = NULL );
wxDataViewItem AppendContainer( const wxDataViewItem& parent, wxDataViewItem AppendContainer( const wxDataViewItem& parent,
const wxString &text, int icon = -1, int expanded = -1, const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL ); wxClientData *data = NULL );
wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
const wxString &text, int icon = -1, int expanded = -1, const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
wxClientData *data = NULL ); wxClientData *data = NULL );
wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
@ -1296,14 +1302,6 @@ public:
void OnCollapsed( wxDataViewEvent &event ); void OnCollapsed( wxDataViewEvent &event );
void OnSize( wxSizeEvent &event ); void OnSize( wxSizeEvent &event );
private:
void Init()
{
m_imageList = NULL;
}
wxImageList *m_imageList;
private: private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl)

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 2005-01-09 // Created: 2005-01-09
// RCS-ID: $Id: datectrl.h 61508 2009-07-23 20:30:22Z VZ $ // RCS-ID: $Id: datectrl.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -16,8 +16,7 @@
#if wxUSE_DATEPICKCTRL #if wxUSE_DATEPICKCTRL
#include "wx/control.h" // the base class #include "wx/datetimectrl.h" // the base class
#include "wx/datetime.h"
#define wxDatePickerCtrlNameStr wxT("datectrl") #define wxDatePickerCtrlNameStr wxT("datectrl")
@ -46,7 +45,7 @@ enum
// wxDatePickerCtrl: allow the user to enter the date // wxDatePickerCtrl: allow the user to enter the date
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxDateTimePickerCtrl
{ {
public: public:
/* /*
@ -63,23 +62,26 @@ public:
const wxString& name = wxDatePickerCtrlNameStr); const wxString& name = wxDatePickerCtrlNameStr);
*/ */
// set/get the date /*
virtual void SetValue(const wxDateTime& dt) = 0; We inherit the methods to set/get the date from the base class.
virtual wxDateTime GetValue() const = 0;
// set/get the allowed valid range for the dates, if either/both of them virtual void SetValue(const wxDateTime& dt) = 0;
// are invalid, there is no corresponding limit and if neither is set virtual wxDateTime GetValue() const = 0;
// GetRange() returns false */
// And add methods to set/get the allowed valid range for the dates. If
// either/both of them are invalid, there is no corresponding limit and if
// neither is set, GetRange() returns false.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0; virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0; virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
}; };
#if defined(__WXPALMOS__) #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/palmos/datectrl.h" #include "wx/msw/datectrl.h"
#define wxHAS_NATIVE_DATEPICKCTRL #define wxHAS_NATIVE_DATEPICKCTRL
#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__) #elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/datectrl.h" #include "wx/osx/datectrl.h"
#define wxHAS_NATIVE_DATEPICKCTRL #define wxHAS_NATIVE_DATEPICKCTRL
#else #else

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 2005-01-10 // Created: 2005-01-10
// RCS-ID: $Id: dateevt.h 58718 2009-02-07 18:59:25Z VZ $ // RCS-ID: $Id: dateevt.h 69224 2011-09-29 13:43:15Z VZ $
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -17,7 +17,7 @@
#include "wx/window.h" #include "wx/window.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl // wxDateEvent: used by wxCalendarCtrl, wxDatePickerCtrl and wxTimePickerCtrl.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
@ -48,6 +48,7 @@ private:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent);
typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&); typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
@ -57,5 +58,8 @@ typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
#define EVT_DATE_CHANGED(id, fn) \ #define EVT_DATE_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn)) wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
#define EVT_TIME_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn))
#endif // _WX_DATEEVT_H_ #endif // _WX_DATEEVT_H_

View File

@ -5,7 +5,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 10.02.99 // Created: 10.02.99
// RCS-ID: $Id: datetime.h 67280 2011-03-22 14:17:38Z DS $ // RCS-ID: $Id: datetime.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -19,7 +19,7 @@
#ifdef __WXWINCE__ #ifdef __WXWINCE__
#include "wx/msw/wince/time.h" #include "wx/msw/wince/time.h"
#elif !defined(__WXPALMOS5__) #else
#include <time.h> #include <time.h>
#endif // OS #endif // OS
@ -31,7 +31,7 @@
class WXDLLIMPEXP_FWD_BASE wxDateTime; class WXDLLIMPEXP_FWD_BASE wxDateTime;
class WXDLLIMPEXP_FWD_BASE wxTimeSpan; class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
class WXDLLIMPEXP_FWD_BASE wxDateSpan; class WXDLLIMPEXP_FWD_BASE wxDateSpan;
#ifdef __WXMSW__ #ifdef __WINDOWS__
struct _SYSTEMTIME; struct _SYSTEMTIME;
#endif #endif
@ -53,27 +53,6 @@ struct _SYSTEMTIME;
* 5. wxDateTimeHolidayAuthority for Easter and other christian feasts * 5. wxDateTimeHolidayAuthority for Easter and other christian feasts
*/ */
/* Two wrapper functions for thread safety */
#ifdef HAVE_LOCALTIME_R
#define wxLocaltime_r localtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
// On Windows, localtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
#endif
#endif
#ifdef HAVE_GMTIME_R
#define wxGmtime_r gmtime_r
#else
WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
// On Windows, gmtime _is_ threadsafe!
#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
#endif
#endif
/* /*
The three (main) classes declared in this header represent: The three (main) classes declared in this header represent:
@ -627,7 +606,7 @@ public:
wxDateTime_t minute = 0, wxDateTime_t minute = 0,
wxDateTime_t second = 0, wxDateTime_t second = 0,
wxDateTime_t millisec = 0); wxDateTime_t millisec = 0);
#ifdef __WXMSW__ #ifdef __WINDOWS__
wxDateTime(const struct _SYSTEMTIME& st) wxDateTime(const struct _SYSTEMTIME& st)
{ {
SetFromMSWSysTime(st); SetFromMSWSysTime(st);
@ -949,7 +928,7 @@ public:
// SYSTEMTIME format // SYSTEMTIME format
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
#ifdef __WXMSW__ #ifdef __WINDOWS__
// convert SYSTEMTIME to wxDateTime // convert SYSTEMTIME to wxDateTime
wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st); wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st);
@ -959,7 +938,7 @@ public:
// same as above but only take date part into account, time is always zero // same as above but only take date part into account, time is always zero
wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st); wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st);
void GetAsMSWSysDate(struct _SYSTEMTIME* st) const; void GetAsMSWSysDate(struct _SYSTEMTIME* st) const;
#endif // __WXMSW__ #endif // __WINDOWS__
// comparison (see also functions below for operator versions) // comparison (see also functions below for operator versions)
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------

View File

@ -0,0 +1,48 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/timectrl.h
// Purpose: Declaration of wxDateTimePickerCtrl class.
// Author: Vadim Zeitlin
// Created: 2011-09-22
// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DATETIME_CTRL_H_
#define _WX_DATETIME_CTRL_H_
#include "wx/defs.h"
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
#define wxNEEDS_DATETIMEPICKCTRL
#include "wx/control.h" // the base class
#include "wx/datetime.h"
// ----------------------------------------------------------------------------
// wxDateTimePickerCtrl: Private common base class of wx{Date,Time}PickerCtrl.
// ----------------------------------------------------------------------------
// This class is an implementation detail and should not be used directly, only
// use the documented API of wxDateTimePickerCtrl and wxTimePickerCtrl.
class WXDLLIMPEXP_ADV wxDateTimePickerCtrlBase : public wxControl
{
public:
// Set/get the date or time (in the latter case, time part is ignored).
virtual void SetValue(const wxDateTime& dt) = 0;
virtual wxDateTime GetValue() const = 0;
};
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/datetimectrl.h"
#elif defined(__WXOSX_COCOA__) && !defined(__WXUNIVERSAL__)
#include "wx/osx/datetimectrl.h"
#else
typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
#endif
#endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
#endif // _WX_DATETIME_CTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 05/25/99 // Created: 05/25/99
// RCS-ID: $Id: dc.h 67063 2011-02-27 12:48:13Z VZ $ // RCS-ID: $Id: dc.h 68935 2011-08-27 23:26:53Z RD $
// Copyright: (c) wxWidgets team // Copyright: (c) wxWidgets team
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -30,6 +30,7 @@
#include "wx/math.h" #include "wx/math.h"
#include "wx/image.h" #include "wx/image.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/affinematrix2d.h"
#define wxUSE_NEW_DC 1 #define wxUSE_NEW_DC 1
@ -42,6 +43,10 @@ class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC; class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
class WXDLLIMPEXP_FWD_CORE wxPrintData; class WXDLLIMPEXP_FWD_CORE wxPrintData;
#if wxUSE_GRAPHICS_CONTEXT
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
#endif
// Logical ops // Logical ops
enum wxRasterOperationMode enum wxRasterOperationMode
{ {
@ -470,7 +475,7 @@ public:
} }
virtual void SetLogicalScale(double x, double y); virtual void SetLogicalScale(double x, double y);
virtual void GetLogicalScale(double *x, double *y) virtual void GetLogicalScale(double *x, double *y) const
{ {
if ( x ) *x = m_logicalScaleX; if ( x ) *x = m_logicalScaleX;
if ( y ) *y = m_logicalScaleY; if ( y ) *y = m_logicalScaleY;
@ -490,6 +495,20 @@ public:
if ( y ) *y = m_deviceOriginY; if ( y ) *y = m_deviceOriginY;
} }
#if wxUSE_DC_TRANSFORM_MATRIX
// Transform matrix support is not available in most ports right now
// (currently only wxMSW provides it) so do nothing in these methods by
// default.
virtual bool CanUseTransformMatrix() const
{ return false; }
virtual bool SetTransformMatrix(const wxAffineMatrix2D& WXUNUSED(matrix))
{ return false; }
virtual wxAffineMatrix2D GetTransformMatrix() const
{ return wxAffineMatrix2D(); }
virtual void ResetTransformMatrix()
{ }
#endif // wxUSE_DC_TRANSFORM_MATRIX
virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y ); virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y );
virtual void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
@ -497,6 +516,19 @@ public:
// this needs to overidden if the axis is inverted // this needs to overidden if the axis is inverted
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
#ifdef __WXMSW__
// Native Windows functions using the underlying HDC don't honour GDI+
// transformations which may be applied to it. Using this function we can
// transform the coordinates manually before passing them to such functions
// (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a
// wxGCDC.
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const
{
return r;
}
#endif // __WXMSW__
// --------------------------------------------------------- // ---------------------------------------------------------
// the actual drawing API // the actual drawing API
@ -612,6 +644,13 @@ public:
virtual int GetResolution() const virtual int GetResolution() const
{ return -1; } { return -1; }
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* GetGraphicsContext() const
{ return NULL; }
virtual void SetGraphicsContext( wxGraphicsContext* WXUNUSED(ctx) )
{}
#endif
private: private:
wxDC *m_owner; wxDC *m_owner;
@ -981,7 +1020,7 @@ public:
void SetLogicalScale(double x, double y) void SetLogicalScale(double x, double y)
{ m_pimpl->SetLogicalScale( x, y ); } { m_pimpl->SetLogicalScale( x, y ); }
void GetLogicalScale(double *x, double *y) void GetLogicalScale(double *x, double *y) const
{ m_pimpl->GetLogicalScale( x, y ); } { m_pimpl->GetLogicalScale( x, y ); }
void SetLogicalOrigin(wxCoord x, wxCoord y) void SetLogicalOrigin(wxCoord x, wxCoord y)
@ -1001,6 +1040,20 @@ public:
void SetAxisOrientation(bool xLeftRight, bool yBottomUp) void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
{ m_pimpl->SetAxisOrientation(xLeftRight, yBottomUp); } { m_pimpl->SetAxisOrientation(xLeftRight, yBottomUp); }
#if wxUSE_DC_TRANSFORM_MATRIX
bool CanUseTransformMatrix() const
{ return m_pimpl->CanUseTransformMatrix(); }
bool SetTransformMatrix(const wxAffineMatrix2D &matrix)
{ return m_pimpl->SetTransformMatrix(matrix); }
wxAffineMatrix2D GetTransformMatrix() const
{ return m_pimpl->GetTransformMatrix(); }
void ResetTransformMatrix()
{ m_pimpl->ResetTransformMatrix(); }
#endif // wxUSE_DC_TRANSFORM_MATRIX
// mostly internal // mostly internal
void SetDeviceLocalOrigin( wxCoord x, wxCoord y ) void SetDeviceLocalOrigin( wxCoord x, wxCoord y )
{ m_pimpl->SetDeviceLocalOrigin( x, y ); } { m_pimpl->SetDeviceLocalOrigin( x, y ); }
@ -1287,6 +1340,17 @@ public:
TempHDC GetTempHDC() { return TempHDC(*this); } TempHDC GetTempHDC() { return TempHDC(*this); }
#endif // __WXMSW__ #endif // __WXMSW__
#if wxUSE_GRAPHICS_CONTEXT
virtual wxGraphicsContext* GetGraphicsContext() const
{
return m_pimpl->GetGraphicsContext();
}
virtual void SetGraphicsContext( wxGraphicsContext* ctx )
{
m_pimpl->SetGraphicsContext(ctx);
}
#endif
protected: protected:
// ctor takes ownership of the pointer // ctor takes ownership of the pointer
wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { } wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { }
@ -1315,13 +1379,13 @@ public:
~wxDCTextColourChanger() ~wxDCTextColourChanger()
{ {
if ( m_colFgOld.Ok() ) if ( m_colFgOld.IsOk() )
m_dc.SetTextForeground(m_colFgOld); m_dc.SetTextForeground(m_colFgOld);
} }
void Set(const wxColour& col) void Set(const wxColour& col)
{ {
if ( !m_colFgOld.Ok() ) if ( !m_colFgOld.IsOk() )
m_colFgOld = m_dc.GetTextForeground(); m_colFgOld = m_dc.GetTextForeground();
m_dc.SetTextForeground(col); m_dc.SetTextForeground(col);
} }
@ -1349,7 +1413,7 @@ public:
~wxDCPenChanger() ~wxDCPenChanger()
{ {
if ( m_penOld.Ok() ) if ( m_penOld.IsOk() )
m_dc.SetPen(m_penOld); m_dc.SetPen(m_penOld);
} }
@ -1376,7 +1440,7 @@ public:
~wxDCBrushChanger() ~wxDCBrushChanger()
{ {
if ( m_brushOld.Ok() ) if ( m_brushOld.IsOk() )
m_dc.SetBrush(m_brushOld); m_dc.SetBrush(m_brushOld);
} }
@ -1432,14 +1496,14 @@ public:
void Set(const wxFont& font) void Set(const wxFont& font)
{ {
if ( !m_fontOld.Ok() ) if ( !m_fontOld.IsOk() )
m_fontOld = m_dc.GetFont(); m_fontOld = m_dc.GetFont();
m_dc.SetFont(font); m_dc.SetFont(font);
} }
~wxDCFontChanger() ~wxDCFontChanger()
{ {
if ( m_fontOld.Ok() ) if ( m_fontOld.IsOk() )
m_dc.SetFont(m_fontOld); m_dc.SetFont(m_fontOld);
} }

View File

@ -5,7 +5,7 @@
// Modified by: // Modified by:
// Created: // Created:
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// RCS-ID: $Id: dcgraph.h 67254 2011-03-20 00:14:35Z DS $ // RCS-ID: $Id: dcgraph.h 68935 2011-08-27 23:26:53Z RD $
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -29,10 +29,15 @@ public:
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE
wxGCDC( const wxPrinterDC& dc ); wxGCDC( const wxPrinterDC& dc );
#endif #endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDC( const wxEnhMetaFileDC& dc );
#endif
wxGCDC(wxGraphicsContext* context);
wxGCDC(); wxGCDC();
virtual ~wxGCDC(); virtual ~wxGCDC();
wxGraphicsContext* GetGraphicsContext(); wxGraphicsContext* GetGraphicsContext() const;
void SetGraphicsContext( wxGraphicsContext* ctx ); void SetGraphicsContext( wxGraphicsContext* ctx );
#ifdef __WXMSW__ #ifdef __WXMSW__
@ -55,6 +60,9 @@ public:
wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ); wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc );
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE
wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ); wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc );
#endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc );
#endif #endif
wxGCDCImpl( wxDC *owner ); wxGCDCImpl( wxDC *owner );
@ -103,7 +111,7 @@ public:
virtual void ComputeScaleAndOrigin(); virtual void ComputeScaleAndOrigin();
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; } wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; }
virtual void SetGraphicsContext( wxGraphicsContext* ctx ); virtual void SetGraphicsContext( wxGraphicsContext* ctx );
// the true implementations // the true implementations
@ -193,6 +201,10 @@ public:
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
#ifdef __WXMSW__
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const;
#endif // __WXMSW__
protected: protected:
// scaling variables // scaling variables
bool m_logicalFunctionSupported; bool m_logicalFunctionSupported;

View File

@ -5,7 +5,7 @@
// Modified by: // Modified by:
// Created: // Created:
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// RCS-ID: $Id: dde.h 47254 2007-07-09 10:09:52Z VS $ // RCS-ID: $Id: dde.h 70808 2012-03-04 20:31:42Z VZ $
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -22,10 +22,10 @@ WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE);
WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE); WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE);
WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE); WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE);
#if defined(__WXMSW__) #if defined(__WINDOWS__)
#include "wx/msw/dde.h" #include "wx/msw/dde.h"
#else #else
#error DDE is only supported on MSW #error DDE is only supported under Windows
#endif #endif
#endif #endif

View File

@ -3,7 +3,7 @@
// Purpose: Misc debug functions and macros // Purpose: Misc debug functions and macros
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Created: 29/01/98 // Created: 29/01/98
// RCS-ID: $Id: debug.h 67280 2011-03-22 14:17:38Z DS $ // RCS-ID: $Id: debug.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) 1998-2009 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 1998-2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -11,7 +11,7 @@
#ifndef _WX_DEBUG_H_ #ifndef _WX_DEBUG_H_
#define _WX_DEBUG_H_ #define _WX_DEBUG_H_
#if !defined(__WXPALMOS5__) && !defined(__WXWINCE__) #if !defined(__WXWINCE__)
#include <assert.h> #include <assert.h>
#endif // systems without assert.h #endif // systems without assert.h
@ -162,7 +162,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); }
/* /*
wxOnAssert() is used by the debugging macros defined below. Different wxOnAssert() is used by the debugging macros defined below. Different
overloads are needed because these macros can be used with or without _T(). overloads are needed because these macros can be used with or without wxT().
All of them are implemented in src/common/appcmn.cpp and unconditionally All of them are implemented in src/common/appcmn.cpp and unconditionally
call wxTheAssertHandler so the caller must check that it is non-NULL call wxTheAssertHandler so the caller must check that it is non-NULL
@ -172,7 +172,7 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); }
#if wxUSE_UNICODE #if wxUSE_UNICODE
// these overloads are the ones typically used by debugging macros: we have to // these overloads are the ones typically used by debugging macros: we have to
// provide wxChar* msg version because it's common to use _T() in the macros // provide wxChar* msg version because it's common to use wxT() in the macros
// and finally, we can't use const wx(char)* msg = NULL, because that would // and finally, we can't use const wx(char)* msg = NULL, because that would
// be ambiguous // be ambiguous
// //
@ -299,6 +299,13 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file,
#define wxASSERT_LEVEL_2(cond) #define wxASSERT_LEVEL_2(cond)
#endif #endif
// This is simply a wrapper for the standard abort() which is not available
// under all platforms.
//
// It isn't really debug-related but there doesn't seem to be any better place
// for it, so declare it here and define it in appbase.cpp, together with
// wxTrap().
extern void WXDLLIMPEXP_BASE wxAbort();
/* /*
wxCHECK macros always check their conditions, setting debug level to 0 only wxCHECK macros always check their conditions, setting debug level to 0 only

View File

@ -4,7 +4,7 @@
* Author: Julian Smart and others * Author: Julian Smart and others
* Modified by: Ryan Norton (Converted to C) * Modified by: Ryan Norton (Converted to C)
* Created: 01/02/97 * Created: 01/02/97
* RCS-ID: $Id: defs.h 66711 2011-01-19 10:47:49Z VZ $ * RCS-ID: $Id: defs.h 70353 2012-01-15 14:46:41Z VZ $
* Copyright: (c) Julian Smart * Copyright: (c) Julian Smart
* Licence: wxWindows licence * Licence: wxWindows licence
*/ */
@ -14,8 +14,10 @@
#ifndef _WX_DEFS_H_ #ifndef _WX_DEFS_H_
#define _WX_DEFS_H_ #define _WX_DEFS_H_
// NOTE: this symbol will be replaced with "WXWIN_COMPATIBILITY_3_0" as soon /*
// as the development branch for 3.1 is created NOTE: this symbol will be replaced with "WXWIN_COMPATIBILITY_3_0" as soon
as the development branch for 3.1 is created
*/
#define FUTURE_WXWIN_COMPATIBILITY_3_0 1 #define FUTURE_WXWIN_COMPATIBILITY_3_0 1
#define wxDEPRECATED_FUTURE( x ) x #define wxDEPRECATED_FUTURE( x ) x
@ -29,11 +31,8 @@
/* Make sure the environment is set correctly */ /* Make sure the environment is set correctly */
# if defined(__WXMSW__) && defined(__X__) # if defined(__WXMSW__) && defined(__X__)
# error "Target can't be both X and Windows" # error "Target can't be both X and Windows"
# elif defined(__WXMSW__) && defined(__PALMOS__)
# error "Target can't be both PalmOS and Windows"
# elif !defined(__WXMOTIF__) && \ # elif !defined(__WXMOTIF__) && \
!defined(__WXMSW__) && \ !defined(__WXMSW__) && \
!defined(__WXPALMOS__)&& \
!defined(__WXGTK__) && \ !defined(__WXGTK__) && \
!defined(__WXPM__) && \ !defined(__WXPM__) && \
!defined(__WXOSX_CARBON__) && \ !defined(__WXOSX_CARBON__) && \
@ -41,7 +40,6 @@
!defined(__WXOSX_IPHONE__) && \ !defined(__WXOSX_IPHONE__) && \
!defined(__WXCOCOA__) && \ !defined(__WXCOCOA__) && \
!defined(__X__) && \ !defined(__X__) && \
!defined(__WXMGL__) && \
!defined(__WXDFB__) && \ !defined(__WXDFB__) && \
!defined(__WXX11__) && \ !defined(__WXX11__) && \
wxUSE_GUI wxUSE_GUI
@ -79,8 +77,10 @@
# pragma warning(disable:4514) /* unreferenced inline func has been removed */ # pragma warning(disable:4514) /* unreferenced inline func has been removed */
# pragma warning(disable:4710) /* function not inlined */ # pragma warning(disable:4710) /* function not inlined */
// TODO: this warning should really be enabled as it can be genuinely /*
// useful, check where does it occur in wxWidgets TODO: this warning should really be enabled as it can be genuinely
useful, check where does it occur in wxWidgets
*/
#pragma warning(disable: 4127) /* conditional expression is constant */ #pragma warning(disable: 4127) /* conditional expression is constant */
/* There are too many false positivies for this one, particularly when /* There are too many false positivies for this one, particularly when
@ -89,6 +89,16 @@
class 'bar'" */ class 'bar'" */
# pragma warning(disable:4251) # pragma warning(disable:4251)
/*
This is a similar warning which occurs when deriving from standard
containers. MSDN even mentions that it can be ignored in this case
(albeit only in debug build while the warning is the same in release
too and seems equally harmless).
*/
#if wxUSE_STD_CONTAINERS
# pragma warning(disable:4275)
#endif /* wxUSE_STD_CONTAINERS */
# ifdef __VISUALC5__ # ifdef __VISUALC5__
/* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */ /* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
/* is buggy, and occurs for code that does actually get executed */ /* is buggy, and occurs for code that does actually get executed */
@ -115,7 +125,7 @@
*/ */
#ifdef __VISUALC6__ #ifdef __VISUALC6__
#pragma warning(disable: 4284) #pragma warning(disable: 4284)
#endif // VC6 #endif /* VC6 */
/* /*
When compiling with VC++ 7 /Wp64 option we get thousands of warnings for When compiling with VC++ 7 /Wp64 option we get thousands of warnings for
@ -388,15 +398,15 @@ typedef short int WXTYPE;
#ifndef HAVE_WOSTREAM #ifndef HAVE_WOSTREAM
// Mingw <= 3.4 and all versions of Cygwin as well as any gcc version (so /*
// far) targeting PalmOS don't have std::wostream Mingw <= 3.4 and all versions of Cygwin don't have std::wostream
#if defined(__PALMOS__) || \ */
(defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \ #if (defined(__MINGW32__) && !wxCHECK_GCC_VERSION(4, 0)) || \
defined(__CYGWIN__) defined(__CYGWIN__)
#define wxNO_WOSTREAM #define wxNO_WOSTREAM
#endif #endif
// VC++ doesn't have it in the old iostream library /* VC++ doesn't have it in the old iostream library */
#if defined(__VISUALC__) && wxUSE_IOSTREAMH #if defined(__VISUALC__) && wxUSE_IOSTREAMH
#define wxNO_WOSTREAM #define wxNO_WOSTREAM
#endif #endif
@ -408,12 +418,12 @@ typedef short int WXTYPE;
#undef wxNO_WOSTREAM #undef wxNO_WOSTREAM
#endif /* HAVE_WOSTREAM */ #endif /* HAVE_WOSTREAM */
// ---------------------------------------------------------------------------- /* ---------------------------------------------------------------------------- */
// other C++ features /* other C++ features */
// ---------------------------------------------------------------------------- /* ---------------------------------------------------------------------------- */
#ifndef HAVE_PARTIAL_SPECIALIZATION #ifndef HAVE_PARTIAL_SPECIALIZATION
// be optimistic by default /* be optimistic by default */
#define HAVE_PARTIAL_SPECIALIZATION #define HAVE_PARTIAL_SPECIALIZATION
#endif #endif
@ -421,17 +431,17 @@ typedef short int WXTYPE;
#if __VISUALC__ < 1310 #if __VISUALC__ < 1310
#undef HAVE_PARTIAL_SPECIALIZATION #undef HAVE_PARTIAL_SPECIALIZATION
#endif #endif
#endif // __VISUALC__ #endif /* __VISUALC__ */
#ifndef HAVE_TEMPLATE_OVERLOAD_RESOLUTION #ifndef HAVE_TEMPLATE_OVERLOAD_RESOLUTION
// assume the compiler can use type or const expressions as template /* assume the compiler can use type or const expressions as template
// arguments if it supports partial specialization -- except if it's a arguments if it supports partial specialization -- except if it's a
// Borland one which can't Borland one which can't */
#if defined(HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__) #if defined(HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
#define HAVE_TEMPLATE_OVERLOAD_RESOLUTION #define HAVE_TEMPLATE_OVERLOAD_RESOLUTION
#endif // __BORLANDC__ #endif /* (HAVE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__) */
#endif // !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) #endif /* !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) */
/* ---------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- */
/* portable calling conventions macros */ /* portable calling conventions macros */
@ -513,15 +523,14 @@ typedef short int WXTYPE;
#define wxDEPRECATED(x) x #define wxDEPRECATED(x) x
#endif #endif
/* #if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4)
explicitly specifying inline allows gcc < 3.4 to /*
handle the deprecation attribute even in the constructor. We need to add dummy "inline" to allow gcc < 3.4 to handle the
doesn't seem to work on Apple's gcc 4.0.1 unless using -O0 deprecation attribute on the constructors.
*/ */
#if wxCHECK_GCC_VERSION(3, 4) || defined( __DARWIN__ )
#define wxDEPRECATED_CONSTRUCTOR(x) x
#else
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x) #define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED( inline x)
#else
#define wxDEPRECATED_CONSTRUCTOR(x) wxDEPRECATED(x)
#endif #endif
/* /*
@ -564,7 +573,7 @@ typedef short int WXTYPE;
/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */ /* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
/* it must not be defined as "(void *)0" which is standard for C but completely */ /* it must not be defined as "(void *)0" which is standard for C but completely */
/* breaks C++ code) */ /* breaks C++ code) */
#if !defined(__HANDHELDPC__) && !defined(__PALMOS__) #if !defined(__HANDHELDPC__)
#include <stddef.h> #include <stddef.h>
#endif #endif
@ -767,7 +776,7 @@ enum { wxDefaultCoord = -1 };
/* define fixed length types */ /* define fixed length types */
/* ---------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- */
#if defined(__WXPALMOS__) || defined(__MINGW32__) #if defined(__MINGW32__)
#if !defined(__MWERKS__) #if !defined(__MWERKS__)
#include <sys/types.h> #include <sys/types.h>
#endif #endif
@ -819,19 +828,7 @@ typedef wxUint16 wxWord;
*/ */
/* 32bit */ /* 32bit */
#ifdef __PALMOS__ #if defined(__WINDOWS__)
typedef int wxInt32;
typedef unsigned int wxUint32;
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_WCHAR_T 2
#define SIZEOF_SIZE_T 4
#ifdef __WXPALMOS6__
#define wxSIZE_T_IS_UINT
#endif
#define SIZEOF_VOID_P 4
#define SIZEOF_SIZE_T 4
#elif defined(__WINDOWS__)
#if defined(__WIN32__) #if defined(__WIN32__)
typedef int wxInt32; typedef int wxInt32;
typedef unsigned int wxUint32; typedef unsigned int wxUint32;
@ -1018,14 +1015,6 @@ typedef wxUint32 wxDword;
#error "The 64 bit integer support in CodeWarrior has been disabled." #error "The 64 bit integer support in CodeWarrior has been disabled."
#error "See the documentation on the 'longlong' pragma." #error "See the documentation on the 'longlong' pragma."
#endif #endif
#elif defined(__WXPALMOS__)
#if defined(__WXPALMOS6__)
#define wxLongLong_t int64_t
#else
#define wxLongLong_t long long
#endif /* __WXPALMOS6__ */
#define wxLongLongSuffix ll
#define wxLongLongFmtSpec "ll"
#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400 #elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
#define wxLongLong_t long long #define wxLongLong_t long long
#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \ #elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
@ -1045,16 +1034,7 @@ typedef wxUint32 wxDword;
#ifdef wxLongLong_t #ifdef wxLongLong_t
#define wxULongLong_t unsigned wxLongLong_t
#ifdef __WXPALMOS__
#if defined(__WXPALMOS6__)
#define wxULongLong_t uint64_t
#else
#define wxULongLong_t unsigned long long
#endif /* __WXPALMOS6__ */
#else
#define wxULongLong_t unsigned wxLongLong_t
#endif
/* /*
wxLL() and wxULL() macros allow to define 64 bit constants in a wxLL() and wxULL() macros allow to define 64 bit constants in a
@ -1064,8 +1044,10 @@ typedef wxUint32 wxDword;
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix) #define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix)) #define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
#else #else
// Currently only Borland compiler has broken concatenation operator /*
// and this compiler is known to use [u]i64 suffix. Currently only Borland compiler has broken concatenation operator
and this compiler is known to use [u]i64 suffix.
*/
#define wxLL(x) wxAPPEND_i64(x) #define wxLL(x) wxAPPEND_i64(x)
#define wxULL(x) wxAPPEND_ui64(x) #define wxULL(x) wxAPPEND_ui64(x)
#endif #endif
@ -1102,8 +1084,6 @@ typedef wxUint32 wxDword;
#if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED) #if defined(_SSIZE_T_) || defined(_SSIZE_T_DEFINED)
#define HAVE_SSIZE_T #define HAVE_SSIZE_T
#endif #endif
#elif defined(__PALMOS__)
#define HAVE_SSIZE_T
#elif wxCHECK_WATCOM_VERSION(1,4) #elif wxCHECK_WATCOM_VERSION(1,4)
#define HAVE_SSIZE_T #define HAVE_SSIZE_T
#endif #endif
@ -1114,7 +1094,7 @@ typedef wxUint32 wxDword;
#ifdef __UNIX__ #ifdef __UNIX__
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#else // !HAVE_SSIZE_T #else /* !HAVE_SSIZE_T */
#if SIZEOF_SIZE_T == 4 #if SIZEOF_SIZE_T == 4
typedef wxInt32 ssize_t; typedef wxInt32 ssize_t;
#elif SIZEOF_SIZE_T == 8 #elif SIZEOF_SIZE_T == 8
@ -1127,11 +1107,13 @@ typedef wxUint32 wxDword;
#define HAVE_SSIZE_T #define HAVE_SSIZE_T
#endif #endif
// we can't rely on Windows _W64 being defined as windows.h may not be included /*
// so define our own equivalent: this should be used with types like WXLPARAM We can't rely on Windows _W64 being defined as windows.h may not be
// or WXWPARAM which are 64 bit under Win64 to avoid warnings each time we cast included so define our own equivalent: this should be used with types
// it to a pointer or a handle (which results in hundreds of warnings as Win32 like WXLPARAM or WXWPARAM which are 64 bit under Win64 to avoid warnings
// API often passes pointers in them) each time we cast it to a pointer or a handle (which results in hundreds
of warnings as Win32 API often passes pointers in them)
*/
#if wxCHECK_VISUALC_VERSION(7) #if wxCHECK_VISUALC_VERSION(7)
#define wxW64 __w64 #define wxW64 __w64
#else #else
@ -1142,7 +1124,13 @@ typedef wxUint32 wxDword;
Define signed and unsigned integral types big enough to contain all of long, Define signed and unsigned integral types big enough to contain all of long,
size_t and void *. size_t and void *.
*/ */
#if SIZEOF_SIZE_T >= SIZEOF_VOID_P #if SIZEOF_LONG >= SIZEOF_VOID_P
/*
Normal case when long is the largest integral type.
*/
typedef long wxIntPtr;
typedef unsigned long wxUIntPtr;
#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
/* /*
Win64 case: size_t is the only integral type big enough for "void *". Win64 case: size_t is the only integral type big enough for "void *".
@ -1152,12 +1140,6 @@ typedef wxUint32 wxDword;
*/ */
typedef wxW64 ssize_t wxIntPtr; typedef wxW64 ssize_t wxIntPtr;
typedef size_t wxUIntPtr; typedef size_t wxUIntPtr;
#elif SIZEOF_LONG >= SIZEOF_VOID_P
/*
Normal case when long is the largest integral type.
*/
typedef long wxIntPtr;
typedef unsigned long wxUIntPtr;
#else #else
/* /*
This should never happen for the current architectures but if you're This should never happen for the current architectures but if you're
@ -1447,12 +1429,12 @@ typedef double wxDouble;
/* ---------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------- */
#if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3, 4 ) #if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3, 4 )
// GCC <= 3.4 has buggy template support /* GCC <= 3.4 has buggy template support */
# define wxUSE_MEMBER_TEMPLATES 0 # define wxUSE_MEMBER_TEMPLATES 0
#endif #endif
#if defined(_MSC_VER) && _MSC_VER <= 1200 #if defined(_MSC_VER) && _MSC_VER <= 1200
// MSVC <= 6.0 has buggy template support /* MSVC <= 6.0 has buggy template support */
# define wxUSE_MEMBER_TEMPLATES 0 # define wxUSE_MEMBER_TEMPLATES 0
# define wxUSE_FUNC_TEMPLATE_POINTER 0 # define wxUSE_FUNC_TEMPLATE_POINTER 0
#endif #endif
@ -1532,9 +1514,11 @@ enum wxDirection
enum wxAlignment enum wxAlignment
{ {
// 0 is a valid wxAlignment value (both wxALIGN_LEFT and wxALIGN_TOP use /*
// it) so define a symbolic name for an invalid alignment value which can 0 is a valid wxAlignment value (both wxALIGN_LEFT and wxALIGN_TOP
// be assumed to be different from anything else use it) so define a symbolic name for an invalid alignment value
which can be assumed to be different from anything else
*/
wxALIGN_INVALID = -1, wxALIGN_INVALID = -1,
wxALIGN_NOT = 0x0000, wxALIGN_NOT = 0x0000,
@ -1557,10 +1541,12 @@ enum wxAlignment
/* misc. flags for wxSizer items */ /* misc. flags for wxSizer items */
enum wxSizerFlagBits enum wxSizerFlagBits
{ {
// wxADJUST_MINSIZE doesn't do anything any more but we still define it for /*
// compatibility. Notice that it may be also predefined (as 0, hopefully) wxADJUST_MINSIZE doesn't do anything any more but we still define
// in the user code in order to use it even in !WXWIN_COMPATIBILITY_2_8 it for compatibility. Notice that it may be also predefined (as 0,
// builds so don't redefine it in such case. hopefully) in the user code in order to use it even in
!WXWIN_COMPATIBILITY_2_8 builds so don't redefine it in such case.
*/
#if WXWIN_COMPATIBILITY_2_8 && !defined(wxADJUST_MINSIZE) #if WXWIN_COMPATIBILITY_2_8 && !defined(wxADJUST_MINSIZE)
wxADJUST_MINSIZE = 0, wxADJUST_MINSIZE = 0,
#endif #endif
@ -1848,14 +1834,12 @@ enum wxBorder
/* Old names for compatibility */ /* Old names for compatibility */
#define wxRA_HORIZONTAL wxHORIZONTAL #define wxRA_HORIZONTAL wxHORIZONTAL
#define wxRA_VERTICAL wxVERTICAL #define wxRA_VERTICAL wxVERTICAL
#define wxRA_USE_CHECKBOX 0x0010 /* alternative native subcontrols (wxPalmOS) */
/* /*
* wxRadioButton style flag * wxRadioButton style flag
*/ */
#define wxRB_GROUP 0x0004 #define wxRB_GROUP 0x0004
#define wxRB_SINGLE 0x0008 #define wxRB_SINGLE 0x0008
#define wxRB_USE_CHECKBOX 0x0010 /* alternative native control (wxPalmOS) */
/* /*
* wxScrollBar flags * wxScrollBar flags
@ -1929,12 +1913,12 @@ enum wxBorder
#define wxICON_STOP wxICON_HAND #define wxICON_STOP wxICON_HAND
#define wxICON_ASTERISK wxICON_INFORMATION #define wxICON_ASTERISK wxICON_INFORMATION
#define wxFORWARD 0x00001000 #define wxHELP 0x00001000
#define wxBACKWARD 0x00002000 #define wxFORWARD 0x00002000
#define wxRESET 0x00004000 #define wxBACKWARD 0x00004000
#define wxHELP 0x00008000 #define wxRESET 0x00008000
#define wxMORE 0x00010000 #define wxMORE 0x00010000
#define wxSETUP 0x00020000 #define wxSETUP 0x00020000
#define wxICON_NONE 0x00040000 #define wxICON_NONE 0x00040000
#define wxICON_MASK \ #define wxICON_MASK \
@ -1945,29 +1929,37 @@ enum wxBorder
*/ */
enum wxBackgroundStyle enum wxBackgroundStyle
{ {
// background is erased in the EVT_ERASE_BACKGROUND handler or using the /*
// system default background if no such handler is defined (this is the background is erased in the EVT_ERASE_BACKGROUND handler or using
// default style) the system default background if no such handler is defined (this
is the default style)
*/
wxBG_STYLE_ERASE, wxBG_STYLE_ERASE,
// background is erased by the system, no EVT_ERASE_BACKGROUND event is /*
// generated at all background is erased by the system, no EVT_ERASE_BACKGROUND event
is generated at all
*/
wxBG_STYLE_SYSTEM, wxBG_STYLE_SYSTEM,
// background is erased in EVT_PAINT handler and not erased at all before /*
// it, this should be used if the paint handler paints over the entire background is erased in EVT_PAINT handler and not erased at all
// window to avoid flicker before it, this should be used if the paint handler paints over
the entire window to avoid flicker
*/
wxBG_STYLE_PAINT, wxBG_STYLE_PAINT,
// this is a Mac-only style, don't use in portable code /* this is a Mac-only style, don't use in portable code */
wxBG_STYLE_TRANSPARENT, wxBG_STYLE_TRANSPARENT,
// this style is deprecated and doesn't do anything, don't use /* this style is deprecated and doesn't do anything, don't use */
wxBG_STYLE_COLOUR, wxBG_STYLE_COLOUR,
// this style is deprecated and is synonymous with wxBG_STYLE_PAINT, use /*
// the new name this style is deprecated and is synonymous with
wxBG_STYLE_PAINT, use the new name
*/
wxBG_STYLE_CUSTOM = wxBG_STYLE_PAINT wxBG_STYLE_CUSTOM = wxBG_STYLE_PAINT
}; };
@ -2203,6 +2195,18 @@ enum wxItemKind
wxITEM_MAX wxITEM_MAX
}; };
/*
* The possible states of a 3-state checkbox (Compatible
* with the 2-state checkbox).
*/
enum wxCheckBoxState
{
wxCHK_UNCHECKED,
wxCHK_CHECKED,
wxCHK_UNDETERMINED /* 3-state checkbox only */
};
/* hit test results */ /* hit test results */
enum wxHitTest enum wxHitTest
{ {
@ -2297,7 +2301,7 @@ enum wxDeprecatedGUIConstants
wxTRANSPARENT, wxTRANSPARENT,
/* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */ /* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */
/* Note also that stippling a Pen IS meaningfull, because a Line is */ /* Note also that stippling a Pen IS meaningful, because a Line is */
wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */ wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */
wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */ wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */
/* drawn with a Pen, and without any Brush -- and it can be stippled. */ /* drawn with a Pen, and without any Brush -- and it can be stippled. */
@ -2354,7 +2358,34 @@ enum wxKeyCode
{ {
WXK_NONE = 0, WXK_NONE = 0,
WXK_BACK = 8, // backspace WXK_CONTROL_A = 1,
WXK_CONTROL_B,
WXK_CONTROL_C,
WXK_CONTROL_D,
WXK_CONTROL_E,
WXK_CONTROL_F,
WXK_CONTROL_G,
WXK_CONTROL_H,
WXK_CONTROL_I,
WXK_CONTROL_J,
WXK_CONTROL_K,
WXK_CONTROL_L,
WXK_CONTROL_M,
WXK_CONTROL_N,
WXK_CONTROL_O,
WXK_CONTROL_P,
WXK_CONTROL_Q,
WXK_CONTROL_R,
WXK_CONTROL_S,
WXK_CONTROL_T,
WXK_CONTROL_U,
WXK_CONTROL_V,
WXK_CONTROL_W,
WXK_CONTROL_X,
WXK_CONTROL_Y,
WXK_CONTROL_Z,
WXK_BACK = 8, /* backspace */
WXK_TAB = 9, WXK_TAB = 9,
WXK_RETURN = 13, WXK_RETURN = 13,
WXK_ESCAPE = 27, WXK_ESCAPE = 27,
@ -2477,7 +2508,12 @@ enum wxKeyCode
WXK_WINDOWS_LEFT, WXK_WINDOWS_LEFT,
WXK_WINDOWS_RIGHT, WXK_WINDOWS_RIGHT,
WXK_WINDOWS_MENU , WXK_WINDOWS_MENU ,
WXK_COMMAND, #ifdef __WXOSX__
WXK_RAW_CONTROL,
#else
WXK_RAW_CONTROL = WXK_CONTROL,
#endif
WXK_COMMAND = WXK_CONTROL,
/* Hardware-specific buttons */ /* Hardware-specific buttons */
WXK_SPECIAL1 = 193, WXK_SPECIAL1 = 193,
@ -2513,10 +2549,11 @@ enum wxKeyModifier
wxMOD_META = 0x0008, wxMOD_META = 0x0008,
wxMOD_WIN = wxMOD_META, wxMOD_WIN = wxMOD_META,
#if defined(__WXMAC__) || defined(__WXCOCOA__) #if defined(__WXMAC__) || defined(__WXCOCOA__)
wxMOD_CMD = wxMOD_META, wxMOD_RAW_CONTROL = 0x0010,
#else #else
wxMOD_CMD = wxMOD_CONTROL, wxMOD_RAW_CONTROL = wxMOD_CONTROL,
#endif #endif
wxMOD_CMD = wxMOD_CONTROL,
wxMOD_ALL = 0xffff wxMOD_ALL = 0xffff
}; };
@ -2733,7 +2770,7 @@ typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
#endif #endif
#if defined(__CYGWIN__) && defined(__WXMSW__) #if defined(__CYGWIN__) && defined(__WXMSW__)
# if wxUSE_STL || defined(wxUSE_STD_STRING) # if wxUSE_STD_CONTAINERS || defined(wxUSE_STD_STRING)
/* /*
NASTY HACK because the gethostname in sys/unistd.h which the gnu NASTY HACK because the gethostname in sys/unistd.h which the gnu
stl includes and wx builds with by default clash with each other stl includes and wx builds with by default clash with each other
@ -2786,7 +2823,7 @@ typedef void* WXDisplay;
typedef const void * CFTypeRef; typedef const void * CFTypeRef;
// typedef const struct __CFString * CFStringRef; /* typedef const struct __CFString * CFStringRef; */
#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref; #define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref;
#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref; #define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref;
@ -2964,42 +3001,7 @@ typedef WX_NSString* WXGLPixelFormat;
#endif #endif
#endif // __WXMAC__ #endif /* __WXMAC__ */
#if defined(__WXPALMOS__)
typedef void * WXHWND;
typedef void * WXHANDLE;
typedef void * WXHICON;
typedef void * WXHFONT;
typedef void * WXHMENU;
typedef void * WXHPEN;
typedef void * WXHBRUSH;
typedef void * WXHPALETTE;
typedef void * WXHCURSOR;
typedef void * WXHRGN;
typedef void * WXHACCEL;
typedef void * WXHINSTANCE;
typedef void * WXHBITMAP;
typedef void * WXHIMAGELIST;
typedef void * WXHGLOBAL;
typedef void * WXHDC;
typedef unsigned int WXUINT;
typedef unsigned long WXDWORD;
typedef unsigned short WXWORD;
typedef unsigned long WXCOLORREF;
typedef struct tagMSG WXMSG;
typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
typedef WXWINHANDLE WXWidget;
typedef void * WXFORMPTR;
typedef void * WXEVENTPTR;
typedef void * WXRECTANGLEPTR;
#endif /* __WXPALMOS__ */
/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */ /* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
#if defined(__WIN32__) #if defined(__WIN32__)
@ -3208,53 +3210,45 @@ typedef long WXPixel; /* safety catch in src/motif/colour.cpp */
#ifdef __WXGTK__ #ifdef __WXGTK__
/* Stand-ins for GLIB types */ /* Stand-ins for GLIB types */
typedef char gchar;
typedef signed char gint8;
typedef int gint;
typedef unsigned guint;
typedef unsigned long gulong;
typedef void* gpointer;
typedef struct _GSList GSList; typedef struct _GSList GSList;
/* Stand-ins for GDK types */ /* Stand-ins for GDK types */
typedef struct _GdkColor GdkColor; typedef struct _GdkColor GdkColor;
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkVisual GdkVisual;
#ifdef __WXGTK20__
typedef struct _GdkAtom *GdkAtom;
typedef struct _GdkDrawable GdkWindow;
typedef struct _GdkDrawable GdkBitmap;
typedef struct _GdkDrawable GdkPixmap;
#else /* GTK+ 1.2 */
typedef gulong GdkAtom;
typedef struct _GdkWindow GdkWindow;
typedef struct _GdkWindow GdkBitmap;
typedef struct _GdkWindow GdkPixmap;
#endif /* GTK+ 1.2/2.0 */
typedef struct _GdkCursor GdkCursor; typedef struct _GdkCursor GdkCursor;
typedef struct _GdkRegion GdkRegion;
typedef struct _GdkDragContext GdkDragContext; typedef struct _GdkDragContext GdkDragContext;
#ifdef HAVE_XIM #if defined(__WXGTK20__)
typedef struct _GdkIC GdkIC; typedef struct _GdkAtom* GdkAtom;
typedef struct _GdkICAttr GdkICAttr; #else
typedef unsigned long GdkAtom;
#endif
#if !defined(__WXGTK30__)
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkFont GdkFont;
typedef struct _GdkGC GdkGC;
typedef struct _GdkRegion GdkRegion;
#endif
#if defined(__WXGTK30__)
typedef struct _GdkWindow GdkWindow;
#elif defined(__WXGTK20__)
typedef struct _GdkDrawable GdkWindow;
typedef struct _GdkDrawable GdkPixmap;
#else
typedef struct _GdkWindow GdkWindow;
typedef struct _GdkWindow GdkBitmap;
typedef struct _GdkWindow GdkPixmap;
#endif #endif
/* Stand-ins for GTK types */ /* Stand-ins for GTK types */
typedef struct _GtkWidget GtkWidget; typedef struct _GtkWidget GtkWidget;
typedef struct _GtkRcStyle GtkRcStyle; typedef struct _GtkRcStyle GtkRcStyle;
typedef struct _GtkAdjustment GtkAdjustment; typedef struct _GtkAdjustment GtkAdjustment;
typedef struct _GtkList GtkList;
typedef struct _GtkToolbar GtkToolbar; typedef struct _GtkToolbar GtkToolbar;
typedef struct _GtkTooltips GtkTooltips;
typedef struct _GtkNotebook GtkNotebook; typedef struct _GtkNotebook GtkNotebook;
typedef struct _GtkNotebookPage GtkNotebookPage; typedef struct _GtkNotebookPage GtkNotebookPage;
typedef struct _GtkAccelGroup GtkAccelGroup; typedef struct _GtkAccelGroup GtkAccelGroup;
typedef struct _GtkItemFactory GtkItemFactory;
typedef struct _GtkSelectionData GtkSelectionData; typedef struct _GtkSelectionData GtkSelectionData;
typedef struct _GtkTextBuffer GtkTextBuffer; typedef struct _GtkTextBuffer GtkTextBuffer;
typedef struct _GtkRange GtkRange; typedef struct _GtkRange GtkRange;
@ -3282,10 +3276,6 @@ typedef struct _PangoLayout PangoLayout;
typedef struct _PangoFontDescription PangoFontDescription; typedef struct _PangoFontDescription PangoFontDescription;
#endif #endif
#ifdef __WXMGL__
typedef struct window_t *WXWidget;
#endif /* MGL */
#ifdef __WXDFB__ #ifdef __WXDFB__
/* DirectFB doesn't have the concept of non-TLW window, so use /* DirectFB doesn't have the concept of non-TLW window, so use
something arbitrary */ something arbitrary */
@ -3328,7 +3318,7 @@ typedef const void* WXWidget;
private: \ private: \
classname& operator=(const classname&) classname& operator=(const classname&)
// deprecated variants _not_ requiring a semicolon after them /* deprecated variants _not_ requiring a semicolon after them */
#define DECLARE_NO_COPY_CLASS(classname) \ #define DECLARE_NO_COPY_CLASS(classname) \
wxDECLARE_NO_COPY_CLASS(classname); wxDECLARE_NO_COPY_CLASS(classname);
#define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \ #define DECLARE_NO_COPY_TEMPLATE_CLASS(classname, arg) \

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 29.06.99 // Created: 29.06.99
// RCS-ID: $Id: dialog.h 66087 2010-11-10 13:51:57Z VZ $ // RCS-ID: $Id: dialog.h 70345 2012-01-15 01:05:28Z VZ $
// Copyright: (c) Vadim Zeitlin // Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -26,7 +26,7 @@ class wxTextSizerWrapper;
// Also see the bit summary table in wx/toplevel.h. // Also see the bit summary table in wx/toplevel.h.
#define wxDIALOG_NO_PARENT 0x0100 // Don't make owned by apps top window #define wxDIALOG_NO_PARENT 0x00000020 // Don't make owned by apps top window
#ifdef __WXWINCE__ #ifdef __WXWINCE__
#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER) #define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)
@ -350,9 +350,7 @@ public:
#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__) #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
#include "wx/univ/dialog.h" #include "wx/univ/dialog.h"
#else #else
#if defined(__WXPALMOS__) #if defined(__WXMSW__)
#include "wx/palmos/dialog.h"
#elif defined(__WXMSW__)
#include "wx/msw/dialog.h" #include "wx/msw/dialog.h"
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/dialog.h" #include "wx/motif/dialog.h"
@ -394,5 +392,8 @@ typedef void (wxEvtHandler::*wxWindowModalDialogEventFunction)(wxWindowModalDial
#define wxWindowModalDialogEventHandler(func) \ #define wxWindowModalDialogEventHandler(func) \
wxEVENT_HANDLER_CAST(wxWindowModalDialogEventFunction, func) wxEVENT_HANDLER_CAST(wxWindowModalDialogEventFunction, func)
#define EVT_WINDOW_MODAL_DIALOG_CLOSED(winid, func) \
wx__DECLARE_EVT1(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, winid, wxWindowModalDialogEventHandler(func))
#endif #endif
// _WX_DIALOG_H_BASE_ // _WX_DIALOG_H_BASE_

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 07.07.99 // Created: 07.07.99
// RCS-ID: $Id: dialup.h 58757 2009-02-08 11:45:59Z VZ $ // RCS-ID: $Id: dialup.h 67384 2011-04-03 20:31:32Z DS $
// Copyright: (c) Vadim Zeitlin // Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -171,7 +171,7 @@ public:
bool IsConnectedEvent() const bool IsConnectedEvent() const
{ return GetEventType() == wxEVT_DIALUP_CONNECTED; } { return GetEventType() == wxEVT_DIALUP_CONNECTED; }
// does this event come from wxDialUpManager::Dial() or from some extrenal // does this event come from wxDialUpManager::Dial() or from some external
// process (i.e. does it result from our own attempt to establish the // process (i.e. does it result from our own attempt to establish the
// connection)? // connection)?
bool IsOwnEvent() const { return m_id != 0; } bool IsOwnEvent() const { return m_id != 0; }

View File

@ -5,7 +5,7 @@
// Modified by: // Modified by:
// Created: // Created:
// Copyright: (c) Robert Roebling // Copyright: (c) Robert Roebling
// RCS-ID: $Id: dirdlg.h 54125 2008-06-11 19:17:41Z SC $ // RCS-ID: $Id: dirdlg.h 70353 2012-01-15 14:46:41Z VZ $
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -116,9 +116,7 @@ protected:
#include "wx/cocoa/dirdlg.h" // Native Cocoa #include "wx/cocoa/dirdlg.h" // Native Cocoa
#elif defined(__WXMOTIF__) || \ #elif defined(__WXMOTIF__) || \
defined(__WXX11__) || \ defined(__WXX11__) || \
defined(__WXMGL__) || \
defined(__WXCOCOA__) || \ defined(__WXCOCOA__) || \
defined(__WXPALMOS__) || \
defined(__WXPM__) defined(__WXPM__)
#include "wx/generic/dirdlgg.h" // Other ports use generic implementation #include "wx/generic/dirdlgg.h" // Other ports use generic implementation
#define wxDirDialog wxGenericDirDialog #define wxDirDialog wxGenericDirDialog

View File

@ -4,7 +4,7 @@
* Author: Vadim Zeitlin * Author: Vadim Zeitlin
* Modified by: * Modified by:
* Created: 16.10.2003 (extracted from wx/defs.h) * Created: 16.10.2003 (extracted from wx/defs.h)
* RCS-ID: $Id: dlimpexp.h 61944 2009-09-16 12:06:02Z PJC $ * RCS-ID: $Id: dlimpexp.h 69049 2011-09-10 18:09:12Z SJL $
* Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> * Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence * Licence: wxWindows licence
*/ */
@ -22,14 +22,25 @@
#elif defined(__WINDOWS__) #elif defined(__WINDOWS__)
/* /*
__declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
as VC++ and gcc as VC++.
*/ */
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__) # if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
# define WXEXPORT __declspec(dllexport) # define WXEXPORT __declspec(dllexport)
# define WXIMPORT __declspec(dllimport) # define WXIMPORT __declspec(dllimport)
# else /* compiler doesn't support __declspec() */ /*
# define WXEXPORT While gcc also supports __declspec(dllexport), it creates unusably huge
# define WXIMPORT DLL files since gcc 4.5 (while taking horribly long amounts of time),
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601. Because of this
we rely on binutils auto export/import support which seems to work
quite well for 4.5+.
*/
# elif defined(__GNUC__) && !wxCHECK_GCC_VERSION(4, 5)
/*
__declspec could be used here too but let's use the native
__attribute__ instead for clarity.
*/
# define WXEXPORT __attribute__((dllexport))
# define WXIMPORT __attribute__((dllimport))
# endif # endif
#elif defined(__WXPM__) #elif defined(__WXPM__)
# if defined (__WATCOMC__) # if defined (__WATCOMC__)
@ -91,6 +102,7 @@
# define WXMAKINGDLL_RICHTEXT # define WXMAKINGDLL_RICHTEXT
# define WXMAKINGDLL_MEDIA # define WXMAKINGDLL_MEDIA
# define WXMAKINGDLL_STC # define WXMAKINGDLL_STC
# define WXMAKINGDLL_WEBVIEW
#endif /* WXMAKINGDLL */ #endif /* WXMAKINGDLL */
/* /*
@ -263,6 +275,17 @@
# define WXDLLIMPEXP_DATA_STC(type) type # define WXDLLIMPEXP_DATA_STC(type) type
#endif #endif
#ifdef WXMAKINGDLL_WEBVIEW
# define WXDLLIMPEXP_WEBVIEW WXEXPORT
# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXEXPORT type
#elif defined(WXUSINGDLL)
# define WXDLLIMPEXP_WEBVIEW WXIMPORT
# define WXDLLIMPEXP_DATA_WEBVIEW(type) WXIMPORT type
#else /* not making nor using DLL */
# define WXDLLIMPEXP_WEBVIEW
# define WXDLLIMPEXP_DATA_WEBVIEW(type) type
#endif
/* /*
GCC warns about using __attribute__ (and also __declspec in mingw32 case) on GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
forward declarations while MSVC complains about forward declarations without forward declarations while MSVC complains about forward declarations without
@ -284,6 +307,7 @@
#define WXDLLIMPEXP_FWD_RICHTEXT #define WXDLLIMPEXP_FWD_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA #define WXDLLIMPEXP_FWD_MEDIA
#define WXDLLIMPEXP_FWD_STC #define WXDLLIMPEXP_FWD_STC
#define WXDLLIMPEXP_FWD_WEBVIEW
#else #else
#define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE #define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
#define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET #define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
@ -299,6 +323,7 @@
#define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
#define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
#define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
#define WXDLLIMPEXP_FWD_WEBVIEW WXDLLIMPEXP_WEBVIEW
#endif #endif
/* for backwards compatibility, define suffix-less versions too */ /* for backwards compatibility, define suffix-less versions too */

View File

@ -13,7 +13,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/utils.h" #include "wx/utils.h"
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
#include "wx/beforestd.h" #include "wx/beforestd.h"
#include <algorithm> #include <algorithm>
@ -199,7 +199,7 @@ public:
} }
}; };
#else // STL #else // !wxUSE_STD_CONTAINERS
template <typename T> template <typename T>
class wxDList class wxDList
@ -845,6 +845,6 @@ public:
} */ } */
}; };
#endif // wxUSE_STL/!wxUSE_STL #endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
#endif // _WX_DLIST_H_ #endif // _WX_DLIST_H_

View File

@ -4,7 +4,7 @@
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id: docview.h 67280 2011-03-22 14:17:38Z DS $ // RCS-ID: $Id: docview.h 70098 2011-12-23 05:59:59Z PC $
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -17,6 +17,7 @@
#if wxUSE_DOC_VIEW_ARCHITECTURE #if wxUSE_DOC_VIEW_ARCHITECTURE
#include "wx/list.h" #include "wx/list.h"
#include "wx/dlist.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/filehistory.h" #include "wx/filehistory.h"
@ -172,6 +173,10 @@ public:
// dialogs. Override if necessary. // dialogs. Override if necessary.
virtual wxWindow *GetDocumentWindow() const; virtual wxWindow *GetDocumentWindow() const;
// Returns true if this document is a child document corresponding to a
// part of the parent document and not a disk file as usual.
bool IsChildDocument() const { return m_documentParent != NULL; }
protected: protected:
wxList m_documentViews; wxList m_documentViews;
wxString m_documentFile; wxString m_documentFile;
@ -179,7 +184,12 @@ protected:
wxString m_documentTypeName; wxString m_documentTypeName;
wxDocTemplate* m_documentTemplate; wxDocTemplate* m_documentTemplate;
bool m_documentModified; bool m_documentModified;
// if the document parent is non-NULL, it's a pseudo-document corresponding
// to a part of the parent document which can't be saved or loaded
// independently of its parent and is always closed when its parent is
wxDocument* m_documentParent; wxDocument* m_documentParent;
wxCommandProcessor* m_commandProcessor; wxCommandProcessor* m_commandProcessor;
bool m_savedYet; bool m_savedYet;
@ -193,6 +203,10 @@ protected:
wxString DoGetUserReadableName() const; wxString DoGetUserReadableName() const;
private: private:
// list of all documents whose m_documentParent is this one
typedef wxDList<wxDocument> DocsList;
DocsList m_childDocuments;
DECLARE_ABSTRACT_CLASS(wxDocument) DECLARE_ABSTRACT_CLASS(wxDocument)
wxDECLARE_NO_COPY_CLASS(wxDocument); wxDECLARE_NO_COPY_CLASS(wxDocument);
}; };
@ -386,6 +400,7 @@ public:
void OnUpdateFileRevert(wxUpdateUIEvent& event); void OnUpdateFileRevert(wxUpdateUIEvent& event);
void OnUpdateFileNew(wxUpdateUIEvent& event); void OnUpdateFileNew(wxUpdateUIEvent& event);
void OnUpdateFileSave(wxUpdateUIEvent& event); void OnUpdateFileSave(wxUpdateUIEvent& event);
void OnUpdateFileSaveAs(wxUpdateUIEvent& event);
void OnUpdateUndo(wxUpdateUIEvent& event); void OnUpdateUndo(wxUpdateUIEvent& event);
void OnUpdateRedo(wxUpdateUIEvent& event); void OnUpdateRedo(wxUpdateUIEvent& event);
@ -474,6 +489,13 @@ public:
// Get the current document manager // Get the current document manager
static wxDocManager* GetDocumentManager() { return sm_docManager; } static wxDocManager* GetDocumentManager() { return sm_docManager; }
#if wxUSE_PRINTING_ARCHITECTURE
wxPageSetupDialogData& GetPageSetupDialogData()
{ return m_pageSetupDialogData; }
const wxPageSetupDialogData& GetPageSetupDialogData() const
{ return m_pageSetupDialogData; }
#endif // wxUSE_PRINTING_ARCHITECTURE
#if WXWIN_COMPATIBILITY_2_8 #if WXWIN_COMPATIBILITY_2_8
// deprecated, override GetDefaultName() instead // deprecated, override GetDefaultName() instead
wxDEPRECATED_BUT_USED_INTERNALLY( wxDEPRECATED_BUT_USED_INTERNALLY(
@ -488,6 +510,11 @@ public:
protected: protected:
// Called when a file selected from the MRU list doesn't exist any more.
// The default behaviour is to remove the file from the MRU and notify the
// user about it but this method can be overridden to customize it.
virtual void OnMRUFileNotExist(unsigned n, const wxString& filename);
// Open the MRU file with the given index in our associated file history. // Open the MRU file with the given index in our associated file history.
void DoOpenMRUFile(unsigned n); void DoOpenMRUFile(unsigned n);
#if wxUSE_PRINTING_ARCHITECTURE #if wxUSE_PRINTING_ARCHITECTURE
@ -959,7 +986,7 @@ wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
// these flags are not used anywhere by wxWidgets and kept only for an unlikely // these flags are not used anywhere by wxWidgets and kept only for an unlikely
// case of existing user code using them for its own purposes // case of existing user code using them for its own purposes
#ifdef WXWIN_COMPATIBILITY_2_8 #if WXWIN_COMPATIBILITY_2_8
enum enum
{ {
wxDOC_SDI = 1, wxDOC_SDI = 1,

View File

@ -3,7 +3,7 @@
// Purpose: Declare all wxDataViewCtrl classes // Purpose: Declare all wxDataViewCtrl classes
// Author: Robert Roebling, Vadim Zeitlin // Author: Robert Roebling, Vadim Zeitlin
// Created: 2009-11-08 (extracted from wx/dataview.h) // Created: 2009-11-08 (extracted from wx/dataview.h)
// RCS-ID: $Id: dvrenderers.h 67099 2011-03-01 12:16:49Z VS $ // RCS-ID: $Id: dvrenderers.h 70050 2011-12-19 12:54:38Z VZ $
// Copyright: (c) 2006 Robert Roebling // Copyright: (c) 2006 Robert Roebling
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org> // (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
@ -54,6 +54,21 @@ public:
void SetIcon( const wxIcon &icon ) { m_icon = icon; } void SetIcon( const wxIcon &icon ) { m_icon = icon; }
const wxIcon &GetIcon() const { return m_icon; } const wxIcon &GetIcon() const { return m_icon; }
bool IsSameAs(const wxDataViewIconText& other) const
{
return m_text == other.m_text && m_icon.IsSameAs(other.m_icon);
}
bool operator==(const wxDataViewIconText& other) const
{
return IsSameAs(other);
}
bool operator!=(const wxDataViewIconText& other) const
{
return !IsSameAs(other);
}
private: private:
wxString m_text; wxString m_text;
wxIcon m_icon; wxIcon m_icon;
@ -61,19 +76,6 @@ private:
DECLARE_DYNAMIC_CLASS(wxDataViewIconText) DECLARE_DYNAMIC_CLASS(wxDataViewIconText)
}; };
inline
bool operator==(const wxDataViewIconText& left, const wxDataViewIconText& right)
{
return left.GetText() == right.GetText() &&
left.GetIcon().IsSameAs(right.GetIcon());
}
inline
bool operator!=(const wxDataViewIconText& left, const wxDataViewIconText& right)
{
return !(left == right);
}
DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV) DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -145,11 +147,11 @@ public:
// in-place editing // in-place editing
virtual bool HasEditorCtrl() const virtual bool HasEditorCtrl() const
{ return false; } { return false; }
virtual wxControl* CreateEditorCtrl(wxWindow * WXUNUSED(parent), virtual wxWindow* CreateEditorCtrl(wxWindow * WXUNUSED(parent),
wxRect WXUNUSED(labelRect), wxRect WXUNUSED(labelRect),
const wxVariant& WXUNUSED(value)) const wxVariant& WXUNUSED(value))
{ return NULL; } { return NULL; }
virtual bool GetValueFromEditorCtrl(wxControl * WXUNUSED(editor), virtual bool GetValueFromEditorCtrl(wxWindow * WXUNUSED(editor),
wxVariant& WXUNUSED(value)) wxVariant& WXUNUSED(value))
{ return false; } { return false; }
@ -157,7 +159,7 @@ public:
virtual void CancelEditing(); virtual void CancelEditing();
virtual bool FinishEditing(); virtual bool FinishEditing();
wxControl *GetEditorCtrl() { return m_editorCtrl; } wxWindow *GetEditorCtrl() { return m_editorCtrl; }
virtual bool IsCustomRenderer() const { return false; } virtual bool IsCustomRenderer() const { return false; }
@ -168,11 +170,12 @@ protected:
wxString m_variantType; wxString m_variantType;
wxDataViewColumn *m_owner; wxDataViewColumn *m_owner;
wxWeakRef<wxControl> m_editorCtrl; wxWeakRef<wxWindow> m_editorCtrl;
wxDataViewItem m_item; // for m_editorCtrl wxDataViewItem m_item; // for m_editorCtrl
// internal utility: // internal utility, may be used anywhere the window associated with the
const wxDataViewCtrl* GetView() const; // renderer is required
wxDataViewCtrl* GetView() const;
protected: protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase) DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
@ -225,23 +228,32 @@ public:
// Return the size of the item appropriate to its current value. // Return the size of the item appropriate to its current value.
virtual wxSize GetSize() const = 0; virtual wxSize GetSize() const = 0;
// Define virtual function which are called when the item is activated // Define virtual function which are called when a key is pressed on the
// (double-clicked or Enter is pressed on it), clicked or the user starts // item, clicked or the user starts to drag it: by default they all simply
// to drag it: by default they all simply return false indicating that the // return false indicating that the events are not handled
// events are not handled
virtual bool Activate(const wxRect& WXUNUSED(cell), virtual bool ActivateCell(const wxRect& cell,
wxDataViewModel *WXUNUSED(model), wxDataViewModel *model,
const wxDataViewItem & WXUNUSED(item), const wxDataViewItem & item,
unsigned int WXUNUSED(col)) unsigned int col,
{ return false; } const wxMouseEvent* mouseEvent);
virtual bool LeftClick(const wxPoint& WXUNUSED(cursor), // Deprecated, use (and override) ActivateCell() instead
const wxRect& WXUNUSED(cell), wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
wxDataViewModel *WXUNUSED(model), virtual bool Activate(wxRect WXUNUSED(cell),
const wxDataViewItem & WXUNUSED(item), wxDataViewModel *WXUNUSED(model),
unsigned int WXUNUSED(col) ) const wxDataViewItem & WXUNUSED(item),
{ return false; } unsigned int WXUNUSED(col)),
return false; )
// Deprecated, use (and override) ActivateCell() instead
wxDEPRECATED_BUT_USED_INTERNALLY_INLINE(
virtual bool LeftClick(wxPoint WXUNUSED(cursor),
wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col)),
return false; )
virtual bool StartDrag(const wxPoint& WXUNUSED(cursor), virtual bool StartDrag(const wxPoint& WXUNUSED(cursor),
const wxRect& WXUNUSED(cell), const wxRect& WXUNUSED(cell),
@ -278,6 +290,9 @@ public:
// platform-specific classes. // platform-specific classes.
virtual wxDC *GetDC() = 0; virtual wxDC *GetDC() = 0;
// To draw background use the background colour in wxDataViewItemAttr
virtual void RenderBackground(wxDC* dc, const wxRect& rect);
// Prepare DC to use attributes and call Render(). // Prepare DC to use attributes and call Render().
void WXCallRender(wxRect rect, wxDC *dc, int state); void WXCallRender(wxRect rect, wxDC *dc, int state);
@ -322,8 +337,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT ); int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual bool HasEditorCtrl() const { return true; } virtual bool HasEditorCtrl() const { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool Render( wxRect rect, wxDC *dc, int state ); virtual bool Render( wxRect rect, wxDC *dc, int state );
virtual wxSize GetSize() const; virtual wxSize GetSize() const;
virtual bool SetValue( const wxVariant &value ); virtual bool SetValue( const wxVariant &value );
@ -347,8 +362,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT ); int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual bool HasEditorCtrl() const { return true; } virtual bool HasEditorCtrl() const { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool Render( wxRect rect, wxDC *dc, int state ); virtual bool Render( wxRect rect, wxDC *dc, int state );
virtual wxSize GetSize() const; virtual wxSize GetSize() const;
virtual bool SetValue( const wxVariant &value ); virtual bool SetValue( const wxVariant &value );
@ -373,8 +388,8 @@ public:
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT ); int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual wxWindow* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxWindow* editor, wxVariant &value );
virtual bool SetValue( const wxVariant &value ); virtual bool SetValue( const wxVariant &value );
virtual bool GetValue( wxVariant &value ) const; virtual bool GetValue( wxVariant &value ) const;
@ -383,6 +398,37 @@ public:
#endif // generic or Carbon versions #endif // generic or Carbon versions
#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXGTK__)
// ----------------------------------------------------------------------------
// wxDataViewDateRenderer
// ----------------------------------------------------------------------------
#if wxUSE_DATEPICKCTRL
class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer
{
public:
wxDataViewDateRenderer(const wxString &varianttype = wxT("datetime"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int align = wxDVR_DEFAULT_ALIGNMENT);
virtual bool HasEditorCtrl() const { return true; }
virtual wxWindow *CreateEditorCtrl(wxWindow *parent, wxRect labelRect, const wxVariant &value);
virtual bool GetValueFromEditorCtrl(wxWindow* editor, wxVariant &value);
virtual bool SetValue(const wxVariant &value);
virtual bool GetValue(wxVariant& value) const;
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
private:
wxDateTime m_date;
};
#else // !wxUSE_DATEPICKCTRL
typedef wxDataViewTextRenderer wxDataViewDateRenderer;
#endif
#endif // generic or GTK+ versions
// this class is obsolete, its functionality was merged in // this class is obsolete, its functionality was merged in
// wxDataViewTextRenderer itself now, don't use it any more // wxDataViewTextRenderer itself now, don't use it any more
#define wxDataViewTextRendererAttr wxDataViewTextRenderer #define wxDataViewTextRendererAttr wxDataViewTextRenderer

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 12.09.97 // Created: 12.09.97
// RCS-ID: $Id: dynarray.h 56600 2008-10-30 15:57:18Z VZ $ // RCS-ID: $Id: dynarray.h 69688 2011-11-05 15:20:32Z VS $
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -14,7 +14,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
#include "wx/beforestd.h" #include "wx/beforestd.h"
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
@ -81,7 +81,7 @@ typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
// you cast "SomeArray *" as "BaseArray *" and then delete it) // you cast "SomeArray *" as "BaseArray *" and then delete it)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
template<class T> template<class T>
class wxArray_SortFunction class wxArray_SortFunction
@ -151,7 +151,7 @@ public: \
e = rend(); \ e = rend(); \
for ( const_reverse_iterator i = b; i != e; ++i ) \ for ( const_reverse_iterator i = b; i != e; ++i ) \
if ( *i == item ) \ if ( *i == item ) \
return (int)(i - b); \ return (int)(e - i - 1); \
} \ } \
else \ else \
{ \ { \
@ -203,12 +203,12 @@ public: \
} \ } \
} }
#else // if !wxUSE_STL #else // if !wxUSE_STD_CONTAINERS
#define _WX_DECLARE_BASEARRAY(T, name, classexp) \ #define _WX_DECLARE_BASEARRAY(T, name, classexp) \
classexp name \ classexp name \
{ \ { \
typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STL */ \ typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STD_CONTAINERS */ \
public: \ public: \
name(); \ name(); \
name(const name& array); \ name(const name& array); \
@ -307,7 +307,7 @@ private: \
T *m_pItems; \ T *m_pItems; \
} }
#endif // !wxUSE_STL #endif // !wxUSE_STD_CONTAINERS
// ============================================================================ // ============================================================================
// The private helper macros containing the core of the array classes // The private helper macros containing the core of the array classes
@ -325,7 +325,7 @@ private: \
// _WX_DEFINE_TYPEARRAY: array for simple types // _WX_DEFINE_TYPEARRAY: array for simple types
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_STL #if wxUSE_STD_CONTAINERS
// in STL case we don't need the entire base arrays hack as standard container // in STL case we don't need the entire base arrays hack as standard container
// don't suffer from alignment/storage problems as our home-grown do // don't suffer from alignment/storage problems as our home-grown do
@ -335,7 +335,7 @@ private: \
#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \ #define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
_WX_DEFINE_TYPEARRAY(T, name, base, classexp) _WX_DEFINE_TYPEARRAY(T, name, base, classexp)
#else // if !wxUSE_STL #else // if !wxUSE_STD_CONTAINERS
// common declaration used by both _WX_DEFINE_TYPEARRAY and // common declaration used by both _WX_DEFINE_TYPEARRAY and
// _WX_DEFINE_TYPEARRAY_PTR // _WX_DEFINE_TYPEARRAY_PTR
@ -505,7 +505,7 @@ public: \
#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \ #define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
_WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE) _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE)
#endif // !wxUSE_STL #endif // !wxUSE_STD_CONTAINERS
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types // _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types
@ -546,6 +546,8 @@ public: \
\ \
size_t Add(T lItem) \ size_t Add(T lItem) \
{ return base::Add(lItem, (CMPFUNC)m_fnCompare); } \ { return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
void push_back(T lItem) \
{ Add(lItem); } \
\ \
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \ void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
{ base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \ { base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
@ -636,7 +638,7 @@ private: \
// that wants to export a wxArray daubed with your own import/export goo. // that wants to export a wxArray daubed with your own import/export goo.
// //
// Finally, you can define the macro below as something special to modify the // Finally, you can define the macro below as something special to modify the
// arrays defined by a simple WX_FOO_ARRAY as well. By default is is empty. // arrays defined by a simple WX_FOO_ARRAY as well. By default is empty.
#define wxARRAY_DEFAULT_EXPORT #define wxARRAY_DEFAULT_EXPORT
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
// Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik // Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik
// Modified by: // Modified by:
// Created: 20/07/98 // Created: 20/07/98
// RCS-ID: $Id: dynlib.h 64139 2010-04-25 12:07:37Z VS $ // RCS-ID: $Id: dynlib.h 70796 2012-03-04 00:29:31Z VZ $
// Copyright: (c) 1998 Guilhem Lavaux // Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -123,14 +123,14 @@ enum wxPluginCategory
#define wxDL_INIT_FUNC(pfx, name, dynlib) \ #define wxDL_INIT_FUNC(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name) pfx ## name = (name ## _t)(dynlib).RawGetSymbol(#name)
#ifdef __WXMSW__ #ifdef __WINDOWS__
// same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see // same as wxDL_INIT_FUNC() but appends 'A' or 'W' to the function name, see
// wxDynamicLibrary::GetSymbolAorW() // wxDynamicLibrary::GetSymbolAorW()
#define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \ #define wxDL_INIT_FUNC_AW(pfx, name, dynlib) \
pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name) pfx ## name = (name ## _t)(dynlib).GetSymbolAorW(#name)
#endif // __WXMSW__ #endif // __WINDOWS__
// the following macros can be used to redirect a whole library to a class and // the following macros can be used to redirect a whole library to a class and
// check at run-time if the library is present and contains all required // check at run-time if the library is present and contains all required
@ -304,7 +304,7 @@ public:
#endif #endif
} }
#ifdef __WXMSW__ #ifdef __WINDOWS__
// this function is useful for loading functions from the standard Windows // this function is useful for loading functions from the standard Windows
// DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or // DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
// wide character build) suffix if they take string parameters // wide character build) suffix if they take string parameters
@ -326,7 +326,7 @@ public:
{ {
return RawGetSymbolAorW(m_handle, name); return RawGetSymbolAorW(m_handle, name);
} }
#endif // __WXMSW__ #endif // __WINDOWS__
// return all modules/shared libraries in the address space of this process // return all modules/shared libraries in the address space of this process
// //
@ -349,7 +349,7 @@ public:
static wxString GetPluginsDirectory(); static wxString GetPluginsDirectory();
#ifdef __WXMSW__ #ifdef __WINDOWS__
// return the handle (HMODULE/HINSTANCE) of the DLL with the given name // return the handle (HMODULE/HINSTANCE) of the DLL with the given name
// and/or containing the specified address: for XP and later systems only // and/or containing the specified address: for XP and later systems only
// the address is used and the name is ignored but for the previous systems // the address is used and the name is ignored but for the previous systems
@ -360,7 +360,7 @@ public:
// need to be freed using FreeLibrary() but it also means that it can // need to be freed using FreeLibrary() but it also means that it can
// become invalid if the DLL is unloaded // become invalid if the DLL is unloaded
static WXHMODULE MSWGetModuleHandle(const char *name, void *addr); static WXHMODULE MSWGetModuleHandle(const char *name, void *addr);
#endif // __WXMSW__ #endif // __WINDOWS__
protected: protected:
// common part of GetSymbol() and HasSymbol() // common part of GetSymbol() and HasSymbol()
@ -383,7 +383,7 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary); wxDECLARE_NO_COPY_CLASS(wxDynamicLibrary);
}; };
#ifdef __WXMSW__ #ifdef __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind // wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind
@ -404,7 +404,7 @@ public:
} }
}; };
#endif // __WXMSW__ #endif // __WINDOWS__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Interesting defines // Interesting defines

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 19.09.2003 (extracted from wx/fontenc.h) // Created: 19.09.2003 (extracted from wx/fontenc.h)
// RCS-ID: $Id: encinfo.h 52834 2008-03-26 15:06:00Z FM $ // RCS-ID: $Id: encinfo.h 70353 2012-01-15 14:46:41Z VZ $
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence // Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -35,7 +35,6 @@
struct WXDLLIMPEXP_CORE wxNativeEncodingInfo struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
{ {
wxString facename; // may be empty meaning "any" wxString facename; // may be empty meaning "any"
#ifndef __WXPALMOS__
wxFontEncoding encoding; // so that we know what this struct represents wxFontEncoding encoding; // so that we know what this struct represents
#if defined(__WXMSW__) || \ #if defined(__WXMSW__) || \
@ -55,12 +54,9 @@ struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
xencoding; xencoding;
#elif defined(wxHAS_UTF8_FONTS) #elif defined(wxHAS_UTF8_FONTS)
// ports using UTF-8 for text don't need encoding information for fonts // ports using UTF-8 for text don't need encoding information for fonts
#elif defined(__WXMGL__)
int mglEncoding;
#else #else
#error "Unsupported toolkit" #error "Unsupported toolkit"
#endif #endif
#endif // !__WXPALMOS__
// this struct is saved in config by wxFontMapper, so it should know to // this struct is saved in config by wxFontMapper, so it should know to
// serialise itself (implemented in platform-specific code) // serialise itself (implemented in platform-specific code)
bool FromString(const wxString& s); bool FromString(const wxString& s);

Some files were not shown because too many files have changed in this diff Show More