mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
added WebWidgets
This commit is contained in:
parent
9661e08347
commit
6c80fe82c1
@ -37,7 +37,7 @@
|
|||||||
// Categories
|
// Categories
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Values are 32 bit values laid out as follows:
|
// Values are 32 bit values layed out as follows:
|
||||||
//
|
//
|
||||||
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||||
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||||
@ -77,7 +77,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Fatal
|
// Fatal
|
||||||
//
|
//
|
||||||
#define POCO_CTG_FATAL 0x00000001L
|
#define POCO_CTG_FATAL 0x00000001L
|
||||||
|
|
||||||
@ -86,7 +86,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Critical
|
// Critical
|
||||||
//
|
//
|
||||||
#define POCO_CTG_CRITICAL 0x00000002L
|
#define POCO_CTG_CRITICAL 0x00000002L
|
||||||
|
|
||||||
@ -95,7 +95,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Error
|
// Error
|
||||||
//
|
//
|
||||||
#define POCO_CTG_ERROR 0x00000003L
|
#define POCO_CTG_ERROR 0x00000003L
|
||||||
|
|
||||||
@ -104,7 +104,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Warning
|
// Warning
|
||||||
//
|
//
|
||||||
#define POCO_CTG_WARNING 0x00000004L
|
#define POCO_CTG_WARNING 0x00000004L
|
||||||
|
|
||||||
@ -113,7 +113,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Notice
|
// Notice
|
||||||
//
|
//
|
||||||
#define POCO_CTG_NOTICE 0x00000005L
|
#define POCO_CTG_NOTICE 0x00000005L
|
||||||
|
|
||||||
@ -122,7 +122,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Information
|
// Information
|
||||||
//
|
//
|
||||||
#define POCO_CTG_INFORMATION 0x00000006L
|
#define POCO_CTG_INFORMATION 0x00000006L
|
||||||
|
|
||||||
@ -131,7 +131,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Debug
|
// Debug
|
||||||
//
|
//
|
||||||
#define POCO_CTG_DEBUG 0x00000007L
|
#define POCO_CTG_DEBUG 0x00000007L
|
||||||
|
|
||||||
@ -140,7 +140,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// Trace
|
// Trace
|
||||||
//
|
//
|
||||||
#define POCO_CTG_TRACE 0x00000008L
|
#define POCO_CTG_TRACE 0x00000008L
|
||||||
|
|
||||||
@ -152,7 +152,7 @@
|
|||||||
//
|
//
|
||||||
// MessageText:
|
// MessageText:
|
||||||
//
|
//
|
||||||
// %1
|
// %1
|
||||||
//
|
//
|
||||||
#define POCO_MSG_LOG 0x00001000L
|
#define POCO_MSG_LOG 0x00001000L
|
||||||
|
|
||||||
|
30
WebWidgets/ExtJS/ExtJS_VS71.sln
Normal file
30
WebWidgets/ExtJS/ExtJS_VS71.sln
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtJS", "ExtJS_VS71.vcproj", "{19fa461f-7419-4653-8a6b-b93002f7db14}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_VS71.vcproj", "{ab43a995-70fa-4297-bd01-6c88938aa86d}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{19fa461f-7419-4653-8a6b-b93002f7db14} = {19fa461f-7419-4653-8a6b-b93002f7db14}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
|
debug_shared = debug_shared
|
||||||
|
release_shared = release_shared
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
|
{19fa461f-7419-4653-8a6b-b93002f7db14}.debug_shared.ActiveCfg = debug_shared|Win32
|
||||||
|
{19fa461f-7419-4653-8a6b-b93002f7db14}.debug_shared.Build.0 = debug_shared|Win32
|
||||||
|
{19fa461f-7419-4653-8a6b-b93002f7db14}.release_shared.ActiveCfg = release_shared|Win32
|
||||||
|
{19fa461f-7419-4653-8a6b-b93002f7db14}.release_shared.Build.0 = release_shared|Win32
|
||||||
|
{ab43a995-70fa-4297-bd01-6c88938aa86d}.debug_shared.ActiveCfg = debug_shared|Win32
|
||||||
|
{ab43a995-70fa-4297-bd01-6c88938aa86d}.debug_shared.Build.0 = debug_shared|Win32
|
||||||
|
{ab43a995-70fa-4297-bd01-6c88938aa86d}.release_shared.ActiveCfg = release_shared|Win32
|
||||||
|
{ab43a995-70fa-4297-bd01-6c88938aa86d}.release_shared.Build.0 = release_shared|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
163
WebWidgets/ExtJS/ExtJS_VS71.vcproj
Normal file
163
WebWidgets/ExtJS/ExtJS_VS71.vcproj
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="ExtJS"
|
||||||
|
ProjectGUID="{19fa461f-7419-4653-8a6b-b93002f7db14}"
|
||||||
|
RootNamespace="ExtJS"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;POCO_DLL;ExtJS_EXPORTS"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="TRUE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
CompileAs="0"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundationd.lib"
|
||||||
|
OutputFile="..\bin\PocoExtJSd.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
AdditionalLibraryDirectories="..\lib"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="..\bin\PocoExtJSd.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeForWindows98="1"
|
||||||
|
ImportLibrary="..\lib\PocoExtJSd.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="TRUE"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="TRUE"
|
||||||
|
OptimizeForProcessor="3"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;POCO_DLL;ExtJS_EXPORTS"
|
||||||
|
GeneratePreprocessedFile="0"
|
||||||
|
KeepComments="FALSE"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="FALSE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundation.lib"
|
||||||
|
OutputFile="..\bin\PocoExtJS.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
AdditionalLibraryDirectories="..\lib"
|
||||||
|
GenerateDebugInformation="FALSE"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
OptimizeForWindows98="1"
|
||||||
|
ImportLibrary="..\lib\PocoExtJS.lib"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="ExtJS"
|
||||||
|
Filter="">
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\ExtJS\ExtJS.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="">
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
28
WebWidgets/ExtJS/ExtJS_VS80.sln
Normal file
28
WebWidgets/ExtJS/ExtJS_VS80.sln
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExtJS", "ExtJS_VS80.vcproj", "{19FA461F-7419-4653-8A6B-B93002F7DB14}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_VS80.vcproj", "{AB43A995-70FA-4297-BD01-6C88938AA86D}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{19FA461F-7419-4653-8A6B-B93002F7DB14} = {19FA461F-7419-4653-8A6B-B93002F7DB14}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{19FA461F-7419-4653-8A6B-B93002F7DB14}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{19FA461F-7419-4653-8A6B-B93002F7DB14}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{19FA461F-7419-4653-8A6B-B93002F7DB14}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{19FA461F-7419-4653-8A6B-B93002F7DB14}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{AB43A995-70FA-4297-BD01-6C88938AA86D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{AB43A995-70FA-4297-BD01-6C88938AA86D}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{AB43A995-70FA-4297-BD01-6C88938AA86D}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{AB43A995-70FA-4297-BD01-6C88938AA86D}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
501
WebWidgets/ExtJS/ExtJS_VS80.vcproj
Normal file
501
WebWidgets/ExtJS/ExtJS_VS80.vcproj
Normal file
@ -0,0 +1,501 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="ExtJS"
|
||||||
|
ProjectGUID="{19fa461f-7419-4653-8a6b-b93002f7db14}"
|
||||||
|
RootNamespace="ExtJS"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\WebWidgets\include;..\..\Net\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;POCO_DLL;ExtJS_EXPORTS"
|
||||||
|
StringPooling="true"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
CompileAs="0"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundationd.lib"
|
||||||
|
OutputFile="..\..\bin\PocoExtJSd.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="..\..\bin\PocoExtJSd.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeForWindows98="1"
|
||||||
|
ImportLibrary="..\..\lib\PocoExtJSd.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\Foundation\include;..\..\WebWidgets\include;..\..\Net\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;POCO_DLL;ExtJS_EXPORTS"
|
||||||
|
GeneratePreprocessedFile="0"
|
||||||
|
KeepComments="false"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="0"
|
||||||
|
CompileAs="0"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundation.lib"
|
||||||
|
OutputFile="..\..\bin\PocoExtJS.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
OptimizeForWindows98="1"
|
||||||
|
ImportLibrary="..\..\lib\PocoExtJS.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Core"
|
||||||
|
>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\AbstractTableCellHandler.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\CellInitializer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\CellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\CheckButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\CollapsibleRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ComboBoxCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\DateFieldCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ExtJS.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\FormRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\FrameRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\GridLayoutRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\HorizontalLayoutRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\HTMLRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ImageButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ImageRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\LabelRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\LayoutRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ListBoxCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\NumberFieldCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\PageRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\PanelRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\PasswordFieldCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ProgressIndicatorRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\RadioButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\SubmitButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TableCellHandler.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TableCellHandlerFactory.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TableRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TabViewRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TextEditCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TextFieldCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\TimeFieldCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\ToggleButtonCellRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\Utility.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\WebWidgets\ExtJS\VerticalLayoutRenderer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\AbstractTableCellHandler.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\CellInitializer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\CellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\CheckButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\CollapsibleRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ComboBoxCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\DateFieldCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\FormRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\FrameRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\GridLayoutRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\HorizontalLayoutRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\HTMLRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ImageButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ImageRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\LabelRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\LayoutRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ListBoxCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumberFieldCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PageRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PanelRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\PasswordFieldCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ProgressIndicatorRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\RadioButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\SubmitButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TableCellHandlerFactory.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TableRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TabViewRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TextEditCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TextFieldCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\TimeFieldCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ToggleButtonCellRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Utility.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\VerticalLayoutRenderer.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
17
WebWidgets/ExtJS/Makefile
Normal file
17
WebWidgets/ExtJS/Makefile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
# $Id: //poco/Main/template/library.make#3 $
|
||||||
|
#
|
||||||
|
# Makefile for Poco ExtJS
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
objects = <SourceFilesHere>
|
||||||
|
|
||||||
|
target = PocoExtJS
|
||||||
|
target_version = $(LIBVERSION)
|
||||||
|
target_libs = PocoFoundation
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/lib
|
@ -0,0 +1,112 @@
|
|||||||
|
//
|
||||||
|
// AbstractTableCellHandler.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/AbstractTableCellHandler.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: AbstractTableCellHandler
|
||||||
|
//
|
||||||
|
// Definition of the AbstractTableCellHandler class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_AbstractTableCellHandler_INCLUDED
|
||||||
|
#define ExtJS_AbstractTableCellHandler_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/RefCountedObject.h"
|
||||||
|
#include "Poco/AutoPtr.h"
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Cell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API AbstractTableCellHandler: public RefCountedObject
|
||||||
|
/// AbstractTableCellHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef AutoPtr<AbstractTableCellHandler> Ptr;
|
||||||
|
|
||||||
|
AbstractTableCellHandler(bool editor, bool renderer);
|
||||||
|
/// Creates an AbstractTableCellHandler
|
||||||
|
|
||||||
|
virtual ~AbstractTableCellHandler();
|
||||||
|
/// Destroys an AbstractTableCellHandler
|
||||||
|
|
||||||
|
virtual void addFixed(const std::string& name, const std::string& fixedContent) = 0;
|
||||||
|
/// Adds a variable with a given fixed string content. The content will not be wrapped
|
||||||
|
/// with ' ' but will be written as is
|
||||||
|
|
||||||
|
virtual void writeData(const void* pObj, std::ostream& out) = 0;
|
||||||
|
/// Writes the content of the table used to dynamically
|
||||||
|
/// initialize Table Columns
|
||||||
|
|
||||||
|
virtual void writeDynamicData(std::ostream& out) = 0;
|
||||||
|
/// Writes the Javascript callback function
|
||||||
|
|
||||||
|
virtual AbstractTableCellHandler* clone() const = 0;
|
||||||
|
/// Creates a deep-copy of the object
|
||||||
|
|
||||||
|
virtual void init(const Cell* pCell) = 0;
|
||||||
|
/// Initializes the TableCellHandler according to the cell
|
||||||
|
|
||||||
|
bool useEditor() const;
|
||||||
|
/// Returns true if we need to use the editor when the class is editable
|
||||||
|
|
||||||
|
bool useRenderer() const;
|
||||||
|
/// Returns true if we need to use a custom renderer to display the object
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool _editor;
|
||||||
|
bool _renderer;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline bool AbstractTableCellHandler::useEditor() const
|
||||||
|
{
|
||||||
|
return _editor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool AbstractTableCellHandler::useRenderer() const
|
||||||
|
{
|
||||||
|
return _renderer;
|
||||||
|
}
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_AbstractTableCellHandler_INCLUDED
|
@ -0,0 +1,84 @@
|
|||||||
|
//
|
||||||
|
// ButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ButtonCellRenderer.h#5 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_ButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class ButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ButtonCellRenderer: public CellRenderer
|
||||||
|
/// ButtonCellRenderer renders a button
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ButtonCellRenderer();
|
||||||
|
/// Creates the ButtonCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
|
||||||
|
void renderCell(const Cell* pCell, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// writes ConfigData, is a simple string
|
||||||
|
|
||||||
|
static void renderProperties(const ButtonCell* pCell, const std::string& content, bool writeId, bool submitButton, std::ostream& ostr, bool showText = true);
|
||||||
|
/// Renders button properties
|
||||||
|
|
||||||
|
static void renderButton(const ButtonCell* pCell, const std::string& content, bool writeId, bool submitButton, std::ostream& ostr, bool showText = true);
|
||||||
|
/// Renders button properties
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~ButtonCellRenderer();
|
||||||
|
/// Destroys the ButtonCellRenderer.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ButtonCellRenderer_INCLUDED
|
@ -0,0 +1,86 @@
|
|||||||
|
//
|
||||||
|
// CellInitializer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/CellInitializer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CellInitializer
|
||||||
|
//
|
||||||
|
// Definition of the CellInitializer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_CellInitializer_INCLUDED
|
||||||
|
#define ExtJS_CellInitializer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Cell;
|
||||||
|
class ToggleButtonCell;
|
||||||
|
class CheckButtonCell;
|
||||||
|
class TextEditCell;
|
||||||
|
class TextFieldCell;
|
||||||
|
class ComboBoxCell;
|
||||||
|
class ButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
class AbstractTableCellHandler;
|
||||||
|
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const Cell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Generic Initializer for Cells
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const ToggleButtonCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the ToggleButtonCell
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const CheckButtonCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the CheckButtonCell
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const TextEditCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the TextEditCell
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const TextFieldCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the TextFieldCell
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const ButtonCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the ComboBoxCell
|
||||||
|
|
||||||
|
void ExtJS_API cellInitializer(const ComboBoxCell* pCell, AbstractTableCellHandler* pHandler);
|
||||||
|
/// Inits the handler according to the ComboBoxCell
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_CellInitializer_INCLUDED
|
@ -0,0 +1,88 @@
|
|||||||
|
//
|
||||||
|
// CellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/CellRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the CellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_CellRenderer_INCLUDED
|
||||||
|
#define ExtJS_CellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Cell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API CellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// CellRenderer extends Renderer with methods needed to render Cells inside tables
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CellRenderer();
|
||||||
|
/// Creates the CellRenderer.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
virtual void renderCell(const Cell* pCell, const RenderContext& context, std::ostream& ostr) = 0;
|
||||||
|
/// Renders a cell inside a Table, the cell is initialized with a variable named var
|
||||||
|
/// The config data inside this variable (single field or array) depends on the
|
||||||
|
/// writeConfigData method
|
||||||
|
|
||||||
|
virtual void writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr) = 0;
|
||||||
|
/// Writes configuration data to the outputstream (e.g.: a CheckBox needs a label and a checked state.
|
||||||
|
/// writes -> ['label', true]
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~CellRenderer();
|
||||||
|
/// Destroys the CellRenderer.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
inline void CellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_CellRenderer_INCLUDED
|
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// CheckButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/CheckButtonCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CheckButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the CheckButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_CheckButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_CheckButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ToggleButtonCellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class CheckButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API CheckButtonCellRenderer: public ToggleButtonCellRenderer
|
||||||
|
/// CheckButtonCellRenderer renders a CheckButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CheckButtonCellRenderer();
|
||||||
|
/// Creates the CheckButtonCellRenderer.
|
||||||
|
|
||||||
|
virtual ~CheckButtonCellRenderer();
|
||||||
|
/// Destroys the CheckButtonCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_CheckButtonCellRenderer_INCLUDED
|
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// CollapsibleRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/CollapsibleRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CollapsibleRenderer
|
||||||
|
//
|
||||||
|
// Definition of the CollapsibleRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_CollapsibleRenderer_INCLUDED
|
||||||
|
#define ExtJS_CollapsibleRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FrameRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Panel;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API CollapsibleRenderer: public FrameRenderer
|
||||||
|
/// CollapsibleRenderer renders a single Panel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CollapsibleRenderer();
|
||||||
|
/// Creates the CollapsibleRenderer.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
~CollapsibleRenderer();
|
||||||
|
/// Destroys the CollapsibleRenderer.
|
||||||
|
|
||||||
|
void writeProperties(const Frame* pFrame, std::ostream& ostr);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_CollapsibleRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// ComboBoxCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ComboBoxCellRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ComboBoxCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ComboBoxCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ComboBoxCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_ComboBoxCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ComboBoxCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// ComboBoxCellRenderer renders a ComboBox
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ComboBoxCellRenderer();
|
||||||
|
/// Creates the ComboBoxCellRenderer.
|
||||||
|
|
||||||
|
virtual ~ComboBoxCellRenderer();
|
||||||
|
/// Destroys the ComboBoxCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ComboBoxCellRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// DateFieldCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/DateFieldCellRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: DateFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the DateFieldCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_DateFieldCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_DateFieldCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class DateFieldCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API DateFieldCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// DateFieldCellRenderer renders Dates
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DateFieldCellRenderer();
|
||||||
|
/// Creates the DateFieldCellRenderer.
|
||||||
|
|
||||||
|
virtual ~DateFieldCellRenderer();
|
||||||
|
/// Destroys the DateFieldCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static void writeCellProperties(const DateFieldCell* pCell, std::ostream& ostr);
|
||||||
|
/// Writes cell properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_DateFieldCellRenderer_INCLUDED
|
91
WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ExtJS.h
Normal file
91
WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ExtJS.h
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
//
|
||||||
|
// ExtJS.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ExtJS.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ExtJS
|
||||||
|
//
|
||||||
|
// Basic definitions for the Poco ExtJS library.
|
||||||
|
// This file must be the first file included by every other ExtJS
|
||||||
|
// header file.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ExtJS_INCLUDED
|
||||||
|
#define ExtJS_ExtJS_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// The following block is the standard way of creating macros which make exporting
|
||||||
|
// from a DLL simpler. All files within this DLL are compiled with the ExtJS_EXPORTS
|
||||||
|
// symbol defined on the command line. this symbol should not be defined on any project
|
||||||
|
// that uses this DLL. This way any other project whose source files include this file see
|
||||||
|
// ExtJS_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||||
|
// defined with this macro as being exported.
|
||||||
|
//
|
||||||
|
#if defined(_WIN32) && defined(POCO_DLL)
|
||||||
|
#if defined(ExtJS_EXPORTS)
|
||||||
|
#define ExtJS_API __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define ExtJS_API __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(ExtJS_API)
|
||||||
|
#define ExtJS_API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Automatically link ExtJS library.
|
||||||
|
//
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(ExtJS_EXPORTS)
|
||||||
|
#if defined(POCO_DLL)
|
||||||
|
#if defined(_DEBUG)
|
||||||
|
#pragma comment(lib, "PocoExtJSd.lib")
|
||||||
|
#else
|
||||||
|
#pragma comment(lib, "PocoExtJS.lib")
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if defined(_DEBUG)
|
||||||
|
#pragma comment(lib, "PocoExtJSmtd.lib")
|
||||||
|
#else
|
||||||
|
#pragma comment(lib, "PocoExtJSmt.lib")
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // ExtJS_ExtJS_INCLUDED
|
@ -0,0 +1,77 @@
|
|||||||
|
//
|
||||||
|
// FormRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/FormRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: FormRenderer
|
||||||
|
//
|
||||||
|
// Definition of the FormRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_FormRenderer_INCLUDED
|
||||||
|
#define ExtJS_FormRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API FormRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// FormRenderer renders Form
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FormRenderer();
|
||||||
|
/// Creates the FormRenderer.
|
||||||
|
|
||||||
|
virtual ~FormRenderer();
|
||||||
|
/// Destroys the FormRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static std::string formVariableName(const Form* pForm);
|
||||||
|
/// Creates the variable name for the form
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_FormRenderer_INCLUDED
|
@ -0,0 +1,80 @@
|
|||||||
|
//
|
||||||
|
// FrameRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/FrameRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: FrameRenderer
|
||||||
|
//
|
||||||
|
// Definition of the FrameRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_FrameRenderer_INCLUDED
|
||||||
|
#define ExtJS_FrameRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Frame;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API FrameRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// FrameRenderer renders a single Panel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FrameRenderer();
|
||||||
|
/// Creates the FrameRenderer.
|
||||||
|
|
||||||
|
virtual ~FrameRenderer();
|
||||||
|
/// Destroys the FrameRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void writeProperties(const Frame* pFrame, std::ostream& ostr);
|
||||||
|
/// Writes attributes for a frame
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_FrameRenderer_INCLUDED
|
@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// GridLayoutRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/GridLayoutRenderer.h#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: GridLayoutRenderer
|
||||||
|
//
|
||||||
|
// Definition of the GridLayoutRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_GridLayoutRenderer_INCLUDED
|
||||||
|
#define ExtJS_GridLayoutRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LayoutRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API GridLayoutRenderer: public LayoutRenderer
|
||||||
|
/// GridLayoutRenderer renders a grid
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GridLayoutRenderer();
|
||||||
|
/// Creates the GridLayoutRenderer.
|
||||||
|
|
||||||
|
virtual ~GridLayoutRenderer();
|
||||||
|
/// Destroys the GridLayoutRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_GridLayoutRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// HTMLRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/HTMLRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: HTMLRenderer
|
||||||
|
//
|
||||||
|
// Definition of the HTMLRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_HTMLRenderer_INCLUDED
|
||||||
|
#define ExtJS_HTMLRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API HTMLRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// HTMLRenderer renders static text
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HTMLRenderer();
|
||||||
|
/// Creates the HTMLRenderer.
|
||||||
|
|
||||||
|
virtual ~HTMLRenderer();
|
||||||
|
/// Destroys the HTMLRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_HTMLRenderer_INCLUDED
|
@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// HorizontalLayoutRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/HorizontalLayoutRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: HorizontalLayoutRenderer
|
||||||
|
//
|
||||||
|
// Definition of the HorizontalLayoutRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_HorizontalLayoutRenderer_INCLUDED
|
||||||
|
#define ExtJS_HorizontalLayoutRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LayoutRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API HorizontalLayoutRenderer: public LayoutRenderer
|
||||||
|
/// HorizontalLayoutRenderer renders HorizontalLayout
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HorizontalLayoutRenderer();
|
||||||
|
/// Creates the HorizontalLayoutRenderer.
|
||||||
|
|
||||||
|
virtual ~HorizontalLayoutRenderer();
|
||||||
|
/// Destroys the HorizontalLayoutRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_HorizontalLayoutRenderer_INCLUDED
|
@ -0,0 +1,81 @@
|
|||||||
|
//
|
||||||
|
// ImageButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ImageButtonCellRenderer.h#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ImageButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ImageButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ImageButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_ImageButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ButtonCellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class ImageButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ImageButtonCellRenderer: public ButtonCellRenderer
|
||||||
|
/// ImageButtonCellRenderer renders a button
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ImageButtonCellRenderer();
|
||||||
|
/// Creates the ImageButtonCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
|
||||||
|
//void renderCell(const Cell* pCell, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// writes ConfigData, is an array: [imgURI, imgText]
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~ImageButtonCellRenderer();
|
||||||
|
/// Destroys the ImageButtonCellRenderer.
|
||||||
|
|
||||||
|
private:
|
||||||
|
void writeHTML(const ImageButtonCell* pButtonCell, bool showTxt, std::ostream& ostr);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ImageButtonCellRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// ImageRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ImageRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ImageRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ImageRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ImageRenderer_INCLUDED
|
||||||
|
#define ExtJS_ImageRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Image;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ImageRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// ImageRenderer renders Images
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ImageRenderer();
|
||||||
|
/// Creates the ImageRenderer.
|
||||||
|
|
||||||
|
virtual ~ImageRenderer();
|
||||||
|
/// Destroys the ImageRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void writeHTML(const Image* pImage, std::ostream& ostr);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ImageRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// LabelRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/LabelRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: LabelRenderer
|
||||||
|
//
|
||||||
|
// Definition of the LabelRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_LabelRenderer_INCLUDED
|
||||||
|
#define ExtJS_LabelRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API LabelRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// LabelRenderer renders static text
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LabelRenderer();
|
||||||
|
/// Creates the LabelRenderer.
|
||||||
|
|
||||||
|
virtual ~LabelRenderer();
|
||||||
|
/// Destroys the LabelRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_LabelRenderer_INCLUDED
|
@ -0,0 +1,84 @@
|
|||||||
|
//
|
||||||
|
// LayoutRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/LayoutRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: LayoutRenderer
|
||||||
|
//
|
||||||
|
// Definition of the LayoutRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_LayoutRenderer_INCLUDED
|
||||||
|
#define ExtJS_LayoutRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Layout;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API LayoutRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// Abstract LayoutRenderer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LayoutRenderer();
|
||||||
|
/// Creates the LayoutRenderer.
|
||||||
|
|
||||||
|
virtual ~LayoutRenderer();
|
||||||
|
/// Destroys the LayoutRenderer.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void renderLayoutHead(const Layout* pLayout, const RenderContext& context, std::ostream& ostr, const std::string& layoutId, const std::string& layoutConfig);
|
||||||
|
/// layoutId contains the id for the layout parameter (e.g. table for GridLayoutRenderer)
|
||||||
|
/// layoutConfig contains the string for the layoutConfig parameter (e.g. {columns:3})
|
||||||
|
|
||||||
|
void renderParameters(const Layout* pLayout, const RenderContext& context, std::ostream& ostr, const std::string& layoutId, const std::string& layoutConfig);
|
||||||
|
/// Render the config parameters
|
||||||
|
|
||||||
|
void visitChildren(const Layout* pLayout, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Visits children
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_LayoutRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// ListBoxCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ListBoxCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ListBoxCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ListBoxCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ListBoxCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_ListBoxCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class ListBoxCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ListBoxCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// ListBoxCellRenderer renders a button
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ListBoxCellRenderer();
|
||||||
|
/// Creates the ListBoxCellRenderer.
|
||||||
|
|
||||||
|
virtual ~ListBoxCellRenderer();
|
||||||
|
/// Destroys the ListBoxCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static void renderProperties(const ListBoxCell* pCell, std::ostream& ostr);
|
||||||
|
/// Renders button properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ListBoxCellRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// NumberFieldCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/NumberFieldCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: NumberFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the NumberFieldCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_NumberFieldCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_NumberFieldCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API NumberFieldCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// NumberFieldCellRenderer renders a input field containing only numbers
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NumberFieldCellRenderer();
|
||||||
|
/// Creates the NumberFieldCellRenderer.
|
||||||
|
|
||||||
|
virtual ~NumberFieldCellRenderer();
|
||||||
|
/// Destroys the NumberFieldCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_NumberFieldCellRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// PageRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/PageRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PageRenderer
|
||||||
|
//
|
||||||
|
// Definition of the PageRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_PageRenderer_INCLUDED
|
||||||
|
#define ExtJS_PageRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API PageRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// PageRenderer renders an html page
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PageRenderer();
|
||||||
|
/// Creates the PageRenderer.
|
||||||
|
|
||||||
|
virtual ~PageRenderer();
|
||||||
|
/// Destroys the PageRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_PageRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// PanelRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/PanelRenderer.h#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PanelRenderer
|
||||||
|
//
|
||||||
|
// Definition of the PanelRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_PanelRenderer_INCLUDED
|
||||||
|
#define ExtJS_PanelRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API PanelRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// PanelRenderer renders a single Panel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PanelRenderer();
|
||||||
|
/// Creates the PanelRenderer.
|
||||||
|
|
||||||
|
virtual ~PanelRenderer();
|
||||||
|
/// Destroys the PanelRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_PanelRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// PasswordFieldCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/PasswordFieldCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PasswordFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the PasswordFieldCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_PasswordFieldCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_PasswordFieldCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API PasswordFieldCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// PasswordFieldCellRenderer renders a password input field
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PasswordFieldCellRenderer();
|
||||||
|
/// Creates the PasswordFieldCellRenderer.
|
||||||
|
|
||||||
|
virtual ~PasswordFieldCellRenderer();
|
||||||
|
/// Destroys the PasswordFieldCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_PasswordFieldCellRenderer_INCLUDED
|
@ -0,0 +1,73 @@
|
|||||||
|
//
|
||||||
|
// ProgressIndicatorRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ProgressIndicatorRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ProgressIndicatorRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ProgressIndicatorRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ProgressIndicatorRenderer_INCLUDED
|
||||||
|
#define ExtJS_ProgressIndicatorRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ProgressIndicatorRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// ProgressIndicatorRenderer renders a ProgressIndicator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ProgressIndicatorRenderer();
|
||||||
|
/// Creates the ProgressIndicatorRenderer.
|
||||||
|
|
||||||
|
virtual ~ProgressIndicatorRenderer();
|
||||||
|
/// Destroys the ProgressIndicatorRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ProgressIndicatorRenderer_INCLUDED
|
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// RadioButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/RadioButtonCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: RadioButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the RadioButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_RadioButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_RadioButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ToggleButtonCellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class RadioButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API RadioButtonCellRenderer: public ToggleButtonCellRenderer
|
||||||
|
/// RadioButtonCellRenderer renders a RadioButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RadioButtonCellRenderer();
|
||||||
|
/// Creates the RadioButtonCellRenderer.
|
||||||
|
|
||||||
|
virtual ~RadioButtonCellRenderer();
|
||||||
|
/// Destroys the RadioButtonCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_RadioButtonCellRenderer_INCLUDED
|
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// SubmitButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/SubmitButtonCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: SubmitButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the SubmitButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_SubmitButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_SubmitButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ButtonCellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class SubmitButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API SubmitButtonCellRenderer: public ButtonCellRenderer
|
||||||
|
/// SubmitButtonCellRenderer renders a SubmitButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubmitButtonCellRenderer();
|
||||||
|
/// Creates the SubmitButtonCellRenderer.
|
||||||
|
|
||||||
|
virtual ~SubmitButtonCellRenderer();
|
||||||
|
/// Destroys the SubmitButtonCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_SubmitButtonCellRenderer_INCLUDED
|
@ -0,0 +1,77 @@
|
|||||||
|
//
|
||||||
|
// TabViewRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TabViewRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TabViewRenderer
|
||||||
|
//
|
||||||
|
// Definition of the TabViewRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TabViewRenderer_INCLUDED
|
||||||
|
#define ExtJS_TabViewRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LayoutRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class TabView;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API TabViewRenderer: public LayoutRenderer
|
||||||
|
/// TabViewRenderer renders a TabView
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TabViewRenderer();
|
||||||
|
/// Creates the TabViewRenderer.
|
||||||
|
|
||||||
|
virtual ~TabViewRenderer();
|
||||||
|
/// Destroys the TabViewRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
private:
|
||||||
|
void renderParameters(const TabView* pTabView, const RenderContext& context, std::ostream& ostr);
|
||||||
|
|
||||||
|
void visitChildren(const TabView* pTabView, const RenderContext& context, std::ostream& ostr);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TabViewRenderer_INCLUDED
|
@ -0,0 +1,86 @@
|
|||||||
|
//
|
||||||
|
// TableCellHandlerFactory.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableCellHandlerFactory.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TableCellHandlerFactory
|
||||||
|
//
|
||||||
|
// Definition of the TableCellHandlerFactory class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TableCellHandlerFactory_INCLUDED
|
||||||
|
#define ExtJS_TableCellHandlerFactory_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TableCellHandler.h"
|
||||||
|
#include "Poco/WebWidgets/Cell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class TableCellHandlerFactory
|
||||||
|
/// TableCellHandlerFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static TableCellHandlerFactory& instance();
|
||||||
|
/// Returns an instance of the TableCellHandlerFactory
|
||||||
|
|
||||||
|
AbstractTableCellHandler::Ptr factory(const Cell::Ptr& t) const;
|
||||||
|
/// Retrieves a factory for a given type, throws an exception if no factory is found
|
||||||
|
|
||||||
|
void registerFactory(const Type& t, AbstractTableCellHandler::Ptr ptr);
|
||||||
|
/// Registers a factory for the given type, overwrites existing ones
|
||||||
|
|
||||||
|
void registerFactory(const std::type_info& t, AbstractTableCellHandler::Ptr ptr);
|
||||||
|
/// Registers a factory for the given type, overwrites existing ones
|
||||||
|
|
||||||
|
private:
|
||||||
|
typedef std::map<Type, AbstractTableCellHandler::Ptr> Handlers;
|
||||||
|
typedef Handlers::iterator Iterator;
|
||||||
|
typedef Handlers::const_iterator ConstIterator;
|
||||||
|
|
||||||
|
TableCellHandlerFactory();
|
||||||
|
TableCellHandlerFactory(const TableCellHandlerFactory&);
|
||||||
|
TableCellHandlerFactory& operator=(const TableCellHandlerFactory&);
|
||||||
|
~TableCellHandlerFactory();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Handlers _handlers;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TableCellHandlerFactory_INCLUDED
|
@ -0,0 +1,98 @@
|
|||||||
|
//
|
||||||
|
// TableRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TableRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TableRenderer
|
||||||
|
//
|
||||||
|
// Definition of the TableRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TableRenderer_INCLUDED
|
||||||
|
#define ExtJS_TableRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Type.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
#include "Poco/WebWidgets/Cell.h"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class Table;
|
||||||
|
class TableColumn;
|
||||||
|
class TableModel;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API TableRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// TableRenderer renders a button
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TableRenderer();
|
||||||
|
/// Creates the TableRenderer.
|
||||||
|
|
||||||
|
virtual ~TableRenderer();
|
||||||
|
/// Destroys the TableRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static void renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Renders Table properties
|
||||||
|
|
||||||
|
static void renderColumns(const Table* pTable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Renders the columns of the table
|
||||||
|
|
||||||
|
static void renderColumn(const Table* pTable, const TableColumn& tc, int idx, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Renders a single colum
|
||||||
|
|
||||||
|
static void renderDataModel(const Table* pTable, std::ostream& ostr);
|
||||||
|
/// Renders the data matrix
|
||||||
|
|
||||||
|
static void renderStore(const Table* pTable, std::ostream& ostr);
|
||||||
|
/// Renders the data store of the table
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TableRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// TextEditCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TextEditCellRenderer.h#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TextEditCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the TextEditCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TextEditCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_TextEditCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class TextEditCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API TextEditCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// TextEditCellRenderer renders a text input field
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TextEditCellRenderer();
|
||||||
|
/// Creates the TextEditCellRenderer.
|
||||||
|
|
||||||
|
virtual ~TextEditCellRenderer();
|
||||||
|
/// Destroys the TextEditCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static void writeCellProperties(const TextEditCell* pCell, std::ostream& ostr, bool writeValue=true);
|
||||||
|
/// Writes cell properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TextEditCellRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// TextFieldCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TextFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the TextFieldCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TextFieldCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_TextFieldCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class TextFieldCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API TextFieldCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// TextFieldCellRenderer renders a text input field
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TextFieldCellRenderer();
|
||||||
|
/// Creates the TextFieldCellRenderer.
|
||||||
|
|
||||||
|
virtual ~TextFieldCellRenderer();
|
||||||
|
/// Destroys the TextFieldCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static void writeCellProperties(const TextFieldCell* pCell, std::ostream& ostr, bool writeValue=true);
|
||||||
|
/// Writes cell properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TextFieldCellRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// TimeFieldCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/TimeFieldCellRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TimeFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the TimeFieldCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_TimeFieldCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_TimeFieldCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Renderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class TimeFieldCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API TimeFieldCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// TimeFieldCellRenderer renders an input field containing time values
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TimeFieldCellRenderer();
|
||||||
|
/// Creates the TimeFieldCellRenderer.
|
||||||
|
|
||||||
|
virtual ~TimeFieldCellRenderer();
|
||||||
|
/// Destroys the TimeFieldCellRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page body to the given output stream.
|
||||||
|
|
||||||
|
static void writeCellProperties(const TimeFieldCell* pCell, std::ostream& ostr);
|
||||||
|
/// Writes cell properties
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_TimeFieldCellRenderer_INCLUDED
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// ToggleButtonCellRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/ToggleButtonCellRenderer.h#4 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ToggleButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Definition of the ToggleButtonCellRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_ToggleButtonCellRenderer_INCLUDED
|
||||||
|
#define ExtJS_ToggleButtonCellRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CellRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class ToggleButtonCell;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API ToggleButtonCellRenderer: public Poco::WebWidgets::Renderer
|
||||||
|
/// Abstract ToggleButtonCellRenderer renders a ToggleButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// writes ConfigData, is a simple boolean containing isChecked
|
||||||
|
|
||||||
|
static void renderProperties(const ToggleButtonCell* pCell, std::ostream& ostr);
|
||||||
|
/// Renders button properties
|
||||||
|
|
||||||
|
|
||||||
|
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
ToggleButtonCellRenderer();
|
||||||
|
/// Creates the ToggleButtonCellRenderer.
|
||||||
|
|
||||||
|
virtual ~ToggleButtonCellRenderer();
|
||||||
|
/// Destroys the ToggleButtonCellRenderer.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_ToggleButtonCellRenderer_INCLUDED
|
117
WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/Utility.h
Normal file
117
WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/Utility.h
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
//
|
||||||
|
// Utility.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/Utility.h#8 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: Utility
|
||||||
|
//
|
||||||
|
// Definition of the Utility class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_Utility_INCLUDED
|
||||||
|
#define ExtJS_Utility_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ExtJS.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/LookAndFeel.h"
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
|
||||||
|
class View;
|
||||||
|
class Cell;
|
||||||
|
class Renderable;
|
||||||
|
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API Utility
|
||||||
|
/// Utility offers static helper functions
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void initialize(LookAndFeel::Ptr ptr);
|
||||||
|
/// Initializes the LookAndFeel object to use ExtJS renderers
|
||||||
|
|
||||||
|
static LookAndFeel& getDefaultRenderers();
|
||||||
|
/// Returns the defaultrenderers;
|
||||||
|
|
||||||
|
static const std::string& getTmpID();
|
||||||
|
/// Gets the id of the tmp div element
|
||||||
|
|
||||||
|
static Form::Ptr insideForm(const View* pChild);
|
||||||
|
|
||||||
|
static Form::Ptr insideForm(const Cell* pChild);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void writeRenderableProperties(const Renderable* pRend, std::ostream& ostr);
|
||||||
|
/// Writes renderable properties (mostyl the id)
|
||||||
|
|
||||||
|
static void writeCellProperties(const Cell* pCell, std::ostream& ostr, bool writeId = true);
|
||||||
|
/// Writes cell properties except the value and the tooltip (tooltip is not supported by most ExtJS form fields)
|
||||||
|
|
||||||
|
static void writeRenderableProperties(const std::string& id, std::ostream& ostr);
|
||||||
|
/// Writes renderable properties (mostyl the id)
|
||||||
|
|
||||||
|
static void writeCellProperties(const std::string& id,
|
||||||
|
const std::string& disabled,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& width,
|
||||||
|
const std::string& height,
|
||||||
|
std::ostream& ostr);
|
||||||
|
/// Writes cell properties
|
||||||
|
|
||||||
|
static std::string safe(const std::string& str);
|
||||||
|
/// Escapes characters that could be dangerous in JS
|
||||||
|
|
||||||
|
static std::string convertPocoDateToPHPDate(const std::string& dateTimeFmt);
|
||||||
|
/// Converts a poco date time format string to its PHP/extjs equivalent
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void convertPocoDateToPHPDate(char in, std::string& result);
|
||||||
|
static void convertPHPDateToPocoDate(char in, std::string& result);
|
||||||
|
static void escapeCharForPHP(char in, std::string& result);
|
||||||
|
static LookAndFeel::Ptr createDefault();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Utility();
|
||||||
|
~Utility();
|
||||||
|
Utility(const Utility&);
|
||||||
|
Utility& operator0(const Utility&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_Utility_INCLUDED
|
@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// VerticalLayoutRenderer.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/include/Poco/WebWidgets/ExtJS/VerticalLayoutRenderer.h#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: VerticalLayoutRenderer
|
||||||
|
//
|
||||||
|
// Definition of the VerticalLayoutRenderer class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ExtJS_VerticalLayoutRenderer_INCLUDED
|
||||||
|
#define ExtJS_VerticalLayoutRenderer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LayoutRenderer.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
class ExtJS_API VerticalLayoutRenderer: public LayoutRenderer
|
||||||
|
/// VerticalLayoutRenderer renders a vertical Layout
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VerticalLayoutRenderer();
|
||||||
|
/// Creates the VerticalLayoutRenderer.
|
||||||
|
|
||||||
|
virtual ~VerticalLayoutRenderer();
|
||||||
|
/// Destroys the VerticalLayoutRenderer.
|
||||||
|
|
||||||
|
void renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||||
|
/// Emits code for the page header to the given output stream.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
||||||
|
|
||||||
|
|
||||||
|
#endif // ExtJS_VerticalLayoutRenderer_INCLUDED
|
17
WebWidgets/ExtJS/samples/Server/Makefile
Normal file
17
WebWidgets/ExtJS/samples/Server/Makefile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
# $Id: //poco/Main/WebWidgets/ExtJS/samples/Server/Makefile#1 $
|
||||||
|
#
|
||||||
|
# Makefile for Poco Server
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
objects = Server
|
||||||
|
|
||||||
|
target = Server
|
||||||
|
target_version = 1
|
||||||
|
target_libs = PocoFoundation PocoXML PocoNet PocoUtil
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/exec
|
149
WebWidgets/ExtJS/samples/Server/Server_VS71.vcproj
Normal file
149
WebWidgets/ExtJS/samples/Server/Server_VS71.vcproj
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="Server"
|
||||||
|
ProjectGUID="{b0ffa5df-1420-460f-8e87-e4debe801a05}"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Net\include;..\..\..\Util\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="TRUE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="4"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundationd.lib PocoXMLd.lib PocoNetd.lib PocoUtild.lib"
|
||||||
|
OutputFile="bin/Serverd.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\lib"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="bin/Serverd.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="TRUE"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="TRUE"
|
||||||
|
OptimizeForWindowsApplication="TRUE"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Net\include;..\..\..\Util\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="FALSE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="3"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundation.lib PocoXML.lib PocoNet.lib PocoUtil.lib"
|
||||||
|
OutputFile="bin/Server.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\lib"
|
||||||
|
GenerateDebugInformation="FALSE"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="">
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Server.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
211
WebWidgets/ExtJS/samples/Server/Server_VS80.vcproj
Normal file
211
WebWidgets/ExtJS/samples/Server/Server_VS80.vcproj
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="Server"
|
||||||
|
ProjectGUID="{B0FFA5DF-1420-460F-8E87-E4DEBE801A05}"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\..\..\Foundation\include;..\..\..\..\XML\include;..\..\..\..\Net\include;..\..\..\..\Util\include;..\..\..\..\WebWidgets\include;..\..\..\..\WebWidgets\ExtJS\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundationd.lib PocoXMLd.lib PocoNetd.lib PocoUtild.lib"
|
||||||
|
OutputFile="bin/Serverd.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="bin/Serverd.pdb"
|
||||||
|
SubSystem="1"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories=".\include;..\..\..\..\Foundation\include;..\..\..\..\XML\include;..\..\..\..\Net\include;..\..\..\..\Util\include;..\..\..\..\WebWidgets\include;..\..\..\..\WebWidgets\ExtJS\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="PocoFoundation.lib PocoXML.lib PocoNet.lib PocoUtil.lib"
|
||||||
|
OutputFile="bin/Server.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\..\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Server.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
222
WebWidgets/ExtJS/samples/Server/src/Server.cpp
Normal file
222
WebWidgets/ExtJS/samples/Server/src/Server.cpp
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
//
|
||||||
|
// Server.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/samples/Server/src/Server.cpp#4 $
|
||||||
|
//
|
||||||
|
// This sample demonstrates the XYZ class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Util/ServerApplication.h"
|
||||||
|
#include "Poco/Util/Option.h"
|
||||||
|
#include "Poco/Util/OptionException.h"
|
||||||
|
#include "Poco/Util/OptionSet.h"
|
||||||
|
#include "Poco/Util/HelpFormatter.h"
|
||||||
|
#include "Poco/Net/HTTPRequestHandlerFactory.h"
|
||||||
|
#include "Poco/Net/HTTPRequestHandler.h"
|
||||||
|
#include "Poco/Net/ServerSocket.h"
|
||||||
|
#include "Poco/Net/HTTPServer.h"
|
||||||
|
#include "Poco/Net/HTTPServerRequest.h"
|
||||||
|
#include "Poco/Net/HTTPServerParams.h"
|
||||||
|
#include "Poco/WebWidgets/RequestHandler.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Table.h"
|
||||||
|
#include "Poco/WebWidgets/SubmitButton.h"
|
||||||
|
#include "Poco/WebWidgets/CheckButton.h"
|
||||||
|
#include "Poco/WebWidgets/SimpleTableModel.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/DataRetriever.h"
|
||||||
|
#include "Poco/WebWidgets/TextField.h"
|
||||||
|
#include "Poco/File.h"
|
||||||
|
#include "Poco/Path.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
using Poco::Util::Application;
|
||||||
|
using Poco::Util::ServerApplication;
|
||||||
|
using Poco::Util::Option;
|
||||||
|
using Poco::Util::OptionSet;
|
||||||
|
using Poco::Util::OptionCallback;
|
||||||
|
using Poco::Util::HelpFormatter;
|
||||||
|
using Poco::Net::HTTPRequestHandlerFactory;
|
||||||
|
using Poco::Net::HTTPRequestHandler;
|
||||||
|
using Poco::Net::HTTPServerRequest;
|
||||||
|
using Poco::Net::ServerSocket;
|
||||||
|
using Poco::Net::HTTPServer;
|
||||||
|
using Poco::Net::HTTPServerParams;
|
||||||
|
|
||||||
|
|
||||||
|
using namespace Poco::WebWidgets;
|
||||||
|
|
||||||
|
|
||||||
|
class WebAppHandlerFactory: public HTTPRequestHandlerFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
WebAppHandlerFactory(WebApplication& app, const Poco::Path& dataPath, Poco::Logger* pLogger):
|
||||||
|
_app(app),
|
||||||
|
_dataRoot(dataPath),
|
||||||
|
_aliases(),
|
||||||
|
_pLogger(pLogger)
|
||||||
|
{
|
||||||
|
_aliases.insert(std::make_pair("", _dataRoot));
|
||||||
|
}
|
||||||
|
|
||||||
|
HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
|
||||||
|
{
|
||||||
|
const std::string& uri = request.getURI();
|
||||||
|
Poco::URI url(uri);
|
||||||
|
const std::string& path = url.getPath();
|
||||||
|
const std::string& appPath = _app.getURI().getPath();
|
||||||
|
if (path == appPath ||
|
||||||
|
(path.size() > appPath.size() && path.find(appPath) == 0 && path[appPath.size()] == ';')
|
||||||
|
)
|
||||||
|
return new RequestHandler(_app);
|
||||||
|
return new DataRetriever(_aliases, _pLogger);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
WebApplication& _app;
|
||||||
|
Poco::Path _dataRoot;
|
||||||
|
DataRetriever::Aliases _aliases;
|
||||||
|
Poco::Logger* _pLogger;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class WebServer: public ServerApplication
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
WebServer(): _helpRequested(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
~WebServer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void initialize(Application& self)
|
||||||
|
{
|
||||||
|
loadConfiguration(); // load default configuration files, if present
|
||||||
|
ServerApplication::initialize(self);
|
||||||
|
logger().information("starting up");
|
||||||
|
}
|
||||||
|
|
||||||
|
void uninitialize()
|
||||||
|
{
|
||||||
|
logger().information("shutting down");
|
||||||
|
ServerApplication::uninitialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
void defineOptions(OptionSet& options)
|
||||||
|
{
|
||||||
|
ServerApplication::defineOptions(options);
|
||||||
|
|
||||||
|
options.addOption(
|
||||||
|
Option("help", "h", "display help information on command line arguments")
|
||||||
|
.required(false)
|
||||||
|
.repeatable(false)
|
||||||
|
.callback(OptionCallback<WebServer>(this, &WebServer::handleHelp)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleHelp(const std::string& name, const std::string& value)
|
||||||
|
{
|
||||||
|
_helpRequested = true;
|
||||||
|
displayHelp();
|
||||||
|
stopOptionsProcessing();
|
||||||
|
}
|
||||||
|
|
||||||
|
void displayHelp()
|
||||||
|
{
|
||||||
|
HelpFormatter helpFormatter(options());
|
||||||
|
helpFormatter.setCommand(commandName());
|
||||||
|
helpFormatter.setUsage("OPTIONS");
|
||||||
|
helpFormatter.setHeader("A sample server application that demonstrates some of the features of the Util::ServerApplication class.");
|
||||||
|
helpFormatter.format(std::cout);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(const std::vector<std::string>& args)
|
||||||
|
{
|
||||||
|
if (!_helpRequested)
|
||||||
|
{
|
||||||
|
WebApplication webApp(Poco::URI("/"));
|
||||||
|
LookAndFeel::Ptr laf(new LookAndFeel());
|
||||||
|
Poco::WebWidgets::ExtJS::Utility::initialize(laf);
|
||||||
|
webApp.setLookAndFeel(laf);
|
||||||
|
Page::Ptr ptr = new Page("test");
|
||||||
|
Form::Ptr pForm = new Form("form1", Poco::URI("/"));
|
||||||
|
//pForm->setURL(...);
|
||||||
|
Table::TableColumns tc;
|
||||||
|
TextField::Ptr pTxt(new TextField("txt"));
|
||||||
|
tc.push_back(new TableColumn(pTxt->getCell(), "StaticText"));
|
||||||
|
CheckButton::Ptr ptrCheck(new CheckButton("check", "Const", true));
|
||||||
|
tc.push_back(new TableColumn(ptrCheck->getCell(), "CheckButton"));
|
||||||
|
Table::Ptr pTable = new Table(tc, new SimpleTableModel(2));
|
||||||
|
///init simpletablemodel
|
||||||
|
pTable->setValue(std::string("one"), 0,0);
|
||||||
|
pTable->setValue(std::string("two"), 1,0);
|
||||||
|
pTable->setValue(std::string("three"), 2,0);
|
||||||
|
pTable->setValue(true, 0,1);
|
||||||
|
pTable->setValue(false, 1,1);
|
||||||
|
pTable->setValue(true, 2,1);
|
||||||
|
pForm->add(pTable);
|
||||||
|
pForm->add(new TextField("txtfield"));
|
||||||
|
CheckButton::Ptr ptrCheck2(new CheckButton("checkbutton", "CheckButton", false));
|
||||||
|
pForm->add(ptrCheck2);
|
||||||
|
SubmitButton::Ptr ptrBut(new SubmitButton("Submit"));
|
||||||
|
ptrBut->setText("Submit");
|
||||||
|
|
||||||
|
pForm->add(ptrBut);
|
||||||
|
|
||||||
|
ptr->add(pForm);
|
||||||
|
webApp.setCurrentPage(ptr);
|
||||||
|
|
||||||
|
unsigned short port = (unsigned short) config().getInt("WebServer.port", 9980);
|
||||||
|
std::string data = config().getString("WebServer.dataRoot", ".");
|
||||||
|
Poco::Path aPath(data);
|
||||||
|
aPath.makeAbsolute();
|
||||||
|
aPath.makeDirectory();
|
||||||
|
Poco::File aFile(aPath);
|
||||||
|
if (!aFile.exists() || aFile.isFile())
|
||||||
|
throw Poco::Util::InvalidArgumentException("dataRoot is either a file or doesn't exist: must be directory!");
|
||||||
|
|
||||||
|
ServerSocket svs(port);
|
||||||
|
HTTPServer srv(new WebAppHandlerFactory(webApp, aPath, &logger()), svs, new HTTPServerParams);
|
||||||
|
srv.start();
|
||||||
|
waitForTerminationRequest();
|
||||||
|
srv.stop();
|
||||||
|
}
|
||||||
|
return Application::EXIT_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool _helpRequested;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
POCO_SERVER_MAIN(WebServer)
|
57
WebWidgets/ExtJS/src/AbstractTableCellHandler.cpp
Normal file
57
WebWidgets/ExtJS/src/AbstractTableCellHandler.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
//
|
||||||
|
// AbstractTableCellHandler.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/AbstractTableCellHandler.cpp#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: AbstractTableCellHandler
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/AbstractTableCellHandler.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
AbstractTableCellHandler::AbstractTableCellHandler(bool editor, bool renderer):
|
||||||
|
_editor(editor),
|
||||||
|
_renderer(renderer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AbstractTableCellHandler::~AbstractTableCellHandler()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
109
WebWidgets/ExtJS/src/ButtonCellRenderer.cpp
Normal file
109
WebWidgets/ExtJS/src/ButtonCellRenderer.cpp
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
//
|
||||||
|
// ButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ButtonCellRenderer.cpp#8 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ButtonCellRenderer::ButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ButtonCellRenderer::~ButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ButtonCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
const ButtonCell* pButtonCell = static_cast<const Poco::WebWidgets::ButtonCell*>(pRenderable);
|
||||||
|
std::string content = "'" + Utility::safe(pButtonCell->getString()) + "'";
|
||||||
|
ButtonCellRenderer::renderButton(pButtonCell, content, true, false,ostr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ButtonCellRenderer::renderCell(const Cell* pCell, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pCell != 0);
|
||||||
|
const ButtonCell* pButtonCell = static_cast<const Poco::WebWidgets::ButtonCell*>(pCell);
|
||||||
|
|
||||||
|
// is now a variable name
|
||||||
|
ButtonCellRenderer::renderButton(pButtonCell, "val", false, false, ostr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ButtonCellRenderer::renderProperties(const ButtonCell* pButtonCell, const std::string& content, bool writeId, bool submitButton, std::ostream& ostr, bool showText)
|
||||||
|
{
|
||||||
|
if (showText && !content.empty())
|
||||||
|
ostr << "text:" << content << ",";
|
||||||
|
if (submitButton)
|
||||||
|
{
|
||||||
|
ostr << "type:'submit',";
|
||||||
|
Form::Ptr pForm = Utility::insideForm(pButtonCell);
|
||||||
|
//ostr << "handler: function(){Ext.getCmp('" << pForm->id() << "').getForm().submit({url:'" << pForm->getURI().toString() << "',waitMsg:'Loading'});},";
|
||||||
|
ostr << "handler: function(){Ext.getCmp('" << pForm->id() << "').getForm().submit();},";
|
||||||
|
}
|
||||||
|
Utility::writeCellProperties(pButtonCell, ostr, writeId);
|
||||||
|
std::string toolTip(pButtonCell->getToolTip());
|
||||||
|
if (!toolTip.empty())
|
||||||
|
ostr << ",tooltip:'" << Utility::safe(toolTip) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ButtonCellRenderer::renderButton(const ButtonCell* pCell, const std::string& content, bool writeId, bool submitButton, std::ostream& ostr, bool showText)
|
||||||
|
{
|
||||||
|
ostr << "new Ext.Button({";
|
||||||
|
ButtonCellRenderer::renderProperties(pCell, content, writeId, submitButton, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ButtonCellRenderer::writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
ostr << "'" << Utility::safe(pCell->getString()) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
191
WebWidgets/ExtJS/src/CellInitializer.cpp
Normal file
191
WebWidgets/ExtJS/src/CellInitializer.cpp
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
//
|
||||||
|
// CellInitializer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/CellInitializer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CellInitializer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CellInitializer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/AbstractTableCellHandler.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ToggleButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/CheckButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/TextEditCell.h"
|
||||||
|
#include "Poco/WebWidgets/TextFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/ComboBoxCell.h"
|
||||||
|
#include "Poco/WebWidgets/ButtonCell.h"
|
||||||
|
#include "Poco/NumberFormatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const Cell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
//don't support label for cell, keep this separate
|
||||||
|
pHandler->addFixed("hideLabel", "true");
|
||||||
|
if (!pCell->isEnabled())
|
||||||
|
pHandler->addFixed("disabled", "true");
|
||||||
|
View* pOwner = pCell->getOwner();
|
||||||
|
if (pOwner)
|
||||||
|
{
|
||||||
|
if (pOwner->getWidth() > 0)
|
||||||
|
pHandler->addFixed("width", Poco::NumberFormatter::format(pOwner->getWidth()));
|
||||||
|
if (pOwner->getHeight() > 0)
|
||||||
|
pHandler->addFixed("height", Poco::NumberFormatter::format(pOwner->getHeight()));
|
||||||
|
/* if (!pOwner->getName().empty())
|
||||||
|
pHandler->addFixed("name", "'"+pOwner->getName()+"'"); */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const ToggleButtonCell* pToggleButtonCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
if (!pToggleButtonCell->getLabel().empty())
|
||||||
|
pHandler->addFixed("boxLabel", "'" + Utility::safe(pToggleButtonCell->getLabel()) + "'");
|
||||||
|
// renderer is always readonly
|
||||||
|
pHandler->addFixed("disabled", "true");
|
||||||
|
//tooltip is not supported by togglebutton
|
||||||
|
std::string tooltip (pToggleButtonCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
{
|
||||||
|
std::string fct("{render:function(c){c.getEl().dom.qtip='");
|
||||||
|
fct.append(Utility::safe(tooltip));
|
||||||
|
fct.append("'; c.getEl().dom.qclass = 'x-form-tip';}}");
|
||||||
|
pHandler->addFixed("listeners", fct);
|
||||||
|
}
|
||||||
|
|
||||||
|
const Cell* pCell = pToggleButtonCell;
|
||||||
|
cellInitializer(pCell, pHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const CheckButtonCell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
const ToggleButtonCell* pToggleButtonCell = pCell;
|
||||||
|
cellInitializer(pToggleButtonCell, pHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const TextEditCell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
cellInitializer(static_cast<const Cell*>(pCell), pHandler);
|
||||||
|
|
||||||
|
if (!pCell->isEditable())
|
||||||
|
pHandler->addFixed("readOnly", "true");
|
||||||
|
if (pCell->getHeightInPixel() > 0)
|
||||||
|
pHandler->addFixed("height", Poco::NumberFormatter::format(pCell->getHeightInPixel()));
|
||||||
|
if (pCell->getGrow())
|
||||||
|
pHandler->addFixed("grow","true");
|
||||||
|
|
||||||
|
if (!pCell->getPlaceHolder().empty())
|
||||||
|
pHandler->addFixed("emptyText", "'" + Utility::safe(pCell->getPlaceHolder()) + "'");
|
||||||
|
|
||||||
|
//tooltip is not supported by textEdit, add listeners
|
||||||
|
std::string tooltip (pCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
{
|
||||||
|
std::string fct("{render: function(c) {Ext.QuickTips.register({target: c.getEl(),text: '");
|
||||||
|
fct.append(Utility::safe(tooltip));
|
||||||
|
fct.append("'});}}");
|
||||||
|
pHandler->addFixed("listeners", fct);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const TextFieldCell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
cellInitializer(static_cast<const Cell*>(pCell), pHandler);
|
||||||
|
|
||||||
|
if (!pCell->isEditable())
|
||||||
|
pHandler->addFixed("readOnly", "true");
|
||||||
|
|
||||||
|
if (pCell->getMaxLength() > 0)
|
||||||
|
pHandler->addFixed("maxLength", Poco::NumberFormatter::format(pCell->getMaxLength()));
|
||||||
|
|
||||||
|
if (!pCell->getPlaceHolder().empty())
|
||||||
|
pHandler->addFixed("emptyText", "'" + Utility::safe(pCell->getPlaceHolder()) + "'");
|
||||||
|
|
||||||
|
//tooltip is not supported by textEdit, add listeners
|
||||||
|
std::string tooltip (pCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
{
|
||||||
|
std::string fct("{render: function(c) {Ext.QuickTips.register({target: c.getEl(),text: '");
|
||||||
|
fct.append(Utility::safe(tooltip));
|
||||||
|
fct.append("'});}}");
|
||||||
|
pHandler->addFixed("listeners", fct);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const ComboBoxCell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
cellInitializer(static_cast<const TextFieldCell*>(pCell), pHandler);
|
||||||
|
std::string store("new Ext.data.SimpleStore({fields:['d'], data:[");
|
||||||
|
|
||||||
|
//now serialize data
|
||||||
|
std::vector<Any>::const_iterator it = pCell->begin();
|
||||||
|
std::vector<Any>::const_iterator itEnd = pCell->end();
|
||||||
|
Formatter::Ptr ptrFormatter = pCell->getFormatter();
|
||||||
|
for (; it != itEnd; ++it)
|
||||||
|
{
|
||||||
|
if (it != pCell->begin())
|
||||||
|
store.append(",");
|
||||||
|
store.append("['");
|
||||||
|
if (ptrFormatter)
|
||||||
|
store.append(ptrFormatter->format(*it));
|
||||||
|
else
|
||||||
|
store.append(RefAnyCast<std::string>(*it));
|
||||||
|
store.append("']");
|
||||||
|
}
|
||||||
|
store.append("]})");
|
||||||
|
pHandler->addFixed("store", store);
|
||||||
|
pHandler->addFixed("displayField", "'d'");
|
||||||
|
pHandler->addFixed("typeAhead","true");
|
||||||
|
pHandler->addFixed("mode", "'local'");
|
||||||
|
pHandler->addFixed("triggerAction","'all'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void cellInitializer(const ButtonCell* pCell, AbstractTableCellHandler* pHandler)
|
||||||
|
{
|
||||||
|
cellInitializer(static_cast<const Cell*>(pCell), pHandler);
|
||||||
|
|
||||||
|
std::string toolTip(pCell->getToolTip());
|
||||||
|
if (!toolTip.empty())
|
||||||
|
pHandler->addFixed("tooltip:", "'" + Utility::safe(toolTip) + "'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
59
WebWidgets/ExtJS/src/CellRenderer.cpp
Normal file
59
WebWidgets/ExtJS/src/CellRenderer.cpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
//
|
||||||
|
// CellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/DateFieldCelllRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Cell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
CellRenderer::CellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CellRenderer::~CellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
72
WebWidgets/ExtJS/src/CheckButtonCellRenderer.cpp
Normal file
72
WebWidgets/ExtJS/src/CheckButtonCellRenderer.cpp
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// CheckButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/CheckButtonCellRenderer.cpp#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CheckButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CheckButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/CheckButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
CheckButtonCellRenderer::CheckButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CheckButtonCellRenderer::~CheckButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CheckButtonCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::CheckButtonCell));
|
||||||
|
const CheckButtonCell* pCheckButtonCell = static_cast<const Poco::WebWidgets::CheckButtonCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.Checkbox({";
|
||||||
|
|
||||||
|
ToggleButtonCellRenderer::renderProperties(pCheckButtonCell, ostr);
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
64
WebWidgets/ExtJS/src/CollapsibleRenderer.cpp
Normal file
64
WebWidgets/ExtJS/src/CollapsibleRenderer.cpp
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
//
|
||||||
|
// CollapsibleRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/CollapsibleRenderer.cpp#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: CollapsibleRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CollapsibleRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/Collapsible.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
CollapsibleRenderer::CollapsibleRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CollapsibleRenderer::~CollapsibleRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CollapsibleRenderer::writeProperties(const Frame* pFrame, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
const Collapsible* pC = static_cast<const Collapsible*>(pFrame);
|
||||||
|
FrameRenderer::writeProperties(pFrame, ostr);
|
||||||
|
ostr << ",collapsible:true,titleCollapse:true, header:true,collapsed:" << (pC->getCollapse()?"true":"false");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
93
WebWidgets/ExtJS/src/ComboBoxCellRenderer.cpp
Normal file
93
WebWidgets/ExtJS/src/ComboBoxCellRenderer.cpp
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
//
|
||||||
|
// ComboBoxCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ComboBoxCellRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ComboBoxCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ComboBoxCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ComboBoxCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ComboBoxCellRenderer::ComboBoxCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ComboBoxCellRenderer::~ComboBoxCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ComboBoxCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::ComboBoxCell));
|
||||||
|
const ComboBoxCell* pCell = static_cast<const Poco::WebWidgets::ComboBoxCell*>(pRenderable);
|
||||||
|
ostr << "new Ext.form.ComboBox({";
|
||||||
|
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << ", store: new Ext.data.SimpleStore({fields:['d'], data:[";
|
||||||
|
//now serialize data
|
||||||
|
std::vector<Any>::const_iterator it = pCell->begin();
|
||||||
|
std::vector<Any>::const_iterator itEnd = pCell->end();
|
||||||
|
Formatter::Ptr ptrFormatter = pCell->getFormatter();
|
||||||
|
for (; it != itEnd; ++it)
|
||||||
|
{
|
||||||
|
if (it != pCell->begin())
|
||||||
|
ostr << ",";
|
||||||
|
if (ptrFormatter)
|
||||||
|
ostr << "['" << ptrFormatter->format(*it) << "']";
|
||||||
|
else
|
||||||
|
ostr << "['" << RefAnyCast<std::string>(*it) << "']";
|
||||||
|
}
|
||||||
|
ostr << "]})";
|
||||||
|
ostr << ",displayField:'d',typeAhead:true,mode:'local',triggerAction:'all'";
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ComboBoxCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
90
WebWidgets/ExtJS/src/DateFieldCellRenderer.cpp
Normal file
90
WebWidgets/ExtJS/src/DateFieldCellRenderer.cpp
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
//
|
||||||
|
// DateFieldCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/DateFieldCellRenderer.cpp#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: DateFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/DateFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/DateFieldCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
DateFieldCellRenderer::DateFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DateFieldCellRenderer::~DateFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DateFieldCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::DateFieldCell));
|
||||||
|
const DateFieldCell* pCell = static_cast<const Poco::WebWidgets::DateFieldCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.DateField({";
|
||||||
|
|
||||||
|
DateFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DateFieldCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DateFieldCellRenderer::writeCellProperties(const DateFieldCell* pCell, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
//a time value in UTC timezone will have a Z at the end of the time
|
||||||
|
//unfortunately there is a bug in the iso8601 code of extjs 2.0.2
|
||||||
|
//it fails to parse the Z
|
||||||
|
// we avoid that bug in the WebWidgets DateFormatter where values are never written with UTC but with 0 offset if required
|
||||||
|
const std::string& fmt = pCell->getFormat();
|
||||||
|
ostr << ",format:'" << Utility::convertPocoDateToPHPDate(fmt) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
98
WebWidgets/ExtJS/src/FormRenderer.cpp
Normal file
98
WebWidgets/ExtJS/src/FormRenderer.cpp
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
//
|
||||||
|
// FormRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/FormRenderer.cpp#7 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: FormRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/Button.h"
|
||||||
|
#include "Poco/NumberFormatter.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
FormRenderer::FormRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FormRenderer::~FormRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Form));
|
||||||
|
const Form* pForm = static_cast<const Poco::WebWidgets::Form*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.FormPanel({id:'" << pForm->id() << "',";
|
||||||
|
|
||||||
|
ostr << "onSubmit:Ext.emptyFn,submit:function(){this.getEl().dom.submit();},";
|
||||||
|
if (pForm->getMethod() == Form::METHOD_POST)
|
||||||
|
ostr << "method:'POST',";
|
||||||
|
ostr << "title:'" << pForm->getName() << "',autoHeight:true,autoWidth:true,url:'" << pForm->getURI().toString() << "',frame:true,items:[";
|
||||||
|
|
||||||
|
ContainerView::ConstIterator it = pForm->begin();
|
||||||
|
ContainerView::ConstIterator itEnd = pForm->end();
|
||||||
|
for (; it != itEnd; ++it)
|
||||||
|
{
|
||||||
|
if (it != pForm->begin())
|
||||||
|
ostr << ",";
|
||||||
|
// it points to a view pointer
|
||||||
|
(*it)->renderHead(context, ostr);
|
||||||
|
|
||||||
|
}
|
||||||
|
ostr << "]})";
|
||||||
|
//ostr << varName << ".render('p" << pForm->id() << "');";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string FormRenderer::formVariableName(const Form* pForm)
|
||||||
|
{
|
||||||
|
static const std::string prefix("f");
|
||||||
|
return prefix + Poco::NumberFormatter::format(pForm->id());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
105
WebWidgets/ExtJS/src/FrameRenderer.cpp
Normal file
105
WebWidgets/ExtJS/src/FrameRenderer.cpp
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
//
|
||||||
|
// FrameRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/FrameRenderer.cpp#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: FrameRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FrameRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Frame.h"
|
||||||
|
#include "Poco/WebWidgets/Layout.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
FrameRenderer::FrameRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FrameRenderer::~FrameRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FrameRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
const Frame* pPanel = static_cast<const Poco::WebWidgets::Frame*>(pRenderable);
|
||||||
|
ostr << "new Ext.Panel({";
|
||||||
|
|
||||||
|
writeProperties(pPanel, ostr);
|
||||||
|
// a frame has exactly one child
|
||||||
|
// if this child is a layout we are fine otherwise we have to generate the items array
|
||||||
|
View::Ptr pChild = pPanel->getChild();
|
||||||
|
if (pChild)
|
||||||
|
{
|
||||||
|
Layout::Ptr pLayout = pChild.cast<Layout>();
|
||||||
|
if (pLayout)
|
||||||
|
{
|
||||||
|
ostr << ",";
|
||||||
|
pLayout->renderHead(context, ostr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ostr << ",items:[";
|
||||||
|
pChild->renderHead(context, ostr);
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FrameRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FrameRenderer::writeProperties(const Frame* pFrame, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
Utility::writeRenderableProperties(pFrame, ostr);
|
||||||
|
ostr << ",frame:true";
|
||||||
|
if (pFrame->getWidth() > 0)
|
||||||
|
ostr << ",width:" << pFrame->getWidth();
|
||||||
|
if (pFrame->getHeight() > 0)
|
||||||
|
ostr << ",height:" << pFrame->getHeight();
|
||||||
|
if (!pFrame->getTitle().empty())
|
||||||
|
ostr << ",title:'" << pFrame->getTitle() << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
70
WebWidgets/ExtJS/src/GridLayoutRenderer.cpp
Normal file
70
WebWidgets/ExtJS/src/GridLayoutRenderer.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
//
|
||||||
|
// GridLayoutRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/GridLayoutRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: GridLayoutRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/GridLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/GridLayout.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
GridLayoutRenderer::GridLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GridLayoutRenderer::~GridLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GridLayoutRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::GridLayout));
|
||||||
|
const GridLayout* pLayout = static_cast<const Poco::WebWidgets::GridLayout*>(pRenderable);
|
||||||
|
std::ostringstream layoutConfig;
|
||||||
|
layoutConfig << "{columns:" << pLayout->columns() << "}";
|
||||||
|
std::string layout("table");
|
||||||
|
LayoutRenderer::renderLayoutHead(pLayout, context, ostr, layout, layoutConfig.str());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
74
WebWidgets/ExtJS/src/HTMLRenderer.cpp
Normal file
74
WebWidgets/ExtJS/src/HTMLRenderer.cpp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
//
|
||||||
|
// HTMLRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/HTMLRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: HTMLRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/HTMLRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/HTML.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
HTMLRenderer::HTMLRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HTMLRenderer::~HTMLRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void HTMLRenderer::renderHead(const Renderable* pRenderable, const RenderContext&, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::HTML));
|
||||||
|
const HTML* pHTML = static_cast<const Poco::WebWidgets::HTML*>(pRenderable);
|
||||||
|
ostr << "new Ext.Panel({border:false,bodyBorder:false,";
|
||||||
|
ostr << "html:'" << pHTML->getText() << "'})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void HTMLRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
70
WebWidgets/ExtJS/src/HorizontalLayoutRenderer.cpp
Normal file
70
WebWidgets/ExtJS/src/HorizontalLayoutRenderer.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
//
|
||||||
|
// HorizontalLayoutRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/HorizontalLayoutRenderer.cpp#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: HorizontalLayoutRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/HorizontalLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/HorizontalLayout.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
HorizontalLayoutRenderer::HorizontalLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HorizontalLayoutRenderer::~HorizontalLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void HorizontalLayoutRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::HorizontalLayout));
|
||||||
|
const HorizontalLayout* pLayout = static_cast<const Poco::WebWidgets::HorizontalLayout*>(pRenderable);
|
||||||
|
std::ostringstream layoutConfig;
|
||||||
|
layoutConfig << "{columns:" << pLayout->size() << "}";
|
||||||
|
std::string layout("column");
|
||||||
|
LayoutRenderer::renderLayoutHead(pLayout, context, ostr, layout, layoutConfig.str());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
113
WebWidgets/ExtJS/src/ImageButtonCellRenderer.cpp
Normal file
113
WebWidgets/ExtJS/src/ImageButtonCellRenderer.cpp
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
//
|
||||||
|
// ImageButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ImageButtonCellRenderer.cpp#5 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ImageButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ImageButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ImageButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ImageButtonCellRenderer::ImageButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImageButtonCellRenderer::~ImageButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageButtonCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::ImageButtonCell));
|
||||||
|
const ImageButtonCell* pButtonCell = static_cast<const Poco::WebWidgets::ImageButtonCell*>(pRenderable);
|
||||||
|
Image::Ptr ptrImg = pButtonCell->getImage();
|
||||||
|
bool hasImg = ptrImg && !ptrImg->getURI().empty();
|
||||||
|
if (!hasImg)
|
||||||
|
ostr << "new Ext.Button({";
|
||||||
|
else
|
||||||
|
ostr << "new Ext.Panel({border:false,bodyBorder:false,";
|
||||||
|
|
||||||
|
if (!hasImg) // write a normal button
|
||||||
|
ButtonCellRenderer::renderHead(pButtonCell, context, ostr);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ostr << "html:";
|
||||||
|
bool showTxt = pButtonCell->getShowText() || !hasImg;
|
||||||
|
writeHTML(pButtonCell, showTxt, ostr);
|
||||||
|
}
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageButtonCellRenderer::writeHTML(const ImageButtonCell* pButtonCell, bool showTxt, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
Image::Ptr ptrImg = pButtonCell->getImage();
|
||||||
|
ostr << "'<div>";
|
||||||
|
ostr << "<div>";
|
||||||
|
ostr << "<input src=\"" << Utility::safe(ptrImg->getURI().toString()) << "\"";
|
||||||
|
if (!ptrImg->getName().empty())
|
||||||
|
ostr << " name=\"" << ptrImg->getName() << "\"";
|
||||||
|
if (ptrImg->getWidth() > 0)
|
||||||
|
ostr << " width=\"" << ptrImg->getWidth() << "\"";
|
||||||
|
if (ptrImg->getHeight() > 0)
|
||||||
|
ostr << " height=\"" << ptrImg->getHeight() << "\"";
|
||||||
|
std::string tooltip = ptrImg->getToolTip();
|
||||||
|
if (!tooltip.empty())
|
||||||
|
ostr << " alt=\"" << Utility::safe(tooltip) << "\"";
|
||||||
|
ostr << " type=\"image\"/>";
|
||||||
|
ostr << "</div>";
|
||||||
|
std::string txt(pButtonCell->getOwner()->getText());
|
||||||
|
if (showTxt && !txt.empty())
|
||||||
|
ostr << "<div>" << Utility::safe(pButtonCell->getOwner()->getText()) << "</div>";
|
||||||
|
ostr << "</div>'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageButtonCellRenderer::writeConfigData(const Cell* pCell, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
89
WebWidgets/ExtJS/src/ImageRenderer.cpp
Normal file
89
WebWidgets/ExtJS/src/ImageRenderer.cpp
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
//
|
||||||
|
// ImageRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ImageRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ImageRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ImageRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Image.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ImageRenderer::ImageRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ImageRenderer::~ImageRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageRenderer::renderHead(const Renderable* pRenderable, const RenderContext&, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Image));
|
||||||
|
const Image* pImage = static_cast<const Poco::WebWidgets::Image*>(pRenderable);
|
||||||
|
ostr << "new Ext.Panel({border:false,bodyBorder:false,";
|
||||||
|
ostr << "html:";
|
||||||
|
writeHTML(pImage, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ImageRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ImageRenderer::writeHTML(const Image* pImage, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
ostr << "'<img src=\"" << Utility::safe(pImage->getURI().toString()) << "\" ";
|
||||||
|
std::string txt(pImage->getText());
|
||||||
|
if (!txt.empty())
|
||||||
|
ostr << "alt=\"" << txt << "\" ";
|
||||||
|
std::string tooltip(pImage->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
ostr << "title=\"" << tooltip << "\" ";
|
||||||
|
ostr << "/>'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
74
WebWidgets/ExtJS/src/LabelRenderer.cpp
Normal file
74
WebWidgets/ExtJS/src/LabelRenderer.cpp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
//
|
||||||
|
// LabelRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/LabelRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: LabelRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LabelRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Label.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
LabelRenderer::LabelRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LabelRenderer::~LabelRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LabelRenderer::renderHead(const Renderable* pRenderable, const RenderContext&, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Label));
|
||||||
|
const Label* pLabel = static_cast<const Poco::WebWidgets::Label*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "{xtype:'label', text:'" << Utility::safe(pLabel->getText()) << "'}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void LabelRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
130
WebWidgets/ExtJS/src/LayoutRenderer.cpp
Normal file
130
WebWidgets/ExtJS/src/LayoutRenderer.cpp
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
//
|
||||||
|
// LayoutRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/LayoutRenderer.cpp#5 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: LayoutRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Layout.h"
|
||||||
|
#include "Poco/WebWidgets/Frame.h"
|
||||||
|
#include "Poco/WebWidgets/Panel.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
LayoutRenderer::LayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LayoutRenderer::~LayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LayoutRenderer::renderLayoutHead(const Layout* pLayout, const RenderContext& context, std::ostream& ostr, const std::string& layoutId, const std::string& layoutConfig)
|
||||||
|
{
|
||||||
|
poco_assert_dbg(pLayout != 0);
|
||||||
|
Renderable::ID id(0);
|
||||||
|
View::Ptr ptrParent = pLayout->parent();
|
||||||
|
if (!(ptrParent && (ptrParent.cast<Frame>() || ptrParent.cast<Panel>())))
|
||||||
|
{
|
||||||
|
// the parent is not a panel
|
||||||
|
// assume that the direct parent is a panel
|
||||||
|
ostr << "new Ext.Panel({border:false,bodyBorder:false,";
|
||||||
|
renderParameters(pLayout, context, ostr, layoutId, layoutConfig);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
renderParameters(pLayout, context, ostr, layoutId, layoutConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void LayoutRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LayoutRenderer::renderParameters(const Layout* pLayout, const RenderContext& context, std::ostream& ostr, const std::string& layoutId, const std::string& layoutConfig)
|
||||||
|
{
|
||||||
|
poco_assert_dbg(pLayout != 0);
|
||||||
|
bool writeComma = false;
|
||||||
|
if (pLayout->getWidth() > 0)
|
||||||
|
ostr << "width:" << pLayout->getWidth() << ",";
|
||||||
|
if (!layoutId.empty())
|
||||||
|
{
|
||||||
|
ostr << "layout:'" << layoutId << "'";
|
||||||
|
writeComma = true;
|
||||||
|
}
|
||||||
|
if (!layoutConfig.empty())
|
||||||
|
{
|
||||||
|
if (writeComma)
|
||||||
|
ostr << ",layoutConfig:" << layoutConfig;
|
||||||
|
else
|
||||||
|
ostr << ",layoutConfig:" << layoutConfig;
|
||||||
|
writeComma = true;
|
||||||
|
}
|
||||||
|
if (writeComma)
|
||||||
|
ostr << ",items:[";
|
||||||
|
else
|
||||||
|
ostr << "items:[";
|
||||||
|
visitChildren(pLayout, context, ostr);
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LayoutRenderer::visitChildren(const Layout* pLayout, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
ContainerView::ConstIterator it = pLayout->begin();
|
||||||
|
for (; it != pLayout->end(); ++it)
|
||||||
|
{
|
||||||
|
if (it != pLayout->begin())
|
||||||
|
ostr << ",";
|
||||||
|
if (*it)
|
||||||
|
(*it)->renderHead(context, ostr);
|
||||||
|
else
|
||||||
|
ostr << "{}";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
118
WebWidgets/ExtJS/src/ListBoxCellRenderer.cpp
Normal file
118
WebWidgets/ExtJS/src/ListBoxCellRenderer.cpp
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
//
|
||||||
|
// ListBoxCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ListBoxCellRenderer.cpp#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ListBoxCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ListBoxCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ListBoxCell.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ListBoxCellRenderer::ListBoxCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ListBoxCellRenderer::~ListBoxCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ListBoxCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::ListBoxCell));
|
||||||
|
const ListBoxCell* pListBoxCell = static_cast<const Poco::WebWidgets::ListBoxCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.ux.Multiselect({";
|
||||||
|
|
||||||
|
ListBoxCellRenderer::renderProperties(pListBoxCell, ostr);
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ListBoxCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ListBoxCellRenderer::renderProperties(const ListBoxCell* pListBoxCell, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
Utility::writeRenderableProperties(pListBoxCell, ostr);
|
||||||
|
|
||||||
|
if (pListBoxCell->getHeight() > 0)
|
||||||
|
ostr << ",height:" << pListBoxCell->getHeight();
|
||||||
|
if (pListBoxCell->getWidth() > 0)
|
||||||
|
ostr << ",width:" << pListBoxCell->getWidth();
|
||||||
|
|
||||||
|
ostr << ",dataFields:['i','d'],data:[";
|
||||||
|
|
||||||
|
//now serialize data, use cached content for that
|
||||||
|
ListBoxCell::StringData::const_iterator it = pListBoxCell->beginString();
|
||||||
|
ListBoxCell::StringData::const_iterator itEnd = pListBoxCell->endString();
|
||||||
|
ListBoxCell::Data::const_iterator itV = pListBoxCell->begin();
|
||||||
|
ListBoxCell::Data::const_iterator itVEnd = pListBoxCell->end();
|
||||||
|
int cnt = 0;
|
||||||
|
bool selected=false;
|
||||||
|
std::ostringstream initValue;
|
||||||
|
initValue << "'";
|
||||||
|
for (; it != itEnd; ++it, ++cnt, ++itV)
|
||||||
|
{
|
||||||
|
if (it != pListBoxCell->beginString())
|
||||||
|
ostr << ",";
|
||||||
|
if (itV->second)
|
||||||
|
{
|
||||||
|
if (selected)
|
||||||
|
initValue << ",";
|
||||||
|
initValue << cnt;
|
||||||
|
selected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ostr << "['" << cnt << "','" << *it << "']";
|
||||||
|
}
|
||||||
|
initValue << "'";
|
||||||
|
ostr << "]";
|
||||||
|
ostr << ",valueField:'i',displayField:'d',initVal:" << initValue.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
78
WebWidgets/ExtJS/src/NumberFieldCellRenderer.cpp
Normal file
78
WebWidgets/ExtJS/src/NumberFieldCellRenderer.cpp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
//
|
||||||
|
// NumberFieldCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/NumberFieldCellRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: NumberFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/NumberFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/NumberFieldCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
NumberFieldCellRenderer::NumberFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NumberFieldCellRenderer::~NumberFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void NumberFieldCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::NumberFieldCell));
|
||||||
|
const NumberFieldCell* pCell = static_cast<const Poco::WebWidgets::NumberFieldCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.NumberField({";
|
||||||
|
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void NumberFieldCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
142
WebWidgets/ExtJS/src/PageRenderer.cpp
Normal file
142
WebWidgets/ExtJS/src/PageRenderer.cpp
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
//
|
||||||
|
// PageRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/PageRenderer.cpp#8 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PageRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PageRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Page.h"
|
||||||
|
#include "Poco/WebWidgets/RenderContext.h"
|
||||||
|
#include "Poco/WebWidgets/LookAndFeel.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
PageRenderer::PageRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PageRenderer::~PageRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PageRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
static const std::string STRO_HTML("<html>");
static const std::string STRO_HEAD ("<head>");
static const std::string STRO_TITLE ("<title>");
static const std::string STRC_HEAD ("</head>");
static const std::string STRC_TITLE ("</title>");
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Page));
|
||||||
|
const Page* pPage = static_cast<const Poco::WebWidgets::Page*>(pRenderable);
|
||||||
|
poco_assert_dbg (WebApplication::instance().getCurrentPage().get() == pPage);
|
||||||
|
const LookAndFeel& laf = context.lookAndFeel();
|
||||||
|
|
||||||
|
ostr << STRO_HTML << STRO_HEAD << STRO_TITLE;
|
||||||
|
ostr << pPage->getName();
|
||||||
|
ostr << STRC_TITLE;
|
||||||
|
//include javascript files: TODO: use ResourceManager
|
||||||
|
ostr << "<script type=\"text/javascript\" src=\"ext-base.js\"></script>";
ostr << "<script type=\"text/javascript\" src=\"ext-all.js\"></script>";
|
||||||
|
ostr << "<script type=\"text/javascript\" src=\"DDView.js\"></script>";
|
||||||
|
ostr << "<script type=\"text/javascript\" src=\"MultiSelect.js\"></script>";
|
||||||
|
ostr << "<link rel=\"stylesheet\" type=\"text/css\" href=\"resources/css/ext-all.css\">";
|
||||||
|
ostr << "<link rel=\"stylesheet\" type=\"text/css\" href=\"MultiSelect.css\">";
|
||||||
|
if (!pPage->empty())
|
||||||
|
{
|
||||||
|
//start inline javascript block
|
||||||
|
ostr << "<script type=\"text/javascript\">";
|
||||||
|
ostr << "Ext.onReady(function() {";
|
||||||
|
ostr << "Ext.QuickTips.init();";
|
||||||
|
// always nest a panel around, so we can get rid of dynamic casts to check for parent type
|
||||||
|
ostr << "new Ext.Panel({renderTo:'p" << pPage->id() << "',border:false,bodyBorder:false";
|
||||||
|
if (pPage->getHeight() > 0)
|
||||||
|
ostr << ",height:" << pPage->getHeight();
|
||||||
|
else
|
||||||
|
ostr << ",height:Ext.lib.Dom.getViewHeight()";
|
||||||
|
if (pPage->getWidth() > 0)
|
||||||
|
ostr << ",width:" << pPage->getWidth();
|
||||||
|
else
|
||||||
|
ostr << ",width:Ext.lib.Dom.getViewWidth()";
|
||||||
|
|
||||||
|
ostr << ",items:[";
|
||||||
|
|
||||||
|
//process all children
|
||||||
|
ContainerView::ConstIterator it = pPage->begin();
|
||||||
|
ContainerView::ConstIterator itEnd = pPage->end();
|
||||||
|
for (; it != itEnd; ++it)
|
||||||
|
{
|
||||||
|
if (it != pPage->begin())
|
||||||
|
ostr << ",";
|
||||||
|
|
||||||
|
(*it)->renderHead(context, ostr);
|
||||||
|
}
|
||||||
|
//close the panel
|
||||||
|
ostr << "]});";
|
||||||
|
//auto-show all windows
|
||||||
|
ostr << "Ext.WindowMgr.each( function(w) {w.show(this);});";
|
||||||
|
//close onReady
|
||||||
|
ostr << "});";
|
||||||
|
//close inline JS block
|
||||||
|
ostr << "</script>";
|
||||||
|
}
|
||||||
|
|
||||||
|
ostr << STRC_HEAD;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PageRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Page));
|
||||||
|
const Page* pPage = static_cast<const Poco::WebWidgets::Page*>(pRenderable);
|
||||||
|
const LookAndFeel& laf = context.lookAndFeel();
|
||||||
|
|
||||||
|
ostr << "<body>";
|
||||||
|
if (!pPage->empty())
|
||||||
|
{
|
||||||
|
//process all children: JS is a JavaScript library, we NEVER write to the body
|
||||||
|
ostr << "<div id=\"p" << pPage->id() << "\" />";
|
||||||
|
// also a tmp id for temporary storage!
|
||||||
|
ostr << "<div id=\"" << Utility::getTmpID() << "\" />";
|
||||||
|
}
|
||||||
|
ostr << "</body>";
|
||||||
|
ostr << "</html>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
105
WebWidgets/ExtJS/src/PanelRenderer.cpp
Normal file
105
WebWidgets/ExtJS/src/PanelRenderer.cpp
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
//
|
||||||
|
// PanelRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/PanelRenderer.cpp#5 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PanelRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PanelRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/Panel.h"
|
||||||
|
#include "Poco/WebWidgets/Layout.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
PanelRenderer::PanelRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PanelRenderer::~PanelRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PanelRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Panel));
|
||||||
|
const Panel* pPanel = static_cast<const Poco::WebWidgets::Panel*>(pRenderable);
|
||||||
|
ostr << "new Ext.Window({";
|
||||||
|
|
||||||
|
Utility::writeRenderableProperties(pRenderable, ostr);
|
||||||
|
if (!pPanel->getName().empty())
|
||||||
|
ostr << ",title:'" << pPanel->getName() << "'";
|
||||||
|
if (pPanel->getWidth() > 0)
|
||||||
|
ostr << ",width:" << pPanel->getWidth();
|
||||||
|
if (pPanel->getHeight() > 0)
|
||||||
|
ostr << ",height:" << pPanel->getHeight();
|
||||||
|
if (pPanel->getModal())
|
||||||
|
ostr << ",modal:true";
|
||||||
|
|
||||||
|
// minimizable set to true only fires a minimize event, without an event handler attached
|
||||||
|
// it is pretty useless, instead use collapsible
|
||||||
|
ostr << ",header:true,maximizable:true,collapsible:true";
|
||||||
|
// a panel has exactly one child
|
||||||
|
// if this child is a layout we are fine otherwise we have to generate the items array
|
||||||
|
View::Ptr pChild = pPanel->getChild();
|
||||||
|
if (pChild)
|
||||||
|
{
|
||||||
|
Layout::Ptr pLayout = pChild.cast<Layout>();
|
||||||
|
if (pLayout)
|
||||||
|
{
|
||||||
|
ostr << ",";
|
||||||
|
pLayout->renderHead(context, ostr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ostr << ",items:[";
|
||||||
|
pChild->renderHead(context, ostr);
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PanelRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
78
WebWidgets/ExtJS/src/PasswordFieldCellRenderer.cpp
Normal file
78
WebWidgets/ExtJS/src/PasswordFieldCellRenderer.cpp
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
//
|
||||||
|
// PasswordFieldCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/PasswordFieldCellRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: PasswordFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PasswordFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/PasswordFieldCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
PasswordFieldCellRenderer::PasswordFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PasswordFieldCellRenderer::~PasswordFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void PasswordFieldCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::PasswordFieldCell));
|
||||||
|
const PasswordFieldCell* pCell = static_cast<const Poco::WebWidgets::PasswordFieldCell*>(pRenderable);
|
||||||
|
//textfield with inputType: 'password'
|
||||||
|
ostr << "new Ext.form.TextField({inputType:'password',";
|
||||||
|
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PasswordFieldCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
88
WebWidgets/ExtJS/src/ProgressIndicatorRenderer.cpp
Normal file
88
WebWidgets/ExtJS/src/ProgressIndicatorRenderer.cpp
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
//
|
||||||
|
// ProgressIndicatorRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ProgressIndicatorRenderer.cpp#4 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ProgressIndicatorRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ProgressIndicatorRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ProgressIndicator.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ProgressIndicatorRenderer::ProgressIndicatorRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ProgressIndicatorRenderer::~ProgressIndicatorRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ProgressIndicatorRenderer::renderHead(const Renderable* pRenderable, const RenderContext&, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::ProgressIndicator));
|
||||||
|
const ProgressIndicator* pProgressIndicator = static_cast<const Poco::WebWidgets::ProgressIndicator*>(pRenderable);
|
||||||
|
//use progressbar
|
||||||
|
ostr << "new Ext.ProgressBar({";
|
||||||
|
Utility::writeRenderableProperties(pRenderable, ostr);
|
||||||
|
std::string txt(pProgressIndicator->getText());
|
||||||
|
if (!txt.empty())
|
||||||
|
ostr << ",text:'" << txt << "'";
|
||||||
|
if (pProgressIndicator->getHeight() > 0)
|
||||||
|
ostr << ",height:" << pProgressIndicator->getHeight();
|
||||||
|
if (pProgressIndicator->getWidth() > 0)
|
||||||
|
ostr << ",width:" << pProgressIndicator->getWidth();
|
||||||
|
if (pProgressIndicator->getUpdateMode() == ProgressIndicator::UM_MANUAL)
|
||||||
|
ostr << ",value:" << pProgressIndicator->getProgressPercent();
|
||||||
|
|
||||||
|
//in automatic use we simply call wait
|
||||||
|
//TODO: how should we integrate that???
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ProgressIndicatorRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
72
WebWidgets/ExtJS/src/RadioButtonCellRenderer.cpp
Normal file
72
WebWidgets/ExtJS/src/RadioButtonCellRenderer.cpp
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
//
|
||||||
|
// RadioButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/RadioButtonCellRenderer.cpp#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: RadioButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/RadioButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/RadioButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
RadioButtonCellRenderer::RadioButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RadioButtonCellRenderer::~RadioButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RadioButtonCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::RadioButtonCell));
|
||||||
|
const RadioButtonCell* pRadioButtonCell = static_cast<const Poco::WebWidgets::RadioButtonCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.Radio({";
|
||||||
|
|
||||||
|
ToggleButtonCellRenderer::renderProperties(pRadioButtonCell, ostr);
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
69
WebWidgets/ExtJS/src/SubmitButtonCellRenderer.cpp
Normal file
69
WebWidgets/ExtJS/src/SubmitButtonCellRenderer.cpp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//
|
||||||
|
// SubmitButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/SubmitButtonCellRenderer.cpp#1 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: SubmitButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/SubmitButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/SubmitButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
SubmitButtonCellRenderer::SubmitButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SubmitButtonCellRenderer::~SubmitButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SubmitButtonCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::SubmitButtonCell));
|
||||||
|
const SubmitButtonCell* pButtonCell = static_cast<const Poco::WebWidgets::SubmitButtonCell*>(pRenderable);
|
||||||
|
|
||||||
|
std::string content = "'" + Utility::safe(pButtonCell->getString()) + "'";
|
||||||
|
ButtonCellRenderer::renderButton(pButtonCell, content, true, true, ostr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
105
WebWidgets/ExtJS/src/TabViewRenderer.cpp
Normal file
105
WebWidgets/ExtJS/src/TabViewRenderer.cpp
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
//
|
||||||
|
// TabViewRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TabViewRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TabViewRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TabViewRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/TabView.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TabViewRenderer::TabViewRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TabViewRenderer::~TabViewRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TabViewRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::TabView));
|
||||||
|
const TabView* pTabView = static_cast<const Poco::WebWidgets::TabView*>(pRenderable);
|
||||||
|
|
||||||
|
// mhh, a tabPanel inside a form??? is this even possible?
|
||||||
|
|
||||||
|
ostr << "new Ext.TabPanel({";
|
||||||
|
if (pTabView->getActiveView() != TabView::NONE_SELECTED)
|
||||||
|
ostr << "activeTab:" << pTabView->getActiveView() << ",layoutOnTabChange: true,";
|
||||||
|
Utility::writeRenderableProperties(pRenderable, ostr);
|
||||||
|
ostr << ",";
|
||||||
|
renderParameters(pTabView, context, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TabViewRenderer::renderParameters(const TabView* pTabView, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg(pTabView != 0);
|
||||||
|
|
||||||
|
ostr << "items:[";
|
||||||
|
visitChildren(pTabView, context, ostr);
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TabViewRenderer::visitChildren(const TabView* pTabView, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
ContainerView::ConstIterator it = pTabView->begin();
|
||||||
|
for (; it != pTabView->end(); ++it)
|
||||||
|
{
|
||||||
|
if (it != pTabView->begin())
|
||||||
|
ostr << ",";
|
||||||
|
if (*it)
|
||||||
|
{
|
||||||
|
ostr << "{title:'" << (*it)->getName() << "',";
|
||||||
|
ostr << "items:[";
|
||||||
|
(*it)->renderHead(context, ostr);
|
||||||
|
ostr << "]}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ostr << "{}";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
128
WebWidgets/ExtJS/src/TableCellHandlerFactory.cpp
Normal file
128
WebWidgets/ExtJS/src/TableCellHandlerFactory.cpp
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
//
|
||||||
|
// TableCellHandlerFactory.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TableCellHandlerFactory.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TableCellHandlerFactory
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TableCellHandlerFactory.h"
|
||||||
|
#include "Poco/WebWidgets/CheckButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/TextEditCell.h"
|
||||||
|
#include "Poco/WebWidgets/TextFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/ComboBoxCell.h"
|
||||||
|
#include "Poco/WebWidgets/ButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/NumberFieldCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TableCellHandlerFactory::TableCellHandlerFactory()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
TableCellHandler<CheckButtonCell>::Ptr pHandle(new TableCellHandler<CheckButtonCell>("Ext.form.Checkbox", true, true));
|
||||||
|
pHandle->addDynamic("checked", &CheckButtonCell::getBool);
|
||||||
|
registerFactory(typeid(CheckButtonCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<TextEditCell>::Ptr pHandle(new TableCellHandler<TextEditCell>("Ext.form.TextArea", true, true));
|
||||||
|
pHandle->addDynamic("value", &TextEditCell::getString);
|
||||||
|
registerFactory(typeid(TextEditCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<TextFieldCell>::Ptr pHandle(new TableCellHandler<TextFieldCell>("Ext.form.TextField", true, false));
|
||||||
|
pHandle->addDynamic("value", &TextFieldCell::getString);
|
||||||
|
registerFactory(typeid(TextFieldCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<NumberFieldCell>::Ptr pHandle(new TableCellHandler<NumberFieldCell>("Ext.form.NumberField", true, false));
|
||||||
|
pHandle->addDynamic("value", &NumberFieldCell::getString);
|
||||||
|
registerFactory(typeid(NumberFieldCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<ComboBoxCell>::Ptr pHandle(new TableCellHandler<ComboBoxCell>("Ext.form.ComboBox", true, false));
|
||||||
|
pHandle->addDynamic("value", &ComboBoxCell::getString);
|
||||||
|
registerFactory(typeid(ComboBoxCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<ButtonCell>::Ptr pHandle(new TableCellHandler<ButtonCell>("Ext.Button", false, true));
|
||||||
|
pHandle->addDynamic("text", &ButtonCell::getString);
|
||||||
|
registerFactory(typeid(ButtonCell), pHandle);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
TableCellHandler<ImageButtonCell>::Ptr pHandle(new TableCellHandler<ImageButtonCell>(false, true));
|
||||||
|
registerFactory(typeid(ImageButtonCell), pHandle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TableCellHandlerFactory::~TableCellHandlerFactory()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TableCellHandlerFactory& TableCellHandlerFactory::instance()
|
||||||
|
{
|
||||||
|
static TableCellHandlerFactory fct;
|
||||||
|
return fct;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AbstractTableCellHandler::Ptr TableCellHandlerFactory::factory(const Cell::Ptr& t) const
|
||||||
|
{
|
||||||
|
ConstIterator it = _handlers.find(Type(t->type()));
|
||||||
|
if (it == _handlers.end())
|
||||||
|
throw NotFoundException();
|
||||||
|
|
||||||
|
AbstractTableCellHandler::Ptr pCopy = it->second->clone();
|
||||||
|
pCopy->init(t);
|
||||||
|
return pCopy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableCellHandlerFactory::registerFactory(const Type& t, AbstractTableCellHandler::Ptr ptr)
|
||||||
|
{
|
||||||
|
std::pair<Iterator, bool> res = _handlers.insert(std::make_pair(t, ptr));
|
||||||
|
if (!res.second)
|
||||||
|
res.first->second = ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableCellHandlerFactory::registerFactory(const std::type_info& t, AbstractTableCellHandler::Ptr ptr)
|
||||||
|
{
|
||||||
|
registerFactory(Type(t), ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
256
WebWidgets/ExtJS/src/TableRenderer.cpp
Normal file
256
WebWidgets/ExtJS/src/TableRenderer.cpp
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
//
|
||||||
|
// TableRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TableRenderer.cpp#4 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TableRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TableRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TableCellHandlerFactory.h"
|
||||||
|
#include "Poco/WebWidgets/Table.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
#include "Poco/WebWidgets/RequestHandler.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TableRenderer::TableRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TableRenderer::~TableRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::Table));
|
||||||
|
const Table* pTable = static_cast<const Poco::WebWidgets::Table*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.grid.EditorGridPanel({";
|
||||||
|
|
||||||
|
TableRenderer::renderProperties(pTable, context, ostr);
|
||||||
|
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderProperties(const Table* pTable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
Utility::writeRenderableProperties(pTable, ostr);
|
||||||
|
WebApplication& app = WebApplication::instance();
|
||||||
|
Renderable::ID id = app.getCurrentPage()->id();
|
||||||
|
// add an afterEdit handler
|
||||||
|
// event handlers can be defined in the constructor after the listeners member
|
||||||
|
//{
|
||||||
|
// 'afterEdit' : {
|
||||||
|
// fn: function(obj){obj.row, obj.column, obj.value, tableId}
|
||||||
|
//},
|
||||||
|
|
||||||
|
std::ostringstream uri;
|
||||||
|
uri << "'" <<app.getURI().toString();
|
||||||
|
uri << ";"; //mark as AJAX request
|
||||||
|
uri << RequestHandler::KEY_ID << "=" << id << "&";
|
||||||
|
uri << Table::FIELD_COL << "='+obj.column+'&";
|
||||||
|
uri << Table::FIELD_ROW << "='+obj.row+'&" << Table::FIELD_VAL << "='+obj.value";
|
||||||
|
//obj.commitChanges... hides the red triangle
|
||||||
|
ostr << ", listeners: {'afteredit':{fn:function(obj){var uri=" << uri.str() << ";obj.grid.getStore().commitChanges();";
|
||||||
|
ostr << "Ext.Ajax.request({url:uri,";
|
||||||
|
ostr << "failure:function(){Ext.MessageBox.alert('Status','Failed to write changes back to server.');}});}}},";
|
||||||
|
|
||||||
|
renderColumns(pTable, context, ostr);
|
||||||
|
ostr << ",clicksToEdit:1,store:";
|
||||||
|
renderStore(pTable, ostr);
|
||||||
|
app.registerAjaxProcessor(Poco::NumberFormatter::format(id), const_cast<Table*>(pTable));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderColumns(const Table* pTable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
|
||||||
|
//columns: [...]
|
||||||
|
ostr << "columns:[";
|
||||||
|
const Table::TableColumns& columns = pTable->getColumns();
|
||||||
|
Table::TableColumns::const_iterator it = columns.begin();
|
||||||
|
int i = 0;
|
||||||
|
for (; it != columns.end(); ++it, ++i)
|
||||||
|
{
|
||||||
|
if (i != 0)
|
||||||
|
ostr << ",";
|
||||||
|
|
||||||
|
renderColumn(pTable, *(*it), i, context, ostr);
|
||||||
|
}
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderColumn(const Table* pTable, const TableColumn& tc, int idx, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
static LookAndFeel& laf = Utility::getDefaultRenderers();
|
||||||
|
|
||||||
|
// {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'}
|
||||||
|
// {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
|
||||||
|
ostr << "{";
|
||||||
|
std::string hdr(Utility::safe(tc.getHeader()));
|
||||||
|
|
||||||
|
ostr << "header:'" << hdr << "',dataIndex:'" << idx << "'";
|
||||||
|
|
||||||
|
if (tc.getWidth() > 0)
|
||||||
|
ostr << ",width:" << tc.getWidth();
|
||||||
|
if (tc.isSortable())
|
||||||
|
ostr << ",sortable:true";
|
||||||
|
|
||||||
|
static TableCellHandlerFactory& fty = TableCellHandlerFactory::instance();
|
||||||
|
|
||||||
|
if (tc.getCell())
|
||||||
|
{
|
||||||
|
AbstractTableCellHandler::Ptr pHandler = fty.factory(tc.getCell());
|
||||||
|
if (tc.getCell()->isEditable())
|
||||||
|
ostr << ",editable:true";
|
||||||
|
if (tc.getCell()->isEditable() && pHandler->useEditor())
|
||||||
|
{
|
||||||
|
ostr << ",editor:";
|
||||||
|
tc.getCell()->renderHead(context, ostr);
|
||||||
|
}
|
||||||
|
if (pHandler->useRenderer())
|
||||||
|
{
|
||||||
|
ostr << ",renderer:";
|
||||||
|
pHandler->writeDynamicData(ostr);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ostr << "}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderDataModel(const Table* pTable, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
//[
|
||||||
|
//[ ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
|
||||||
|
//[ ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am']
|
||||||
|
//]
|
||||||
|
const TableModel& tm = pTable->getModel();
|
||||||
|
const Table::TableColumns& tc = pTable->getColumns();
|
||||||
|
|
||||||
|
poco_assert_dbg (tc.size() == tm.getColumnCount());
|
||||||
|
|
||||||
|
std::size_t colCnt = tm.getColumnCount();
|
||||||
|
std::size_t rowCnt = tm.getRowCount();
|
||||||
|
ostr << "[";
|
||||||
|
for (std::size_t row = 0; row < rowCnt; ++row)
|
||||||
|
{
|
||||||
|
if (row != 0)
|
||||||
|
ostr << ",[";
|
||||||
|
else
|
||||||
|
ostr << "[";
|
||||||
|
for (std::size_t col = 0; col < colCnt; ++col)
|
||||||
|
{
|
||||||
|
if (col != 0)
|
||||||
|
ostr << ",";
|
||||||
|
|
||||||
|
//FIXME: how do we distinguish if we want to write something as text or GUIElement?
|
||||||
|
// Example: Checkbutton can be written as text "true"/"false" or as a CheckButton
|
||||||
|
// we use the Cell: if we have a Cell set -> complex Type otherwise text
|
||||||
|
// -> already handled by the renderer!
|
||||||
|
const Poco::Any& aVal = tm.getValue(row, col);
|
||||||
|
|
||||||
|
if (aVal.empty())
|
||||||
|
ostr << "''";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//FIXME: we have no type nfo at all, assume string for everything
|
||||||
|
bool isString = (typeid(std::string) == aVal.type());
|
||||||
|
Cell::Ptr ptrCell = tc[col]->getCell();
|
||||||
|
if (isString)
|
||||||
|
ostr << "'" << RefAnyCast<std::string>(aVal) << "'";
|
||||||
|
else if (ptrCell)
|
||||||
|
ostr << tc[col]->getCell()->getFormatter()->format(aVal);
|
||||||
|
else
|
||||||
|
; //FIXME:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
ostr << "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TableRenderer::renderStore(const Table* pTable, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
//new Ext.data.SimpleStore({
|
||||||
|
// fields: [
|
||||||
|
// {name: 'company'},
|
||||||
|
// {name: 'price', type: 'float'},
|
||||||
|
// {name: 'change', type: 'float'},
|
||||||
|
// {name: 'pctChange', type: 'float'},
|
||||||
|
// {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
|
||||||
|
// ],
|
||||||
|
// data: [...]
|
||||||
|
//});
|
||||||
|
|
||||||
|
// we don't know the type, we just have a formatter, the name is always the idx!
|
||||||
|
// we use the formatter later to set a renderer for a different type than string
|
||||||
|
const Table::TableColumns& columns = pTable->getColumns();
|
||||||
|
ostr << "new Ext.data.SimpleStore({fields:[";
|
||||||
|
Table::TableColumns::const_iterator it = columns.begin();
|
||||||
|
int i = 0;
|
||||||
|
for (; it != columns.end(); ++it, ++i)
|
||||||
|
{
|
||||||
|
if (i != 0)
|
||||||
|
ostr << ",";
|
||||||
|
ostr << "{name:'" << i << "'}";
|
||||||
|
}
|
||||||
|
ostr << "],"; // close fields
|
||||||
|
//Write data
|
||||||
|
ostr << "data:";
|
||||||
|
renderDataModel(pTable, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
109
WebWidgets/ExtJS/src/TextEditCellRenderer.cpp
Normal file
109
WebWidgets/ExtJS/src/TextEditCellRenderer.cpp
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
//
|
||||||
|
// TextEditCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TextEditCellRenderer.cpp#3 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TextEditCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextEditCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/TextEditCell.h"
|
||||||
|
#include "Poco/WebWidgets/Control.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TextEditCellRenderer::TextEditCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TextEditCellRenderer::~TextEditCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextEditCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::TextEditCell));
|
||||||
|
const TextEditCell* pCell = static_cast<const Poco::WebWidgets::TextEditCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.TextArea({";
|
||||||
|
|
||||||
|
TextEditCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
if (pCell->getOwner() && !pCell->getOwner()->getName().empty())
|
||||||
|
{
|
||||||
|
WebApplication::instance().registerFormProcessor(pCell->getOwner()->getName(), const_cast<TextEditCell*>(pCell));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextEditCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextEditCellRenderer::writeCellProperties(const TextEditCell* pCell, std::ostream& ostr, bool writeValue)
|
||||||
|
{
|
||||||
|
Utility::writeCellProperties(pCell, ostr);
|
||||||
|
|
||||||
|
if (writeValue&& !pCell->getValue().empty())
|
||||||
|
{
|
||||||
|
ostr << ", value:'" << Utility::safe(pCell->getString()) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pCell->isEditable())
|
||||||
|
ostr << ", readOnly:true";
|
||||||
|
if (pCell->getHeightInPixel() > 0)
|
||||||
|
ostr << ", height:" << pCell->getHeightInPixel();
|
||||||
|
if (pCell->getGrow())
|
||||||
|
ostr << ", grow:true";
|
||||||
|
|
||||||
|
if (!pCell->getPlaceHolder().empty())
|
||||||
|
ostr << ", emptyText:'" << Utility::safe(pCell->getPlaceHolder()) << "'";
|
||||||
|
|
||||||
|
//tooltip is not supported by textEdit, add listeners
|
||||||
|
std::string tooltip (pCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
ostr << ", listeners: {render: function(c) {Ext.QuickTips.register({target: c.getEl(),text: '" << Utility::safe(tooltip) << "'});}}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
107
WebWidgets/ExtJS/src/TextFieldCellRenderer.cpp
Normal file
107
WebWidgets/ExtJS/src/TextFieldCellRenderer.cpp
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// TextFieldCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TextFieldCellRenderer.cpp#6 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TextFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/TextFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/Control.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TextFieldCellRenderer::TextFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TextFieldCellRenderer::~TextFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextFieldCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::TextFieldCell));
|
||||||
|
const TextFieldCell* pCell = static_cast<const Poco::WebWidgets::TextFieldCell*>(pRenderable);
|
||||||
|
ostr << "new Ext.form.TextField({";
|
||||||
|
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
if (pCell->getOwner() && !pCell->getOwner()->getName().empty())
|
||||||
|
{
|
||||||
|
WebApplication::instance().registerFormProcessor(pCell->getOwner()->getName(), const_cast<TextFieldCell*>(pCell));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextFieldCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TextFieldCellRenderer::writeCellProperties(const TextFieldCell* pCell, std::ostream& ostr, bool writeValue)
|
||||||
|
{
|
||||||
|
Utility::writeCellProperties(pCell, ostr);
|
||||||
|
|
||||||
|
if (writeValue&& !pCell->getValue().empty())
|
||||||
|
{
|
||||||
|
ostr << ",value:'" << Utility::safe(pCell->getString()) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pCell->isEditable())
|
||||||
|
ostr << ",readOnly:true";
|
||||||
|
|
||||||
|
if (!pCell->getPlaceHolder().empty())
|
||||||
|
ostr << ",emptyText:'" << Utility::safe(pCell->getPlaceHolder()) << "'";
|
||||||
|
|
||||||
|
if (pCell->getMaxLength() > 0)
|
||||||
|
ostr << ",maxLength:" << pCell->getMaxLength();
|
||||||
|
|
||||||
|
//tooltip is not supported by textField, add listeners
|
||||||
|
std::string tooltip (pCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
ostr << ",listeners:{render:function(c){Ext.QuickTips.register({target:c.getEl(),text:'" << Utility::safe(tooltip) << "'});}}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
101
WebWidgets/ExtJS/src/TimeFieldCellRenderer.cpp
Normal file
101
WebWidgets/ExtJS/src/TimeFieldCellRenderer.cpp
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
//
|
||||||
|
// TimeFieldCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/TimeFieldCellRenderer.cpp#4 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: TimeFieldCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TimeFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/TimeFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
TimeFieldCellRenderer::TimeFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TimeFieldCellRenderer::~TimeFieldCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void TimeFieldCellRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::TimeFieldCell));
|
||||||
|
const TimeFieldCell* pCell = static_cast<const Poco::WebWidgets::TimeFieldCell*>(pRenderable);
|
||||||
|
|
||||||
|
ostr << "new Ext.form.TimeField({";
|
||||||
|
|
||||||
|
TimeFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
ostr << "})";
|
||||||
|
if (pCell->getOwner() && !pCell->getOwner()->getName().empty())
|
||||||
|
{
|
||||||
|
WebApplication::instance().registerFormProcessor(pCell->getOwner()->getName(), const_cast<TimeFieldCell*>(pCell));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TimeFieldCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TimeFieldCellRenderer::writeCellProperties(const TimeFieldCell* pCell, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
TextFieldCellRenderer::writeCellProperties(pCell, ostr);
|
||||||
|
TimeField::Format fmt = pCell->getFormat();
|
||||||
|
static const std::string fmt24h("'H:i'");
|
||||||
|
static const std::string fmt24hs("'H:i:s'");
|
||||||
|
static const std::string fmtAmPms("'h:i:s A'");
|
||||||
|
if (fmt == TimeField::FMT_24H)
|
||||||
|
ostr << ",format:" << fmt24h;
|
||||||
|
else if (fmt == TimeField::FMT_24H_WITHSECONDS)
|
||||||
|
ostr << ",format:" << fmt24hs;
|
||||||
|
else if (fmt == TimeField::FMT_AMPM_WITHSECONDS)
|
||||||
|
ostr << ",format:" << fmtAmPms;
|
||||||
|
else
|
||||||
|
; // this is the default
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
81
WebWidgets/ExtJS/src/ToggleButtonCellRenderer.cpp
Normal file
81
WebWidgets/ExtJS/src/ToggleButtonCellRenderer.cpp
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
//
|
||||||
|
// ToggleButtonCellRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/ToggleButtonCellRenderer.cpp#4 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: ToggleButtonCellRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ToggleButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/WebApplication.h"
|
||||||
|
#include "Poco/WebWidgets/ToggleButtonCell.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
ToggleButtonCellRenderer::ToggleButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ToggleButtonCellRenderer::~ToggleButtonCellRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ToggleButtonCellRenderer::renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ToggleButtonCellRenderer::renderProperties(const ToggleButtonCell* pToggleButtonCell, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
if (!pToggleButtonCell->getLabel().empty())
|
||||||
|
ostr << "boxLabel:'" << Utility::safe(pToggleButtonCell->getLabel()) << "',";
|
||||||
|
ostr << "checked:" << (pToggleButtonCell->isChecked()?"true":"false") << ",";
|
||||||
|
Utility::writeCellProperties(pToggleButtonCell, ostr);
|
||||||
|
//tooltip is not supported by togglebutton
|
||||||
|
std::string tooltip (pToggleButtonCell->getToolTip());
|
||||||
|
if (!tooltip.empty())
|
||||||
|
ostr << ",listeners:{render:function(c){c.getEl().dom.qtip='" << Utility::safe(tooltip) << "'; c.getEl().dom.qclass = 'x-form-tip';}}";
|
||||||
|
if (pToggleButtonCell->getOwner() && !pToggleButtonCell->getOwner()->getName().empty())
|
||||||
|
{
|
||||||
|
WebApplication::instance().registerFormProcessor(pToggleButtonCell->getOwner()->getName(), const_cast<ToggleButtonCell*>(pToggleButtonCell));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
382
WebWidgets/ExtJS/src/Utility.cpp
Normal file
382
WebWidgets/ExtJS/src/Utility.cpp
Normal file
@ -0,0 +1,382 @@
|
|||||||
|
//
|
||||||
|
// Utility.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/Utility.cpp#17 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: Utility
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/LabelRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PageRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/SubmitButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CollapsibleRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FormRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/FrameRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TimeFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/DateFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PasswordFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/NumberFieldCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ComboBoxCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ImageButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TextEditCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/CheckButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/RadioButtonCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/GridLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/PanelRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/HorizontalLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/VerticalLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ImageRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TabViewRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/ListBoxCellRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/TableRenderer.h"
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/Label.h"
|
||||||
|
#include "Poco/WebWidgets/Page.h"
|
||||||
|
#include "Poco/WebWidgets/ButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/SubmitButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/Collapsible.h"
|
||||||
|
#include "Poco/WebWidgets/Form.h"
|
||||||
|
#include "Poco/WebWidgets/Frame.h"
|
||||||
|
#include "Poco/WebWidgets/Panel.h"
|
||||||
|
#include "Poco/WebWidgets/Cell.h"
|
||||||
|
#include "Poco/WebWidgets/View.h"
|
||||||
|
#include "Poco/WebWidgets/GridLayout.h"
|
||||||
|
#include "Poco/WebWidgets/TextFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/TimeFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/DateFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/PasswordFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/NumberFieldCell.h"
|
||||||
|
#include "Poco/WebWidgets/ComboBoxCell.h"
|
||||||
|
#include "Poco/WebWidgets/ImageButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/TextEditCell.h"
|
||||||
|
#include "Poco/WebWidgets/CheckButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/RadioButtonCell.h"
|
||||||
|
#include "Poco/WebWidgets/HorizontalLayout.h"
|
||||||
|
#include "Poco/WebWidgets/VerticalLayout.h"
|
||||||
|
#include "Poco/WebWidgets/Image.h"
|
||||||
|
#include "Poco/WebWidgets/TabView.h"
|
||||||
|
#include "Poco/WebWidgets/ListBoxCell.h"
|
||||||
|
#include "Poco/WebWidgets/Table.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/String.h"
|
||||||
|
#include "Poco/DateTimeFormat.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::initialize(LookAndFeel::Ptr ptr)
|
||||||
|
{
|
||||||
|
ptr->registerRenderer(typeid(Label), new LabelRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Page), new PageRenderer());
|
||||||
|
ptr->registerRenderer(typeid(ButtonCell), new ButtonCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(SubmitButtonCell), new SubmitButtonCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Form), new FormRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Frame), new FrameRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Collapsible), new CollapsibleRenderer());
|
||||||
|
ptr->registerRenderer(typeid(TextFieldCell), new TextFieldCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(TimeFieldCell), new TimeFieldCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(DateFieldCell), new DateFieldCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(PasswordFieldCell), new PasswordFieldCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(NumberFieldCell), new NumberFieldCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(ComboBoxCell), new ComboBoxCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(ImageButtonCell), new ImageButtonCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(TextEditCell), new TextEditCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(CheckButtonCell), new CheckButtonCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(RadioButtonCell), new RadioButtonCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(ListBoxCell), new ListBoxCellRenderer());
|
||||||
|
ptr->registerRenderer(typeid(GridLayout), new GridLayoutRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Panel), new PanelRenderer());
|
||||||
|
ptr->registerRenderer(typeid(HorizontalLayout), new HorizontalLayoutRenderer());
|
||||||
|
ptr->registerRenderer(typeid(VerticalLayout), new VerticalLayoutRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Image), new ImageRenderer());
|
||||||
|
ptr->registerRenderer(typeid(TabView), new TabViewRenderer());
|
||||||
|
ptr->registerRenderer(typeid(Table), new TableRenderer());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const std::string& Utility::getTmpID()
|
||||||
|
{
|
||||||
|
static const std::string tmp("tmp");
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::writeRenderableProperties(const Renderable* pRend, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
ostr << "id:'" << pRend->id() << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::writeRenderableProperties(const std::string& id, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
if (!id.empty())
|
||||||
|
ostr << "id:'" << id << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::writeCellProperties(const Cell* pCell, std::ostream& ostr, bool writeId)
|
||||||
|
{
|
||||||
|
if (writeId)
|
||||||
|
writeRenderableProperties(pCell, ostr);
|
||||||
|
//don't support label for cell, keep this separate
|
||||||
|
ostr << ",hideLabel:true";
|
||||||
|
if (!pCell->isEnabled())
|
||||||
|
ostr << ",disabled:true";
|
||||||
|
View* pOwner = pCell->getOwner();
|
||||||
|
if (pOwner)
|
||||||
|
{
|
||||||
|
if (!pOwner->getName().empty())
|
||||||
|
ostr << ",name:'" << pOwner->getName() << "'";
|
||||||
|
if (pOwner->getWidth() != 0)
|
||||||
|
ostr << ",width:" << pOwner->getWidth();
|
||||||
|
if (pOwner->getHeight() != 0)
|
||||||
|
ostr << ",height:" << pOwner->getHeight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::writeCellProperties(const std::string& id,
|
||||||
|
const std::string& disabled,
|
||||||
|
const std::string& name,
|
||||||
|
const std::string& width,
|
||||||
|
const std::string& height,
|
||||||
|
std::ostream& ostr)
|
||||||
|
{
|
||||||
|
|
||||||
|
writeRenderableProperties(id, ostr);
|
||||||
|
//don't support label for cell, keep this separate
|
||||||
|
if (!id.empty())
|
||||||
|
ostr << ",";
|
||||||
|
ostr << "hideLabel:true,";
|
||||||
|
if (!disabled.empty())
|
||||||
|
ostr << ",disabled:" << disabled;
|
||||||
|
|
||||||
|
if (!name.empty())
|
||||||
|
ostr << ",name:" << name;
|
||||||
|
|
||||||
|
if (!width.empty())
|
||||||
|
ostr << ",width:" << width;
|
||||||
|
if (!height.empty())
|
||||||
|
ostr << ",height:" << height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string Utility::safe(const std::string& str)
|
||||||
|
{
|
||||||
|
std::string safe(Poco::replace(str, "\\", "\\\\"));
|
||||||
|
Poco::replaceInPlace(safe, "'", "\\'");
|
||||||
|
return safe;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string Utility::convertPocoDateToPHPDate(const std::string& dateTimeFmt)
|
||||||
|
{
|
||||||
|
if (dateTimeFmt == Poco::DateTimeFormat::ISO8601_FORMAT)
|
||||||
|
return "c";
|
||||||
|
|
||||||
|
std::string result;
|
||||||
|
bool inPercent = false;
|
||||||
|
for (int i = 0; i < dateTimeFmt.length(); ++i)
|
||||||
|
{
|
||||||
|
if (inPercent)
|
||||||
|
{
|
||||||
|
convertPocoDateToPHPDate(dateTimeFmt[i], result);
|
||||||
|
inPercent = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dateTimeFmt[i] == '%')
|
||||||
|
{
|
||||||
|
poco_assert_dbg(!inPercent);
|
||||||
|
inPercent = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
escapeCharForPHP(dateTimeFmt[i], result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::convertPocoDateToPHPDate(char in, std::string& result)
|
||||||
|
{
|
||||||
|
//Not supported in POCO:
|
||||||
|
// *??->w - Numeric representation of the day of the week (1-7)
|
||||||
|
// *??->z - Day of the year starting with zero for jan the 1st (0 - 364/365)
|
||||||
|
// *??->W - ISO-8601 week number of year, weeks starting on Monday (01-53)
|
||||||
|
// *??->t - Number of days in the given month (28-31)
|
||||||
|
// *??->L - 1 for a yeap lear, 0 otherwise
|
||||||
|
// *??->o - ISO-8601 year number but if the ISO week number (W) belongs to the previous or next year, that year is used instead
|
||||||
|
// *??->g - 12-hour format of an hour without leading zeros
|
||||||
|
// *??->G - 24-hour format of an hour without leading zeros
|
||||||
|
// *??->T - Timezone abbreviation of the machine running the code, examples: EST, MDT, PDT
|
||||||
|
// *??->Z - Timezone offset in seconds (negative if west of UTC, positive if east) -43200 to 50400
|
||||||
|
// *??->c - ISO 8601 date, should be handled in the caller must not occur here
|
||||||
|
// *??->U - Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 or -2138434463
|
||||||
|
|
||||||
|
// * %w->D - abbreviated weekday (Mon, Tue, ...)
|
||||||
|
// * %W->l - full weekday (Monday, Tuesday, ...)
|
||||||
|
// * %b->M - abbreviated month (Jan, Feb, ...)
|
||||||
|
// * %B->F - full month (January, February, ...)
|
||||||
|
// * %d->d - zero-padded day of month (01 .. 31)
|
||||||
|
// * %e->j - day of month (1 .. 31)
|
||||||
|
// * %m->m - zero-padded month (01 .. 12)
|
||||||
|
// * %n->n - month (1 .. 12)
|
||||||
|
// * %y->y - year without century (70)
|
||||||
|
// * %Y->Y - year with century (1970)
|
||||||
|
// * %H->H - hour (00 .. 23)
|
||||||
|
// * %h->h - hour (00 .. 12)
|
||||||
|
// * %a->a - am/pm
|
||||||
|
// * %A->A - AM/PM
|
||||||
|
// * %M->i - minute (00 .. 59)
|
||||||
|
// * %S->s - second (00 .. 59)
|
||||||
|
// * %i->u - millisecond (000 .. 999)
|
||||||
|
// * %z->P - time zone differential in ISO 8601 format (Z or +NN.NN).
|
||||||
|
// * %Z->O - time zone differential in RFC format (GMT or +NNNN)
|
||||||
|
// * %%->% - percent sign
|
||||||
|
|
||||||
|
//Not supported in PHP/extjs
|
||||||
|
// * %f - space-padded day of month ( 1 .. 31), solution: map this to zeropadded: d
|
||||||
|
// * %o - space-padded month ( 1 .. 12), solution: map this to zeropadded: m
|
||||||
|
// * %c - centisecond (0 .. 9), solution use millisecond: u
|
||||||
|
static const char table[]={
|
||||||
|
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F',
|
||||||
|
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F',
|
||||||
|
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/',
|
||||||
|
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||||
|
'@', 'A', 'F', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'i', 'N', 'O',
|
||||||
|
'P', 'Q', 'R', 's', 'T', 'U', 'V', 'l', 'X', 'Y', 'O', '[', '\\', ']', '^', '_',
|
||||||
|
'`', 'a', 'M', 'u', 'd', 'j', 'f', 'g', 'h', 'u', 'j', 'k', 'l', 'm', 'n', 'm',
|
||||||
|
'p', 'q', 'r', 's', 't', 'u', 'v', 'D', 'x', 'y', 'P', '{', '|', '}', '~', '\x7F'};
|
||||||
|
|
||||||
|
|
||||||
|
if (in < 0 || in > 127)
|
||||||
|
{
|
||||||
|
result.append(1, in);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
result.append(1, table[in]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::escapeCharForPHP(char in, std::string& result)
|
||||||
|
{
|
||||||
|
// lowest ascii value is 32 ' '
|
||||||
|
static const char table[]={
|
||||||
|
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
|
||||||
|
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
|
||||||
|
'0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0',
|
||||||
|
'0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0',
|
||||||
|
'0', '1', '0', '0', '1', '0', '1', '1', '1', '0', '0', '0', '1', '1', '1', '1',
|
||||||
|
'1', '0', '0', '1', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '0', '0',
|
||||||
|
'0', '1', '0', '1', '1', '0', '0', '1', '1', '1', '1', '0', '1', '1', '1', '1',
|
||||||
|
'0', '0', '0', '1', '1', '1', '0', '1', '0', '1', '1', '0', '0', '0', '0', '0'};
|
||||||
|
|
||||||
|
if (in < 0 || in > 127)
|
||||||
|
{
|
||||||
|
result.append(1, in);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (table[in] == '1')
|
||||||
|
{
|
||||||
|
result.append(1, '\\');
|
||||||
|
}
|
||||||
|
|
||||||
|
result.append(1, in);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Utility::convertPHPDateToPocoDate(char in, std::string& result)
|
||||||
|
{
|
||||||
|
static const char table[]={
|
||||||
|
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F',
|
||||||
|
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D', '\x1E', '\x1F',
|
||||||
|
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/',
|
||||||
|
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||||
|
'@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
|
||||||
|
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||||
|
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '\x7F'};
|
||||||
|
|
||||||
|
if (in < 0 || in > 127)
|
||||||
|
{
|
||||||
|
result.append(1, in);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LookAndFeel::Ptr Utility::createDefault()
|
||||||
|
{
|
||||||
|
LookAndFeel::Ptr ptr = new LookAndFeel();
|
||||||
|
Utility::initialize(ptr);
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LookAndFeel& Utility::getDefaultRenderers()
|
||||||
|
{
|
||||||
|
static LookAndFeel::Ptr ptr = createDefault();
|
||||||
|
return *ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Form::Ptr Utility::insideForm(const View* pChild)
|
||||||
|
{
|
||||||
|
Form::Ptr ptr;
|
||||||
|
|
||||||
|
while (pChild && !ptr)
|
||||||
|
{
|
||||||
|
View::Ptr ptrView = pChild->parent();
|
||||||
|
ptr = ptrView.cast<Form>();
|
||||||
|
pChild = ptrView;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Form::Ptr Utility::insideForm(const Cell* pChild)
|
||||||
|
{
|
||||||
|
return Utility::insideForm(pChild->getOwner());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
70
WebWidgets/ExtJS/src/VerticalLayoutRenderer.cpp
Normal file
70
WebWidgets/ExtJS/src/VerticalLayoutRenderer.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
//
|
||||||
|
// VerticalLayoutRenderer.cpp
|
||||||
|
//
|
||||||
|
// $Id: //poco/Main/WebWidgets/ExtJS/src/VerticalLayoutRenderer.cpp#2 $
|
||||||
|
//
|
||||||
|
// Library: ExtJS
|
||||||
|
// Package: Core
|
||||||
|
// Module: VerticalLayoutRenderer
|
||||||
|
//
|
||||||
|
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/WebWidgets/ExtJS/VerticalLayoutRenderer.h"
|
||||||
|
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||||
|
#include "Poco/WebWidgets/VerticalLayout.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
namespace WebWidgets {
|
||||||
|
namespace ExtJS {
|
||||||
|
|
||||||
|
|
||||||
|
VerticalLayoutRenderer::VerticalLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VerticalLayoutRenderer::~VerticalLayoutRenderer()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void VerticalLayoutRenderer::renderHead(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr)
|
||||||
|
{
|
||||||
|
poco_assert_dbg (pRenderable != 0);
|
||||||
|
poco_assert_dbg (pRenderable->type() == typeid(Poco::WebWidgets::VerticalLayout));
|
||||||
|
const VerticalLayout* pLayout = static_cast<const Poco::WebWidgets::VerticalLayout*>(pRenderable);
|
||||||
|
// a vertical layout is a table with one column
|
||||||
|
std::string layoutConfig("{columns:1}");
|
||||||
|
std::string layout("table");
|
||||||
|
LayoutRenderer::renderLayoutHead(pLayout, context, ostr, layout, layoutConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} } } // namespace Poco::WebWidgets::ExtJS
|
18
WebWidgets/ExtJS/testsuite/Makefile
Normal file
18
WebWidgets/ExtJS/testsuite/Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
#
|
||||||
|
# $Id: //poco/Main/template/TestSuite.make#3 $
|
||||||
|
#
|
||||||
|
# Makefile for Poco ExtJS testsuite
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
|
objects = ExtJSTestSuite Driver \
|
||||||
|
<SourceFilesHere>
|
||||||
|
|
||||||
|
target = testrunner
|
||||||
|
target_version = 1
|
||||||
|
target_libs = PocoExtJS PocoFoundation CppUnit
|
||||||
|
|
||||||
|
include $(POCO_BASE)/build/rules/exec
|
179
WebWidgets/ExtJS/testsuite/TestSuite_VS71.vcproj
Normal file
179
WebWidgets/ExtJS/testsuite/TestSuite_VS71.vcproj
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.10"
|
||||||
|
Name="TestSuite"
|
||||||
|
ProjectGUID="{ab43a995-70fa-4297-bd01-6c88938aa86d}"
|
||||||
|
Keyword="Win32Proj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\include;..\..\Foundation\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
MinimalRebuild="TRUE"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="TRUE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="4"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="CppUnitd.lib WinTestRunnerd.lib PocoFoundationd.lib "
|
||||||
|
OutputFile="bin/TestSuited.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
GenerateDebugInformation="TRUE"
|
||||||
|
ProgramDatabaseFile="bin/TestSuited.pdb"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="TRUE"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="TRUE"
|
||||||
|
OptimizeForWindowsApplication="TRUE"
|
||||||
|
AdditionalIncludeDirectories="..\include;..\..\Foundation\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="FALSE"
|
||||||
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
|
ForceConformanceInForLoopScope="TRUE"
|
||||||
|
RuntimeTypeInfo="TRUE"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
|
DebugInformationFormat="3"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="CppUnit.lib WinTestRunner.lib PocoFoundation.lib"
|
||||||
|
OutputFile="bin/TestSuite.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\lib"
|
||||||
|
GenerateDebugInformation="FALSE"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="ExtJS"
|
||||||
|
Filter="">
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="">
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="">
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="_Suite"
|
||||||
|
Filter="">
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTestSuite.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTestSuite.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="_Driver"
|
||||||
|
Filter="">
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\WinDriver.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
251
WebWidgets/ExtJS/testsuite/TestSuite_VS80.vcproj
Normal file
251
WebWidgets/ExtJS/testsuite/TestSuite_VS80.vcproj
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="TestSuite"
|
||||||
|
ProjectGUID="{ab43a995-70fa-4297-bd01-6c88938aa86d}"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="debug_shared|Win32"
|
||||||
|
OutputDirectory="obj\debug_shared"
|
||||||
|
IntermediateDirectory="obj\debug_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\include;..\..\..\Foundation\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\WebWidgets\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
BufferSecurityCheck="true"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="CppUnitd.lib WinTestRunnerd.lib PocoFoundationd.lib "
|
||||||
|
OutputFile="bin/TestSuited.exe"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\lib"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
ProgramDatabaseFile="bin/TestSuited.pdb"
|
||||||
|
SubSystem="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="release_shared|Win32"
|
||||||
|
OutputDirectory="obj\release_shared"
|
||||||
|
IntermediateDirectory="obj\release_shared"
|
||||||
|
ConfigurationType="1"
|
||||||
|
UseOfMFC="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="4"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
AdditionalIncludeDirectories="..\include;..\..\..\Foundation\include;..\..\..\CppUnit\include;..\..\..\CppUnit\WinTestRunner\include;..\..\..\WebWidgets\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
BufferSecurityCheck="false"
|
||||||
|
TreatWChar_tAsBuiltInType="true"
|
||||||
|
ForceConformanceInForLoopScope="true"
|
||||||
|
RuntimeTypeInfo="true"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="CppUnit.lib WinTestRunner.lib PocoFoundation.lib"
|
||||||
|
OutputFile="bin/TestSuite.exe"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="..\..\..\lib"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
ProgramDatabaseFile=""
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="ExtJS"
|
||||||
|
>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTest.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTest.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="_Suite"
|
||||||
|
>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTestSuite.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\ExtJSTestSuite.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="_Driver"
|
||||||
|
>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\WinDriver.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
551
WebWidgets/ExtJS/testsuite/bin/DDView.js
Normal file
551
WebWidgets/ExtJS/testsuite/bin/DDView.js
Normal file
@ -0,0 +1,551 @@
|
|||||||
|
Array.prototype.contains = function(element) {
|
||||||
|
return this.indexOf(element) !== -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
Ext.namespace("Ext.ux");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class Ext.ux.DDView
|
||||||
|
* A DnD enabled version of Ext.View.
|
||||||
|
* @param {Element/String} container The Element in which to create the View.
|
||||||
|
* @param {String} tpl The template string used to create the markup for each element of the View
|
||||||
|
* @param {Object} config The configuration properties. These include all the config options of
|
||||||
|
* {@link Ext.View} plus some specific to this class.<br>
|
||||||
|
* <p>
|
||||||
|
* Drag/drop is implemented by adding {@link Ext.data.Record}s to the target DDView. If copying is
|
||||||
|
* not being performed, the original {@link Ext.data.Record} is removed from the source DDView.<br>
|
||||||
|
* <p>
|
||||||
|
* The following extra CSS rules are needed to provide insertion point highlighting:<pre><code>
|
||||||
|
.x-view-drag-insert-above {
|
||||||
|
border-top:1px dotted #3366cc;
|
||||||
|
}
|
||||||
|
.x-view-drag-insert-below {
|
||||||
|
border-bottom:1px dotted #3366cc;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Ext.ux.DDView = function(config) {
|
||||||
|
if (!config.itemSelector) {
|
||||||
|
var tpl = config.tpl;
|
||||||
|
if (this.classRe.test(tpl)) {
|
||||||
|
config.tpl = tpl.replace(this.classRe, 'class=$1x-combo-list-item $2$1');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
config.tpl = tpl.replace(this.tagRe, '$1 class="x-combo-list-item" $2');
|
||||||
|
}
|
||||||
|
config.itemSelector = ".x-combo-list-item";
|
||||||
|
}
|
||||||
|
Ext.ux.DDView.superclass.constructor.call(this, Ext.apply(config, {
|
||||||
|
border: false
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
Ext.extend(Ext.ux.DDView, Ext.DataView, {
|
||||||
|
/** @cfg {String/Array} dragGroup The ddgroup name(s) for the View's DragZone. */
|
||||||
|
/** @cfg {String/Array} dropGroup The ddgroup name(s) for the View's DropZone. */
|
||||||
|
/** @cfg {Boolean} copy Causes drag operations to copy nodes rather than move. */
|
||||||
|
/** @cfg {Boolean} allowCopy Causes ctrl/drag operations to copy nodes rather than move. */
|
||||||
|
|
||||||
|
sortDir: 'ASC',
|
||||||
|
|
||||||
|
isFormField: true,
|
||||||
|
|
||||||
|
classRe: /class=(['"])(.*)\1/,
|
||||||
|
|
||||||
|
tagRe: /(<\w*)(.*?>)/,
|
||||||
|
|
||||||
|
reset: Ext.emptyFn,
|
||||||
|
|
||||||
|
clearInvalid: Ext.form.Field.prototype.clearInvalid,
|
||||||
|
|
||||||
|
msgTarget: 'qtip',
|
||||||
|
|
||||||
|
afterRender: function() {
|
||||||
|
Ext.ux.DDView.superclass.afterRender.call(this);
|
||||||
|
if (this.dragGroup) {
|
||||||
|
this.setDraggable(this.dragGroup.split(","));
|
||||||
|
}
|
||||||
|
if (this.dropGroup) {
|
||||||
|
this.setDroppable(this.dropGroup.split(","));
|
||||||
|
}
|
||||||
|
if (this.deletable) {
|
||||||
|
this.setDeletable();
|
||||||
|
}
|
||||||
|
this.isDirtyFlag = false;
|
||||||
|
this.addEvents(
|
||||||
|
"drop"
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
validate: function() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
this.purgeListeners();
|
||||||
|
this.getEl().removeAllListeners();
|
||||||
|
this.getEl().remove();
|
||||||
|
if (this.dragZone) {
|
||||||
|
if (this.dragZone.destroy) {
|
||||||
|
this.dragZone.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.dropZone) {
|
||||||
|
if (this.dropZone.destroy) {
|
||||||
|
this.dropZone.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Allows this class to be an Ext.form.Field so it can be found using {@link Ext.form.BasicForm#findField}. */
|
||||||
|
getName: function() {
|
||||||
|
return this.name;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Loads the View from a JSON string representing the Records to put into the Store. */
|
||||||
|
setValue: function(v) {
|
||||||
|
if (!this.store) {
|
||||||
|
throw "DDView.setValue(). DDView must be constructed with a valid Store";
|
||||||
|
}
|
||||||
|
var data = {};
|
||||||
|
data[this.store.reader.meta.root] = v ? [].concat(v) : [];
|
||||||
|
this.store.proxy = new Ext.data.MemoryProxy(data);
|
||||||
|
this.store.load();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** @return {String} a parenthesised list of the ids of the Records in the View. */
|
||||||
|
getValue: function() {
|
||||||
|
var result = '(';
|
||||||
|
this.store.each(function(rec) {
|
||||||
|
result += rec.id + ',';
|
||||||
|
});
|
||||||
|
return result.substr(0, result.length - 1) + ')';
|
||||||
|
},
|
||||||
|
|
||||||
|
getIds: function() {
|
||||||
|
var i = 0, result = new Array(this.store.getCount());
|
||||||
|
this.store.each(function(rec) {
|
||||||
|
result[i++] = rec.id;
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
isDirty: function() {
|
||||||
|
return this.isDirtyFlag;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Part of the Ext.dd.DropZone interface. If no target node is found, the
|
||||||
|
* whole Element becomes the target, and this causes the drop gesture to append.
|
||||||
|
*/
|
||||||
|
getTargetFromEvent : function(e) {
|
||||||
|
var target = e.getTarget();
|
||||||
|
while ((target !== null) && (target.parentNode != this.el.dom)) {
|
||||||
|
target = target.parentNode;
|
||||||
|
}
|
||||||
|
if (!target) {
|
||||||
|
target = this.el.dom.lastChild || this.el.dom;
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the drag data which consists of an object which has the property "ddel" as
|
||||||
|
* the drag proxy element.
|
||||||
|
*/
|
||||||
|
getDragData : function(e) {
|
||||||
|
var target = this.findItemFromChild(e.getTarget());
|
||||||
|
if(target) {
|
||||||
|
if (!this.isSelected(target)) {
|
||||||
|
delete this.ignoreNextClick;
|
||||||
|
this.onItemClick(target, this.indexOf(target), e);
|
||||||
|
this.ignoreNextClick = true;
|
||||||
|
}
|
||||||
|
var dragData = {
|
||||||
|
sourceView: this,
|
||||||
|
viewNodes: [],
|
||||||
|
records: [],
|
||||||
|
copy: this.copy || (this.allowCopy && e.ctrlKey)
|
||||||
|
};
|
||||||
|
if (this.getSelectionCount() == 1) {
|
||||||
|
var i = this.getSelectedIndexes()[0];
|
||||||
|
var n = this.getNode(i);
|
||||||
|
dragData.viewNodes.push(dragData.ddel = n);
|
||||||
|
dragData.records.push(this.store.getAt(i));
|
||||||
|
dragData.repairXY = Ext.fly(n).getXY();
|
||||||
|
} else {
|
||||||
|
dragData.ddel = document.createElement('div');
|
||||||
|
dragData.ddel.className = 'multi-proxy';
|
||||||
|
this.collectSelection(dragData);
|
||||||
|
}
|
||||||
|
return dragData;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// override the default repairXY.
|
||||||
|
getRepairXY : function(e){
|
||||||
|
return this.dragData.repairXY;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Put the selections into the records and viewNodes Arrays. */
|
||||||
|
collectSelection: function(data) {
|
||||||
|
data.repairXY = Ext.fly(this.getSelectedNodes()[0]).getXY();
|
||||||
|
if (this.preserveSelectionOrder === true) {
|
||||||
|
Ext.each(this.getSelectedIndexes(), function(i) {
|
||||||
|
var n = this.getNode(i);
|
||||||
|
var dragNode = n.cloneNode(true);
|
||||||
|
dragNode.id = Ext.id();
|
||||||
|
data.ddel.appendChild(dragNode);
|
||||||
|
data.records.push(this.store.getAt(i));
|
||||||
|
data.viewNodes.push(n);
|
||||||
|
}, this);
|
||||||
|
} else {
|
||||||
|
var i = 0;
|
||||||
|
this.store.each(function(rec){
|
||||||
|
if (this.isSelected(i)) {
|
||||||
|
var n = this.getNode(i);
|
||||||
|
var dragNode = n.cloneNode(true);
|
||||||
|
dragNode.id = Ext.id();
|
||||||
|
data.ddel.appendChild(dragNode);
|
||||||
|
data.records.push(this.store.getAt(i));
|
||||||
|
data.viewNodes.push(n);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Specify to which ddGroup items in this DDView may be dragged. */
|
||||||
|
setDraggable: function(ddGroup) {
|
||||||
|
if (ddGroup instanceof Array) {
|
||||||
|
Ext.each(ddGroup, this.setDraggable, this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.dragZone) {
|
||||||
|
this.dragZone.addToGroup(ddGroup);
|
||||||
|
} else {
|
||||||
|
this.dragZone = new Ext.dd.DragZone(this.getEl(), {
|
||||||
|
containerScroll: true,
|
||||||
|
ddGroup: ddGroup
|
||||||
|
});
|
||||||
|
// Draggability implies selection. DragZone's mousedown selects the element.
|
||||||
|
if (!this.multiSelect) { this.singleSelect = true; }
|
||||||
|
|
||||||
|
// Wire the DragZone's handlers up to methods in *this*
|
||||||
|
this.dragZone.getDragData = this.getDragData.createDelegate(this);
|
||||||
|
this.dragZone.getRepairXY = this.getRepairXY;
|
||||||
|
this.dragZone.onEndDrag = this.onEndDrag;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Specify from which ddGroup this DDView accepts drops. */
|
||||||
|
setDroppable: function(ddGroup) {
|
||||||
|
if (ddGroup instanceof Array) {
|
||||||
|
Ext.each(ddGroup, this.setDroppable, this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.dropZone) {
|
||||||
|
this.dropZone.addToGroup(ddGroup);
|
||||||
|
} else {
|
||||||
|
this.dropZone = new Ext.dd.DropZone(this.getEl(), {
|
||||||
|
owningView: this,
|
||||||
|
containerScroll: true,
|
||||||
|
ddGroup: ddGroup
|
||||||
|
});
|
||||||
|
|
||||||
|
// Wire the DropZone's handlers up to methods in *this*
|
||||||
|
this.dropZone.getTargetFromEvent = this.getTargetFromEvent.createDelegate(this);
|
||||||
|
this.dropZone.onNodeEnter = this.onNodeEnter.createDelegate(this);
|
||||||
|
this.dropZone.onNodeOver = this.onNodeOver.createDelegate(this);
|
||||||
|
this.dropZone.onNodeOut = this.onNodeOut.createDelegate(this);
|
||||||
|
this.dropZone.onNodeDrop = this.onNodeDrop.createDelegate(this);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Decide whether to drop above or below a View node. */
|
||||||
|
getDropPoint : function(e, n, dd){
|
||||||
|
if (n == this.el.dom) { return "above"; }
|
||||||
|
var t = Ext.lib.Dom.getY(n), b = t + n.offsetHeight;
|
||||||
|
var c = t + (b - t) / 2;
|
||||||
|
var y = Ext.lib.Event.getPageY(e);
|
||||||
|
if(y <= c) {
|
||||||
|
return "above";
|
||||||
|
}else{
|
||||||
|
return "below";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
isValidDropPoint: function(pt, n, data) {
|
||||||
|
if (!data.viewNodes || (data.viewNodes.length != 1)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var d = data.viewNodes[0];
|
||||||
|
if (d == n) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((pt == "below") && (n.nextSibling == d)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((pt == "above") && (n.previousSibling == d)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeEnter : function(n, dd, e, data){
|
||||||
|
if (this.highlightColor && (data.sourceView != this)) {
|
||||||
|
this.el.highlight(this.highlightColor);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeOver : function(n, dd, e, data){
|
||||||
|
var dragElClass = this.dropNotAllowed;
|
||||||
|
var pt = this.getDropPoint(e, n, dd);
|
||||||
|
if (this.isValidDropPoint(pt, n, data)) {
|
||||||
|
if (this.appendOnly || this.sortField) {
|
||||||
|
return "x-tree-drop-ok-below";
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the insert point style on the target node
|
||||||
|
if (pt) {
|
||||||
|
var targetElClass;
|
||||||
|
if (pt == "above"){
|
||||||
|
dragElClass = n.previousSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-above";
|
||||||
|
targetElClass = "x-view-drag-insert-above";
|
||||||
|
} else {
|
||||||
|
dragElClass = n.nextSibling ? "x-tree-drop-ok-between" : "x-tree-drop-ok-below";
|
||||||
|
targetElClass = "x-view-drag-insert-below";
|
||||||
|
}
|
||||||
|
if (this.lastInsertClass != targetElClass){
|
||||||
|
Ext.fly(n).replaceClass(this.lastInsertClass, targetElClass);
|
||||||
|
this.lastInsertClass = targetElClass;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dragElClass;
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeOut : function(n, dd, e, data){
|
||||||
|
this.removeDropIndicators(n);
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeDrop : function(n, dd, e, data){
|
||||||
|
if (this.fireEvent("drop", this, n, dd, e, data) === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var pt = this.getDropPoint(e, n, dd);
|
||||||
|
var insertAt = (this.appendOnly || (n == this.el.dom)) ? this.store.getCount() : n.viewIndex;
|
||||||
|
if (pt == "below") {
|
||||||
|
insertAt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate if dragging within a DDView
|
||||||
|
if (data.sourceView == this) {
|
||||||
|
// If the first element to be inserted below is the target node, remove it
|
||||||
|
if (pt == "below") {
|
||||||
|
if (data.viewNodes[0] == n) {
|
||||||
|
data.viewNodes.shift();
|
||||||
|
}
|
||||||
|
} else { // If the last element to be inserted above is the target node, remove it
|
||||||
|
if (data.viewNodes[data.viewNodes.length - 1] == n) {
|
||||||
|
data.viewNodes.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nothing to drop...
|
||||||
|
if (!data.viewNodes.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are moving DOWN, then because a store.remove() takes place first,
|
||||||
|
// the insertAt must be decremented.
|
||||||
|
if (insertAt > this.store.indexOf(data.records[0])) {
|
||||||
|
insertAt--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dragging from a Tree. Use the Tree's recordFromNode function.
|
||||||
|
if (data.node instanceof Ext.tree.TreeNode) {
|
||||||
|
var r = data.node.getOwnerTree().recordFromNode(data.node);
|
||||||
|
if (r) {
|
||||||
|
data.records = [ r ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data.records) {
|
||||||
|
alert("Programming problem. Drag data contained no Records");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < data.records.length; i++) {
|
||||||
|
var r = data.records[i];
|
||||||
|
var dup = this.store.getById(r.id);
|
||||||
|
if (dup && (dd != this.dragZone)) {
|
||||||
|
if(!this.allowDup && !this.allowTrash){
|
||||||
|
Ext.fly(this.getNode(this.store.indexOf(dup))).frame("red", 1);
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
var x=new Ext.data.Record();
|
||||||
|
r.id=x.id;
|
||||||
|
delete x;
|
||||||
|
}
|
||||||
|
if (data.copy) {
|
||||||
|
this.store.insert(insertAt++, r.copy());
|
||||||
|
} else {
|
||||||
|
if (data.sourceView) {
|
||||||
|
data.sourceView.isDirtyFlag = true;
|
||||||
|
data.sourceView.store.remove(r);
|
||||||
|
}
|
||||||
|
if(!this.allowTrash)this.store.insert(insertAt++, r);
|
||||||
|
}
|
||||||
|
if(this.sortField){
|
||||||
|
this.store.sort(this.sortField, this.sortDir);
|
||||||
|
}
|
||||||
|
this.isDirtyFlag = true;
|
||||||
|
}
|
||||||
|
this.dragZone.cachedTarget = null;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// Ensure the multi proxy is removed
|
||||||
|
onEndDrag: function(data, e) {
|
||||||
|
var d = Ext.get(this.dragData.ddel);
|
||||||
|
if (d && d.hasClass("multi-proxy")) {
|
||||||
|
d.remove();
|
||||||
|
//delete this.dragData.ddel;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
removeDropIndicators : function(n){
|
||||||
|
if(n){
|
||||||
|
Ext.fly(n).removeClass([
|
||||||
|
"x-view-drag-insert-above",
|
||||||
|
"x-view-drag-insert-left",
|
||||||
|
"x-view-drag-insert-right",
|
||||||
|
"x-view-drag-insert-below"]);
|
||||||
|
this.lastInsertClass = "_noclass";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility method. Add a delete option to the DDView's context menu.
|
||||||
|
* @param {String} imageUrl The URL of the "delete" icon image.
|
||||||
|
*/
|
||||||
|
setDeletable: function(imageUrl) {
|
||||||
|
if (!this.singleSelect && !this.multiSelect) {
|
||||||
|
this.singleSelect = true;
|
||||||
|
}
|
||||||
|
var c = this.getContextMenu();
|
||||||
|
this.contextMenu.on("itemclick", function(item) {
|
||||||
|
switch (item.id) {
|
||||||
|
case "delete":
|
||||||
|
this.remove(this.getSelectedIndexes());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
this.contextMenu.add({
|
||||||
|
icon: imageUrl || AU.resolveUrl("/images/delete.gif"),
|
||||||
|
id: "delete",
|
||||||
|
text: AU.getMessage("deleteItem")
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** Return the context menu for this DDView. */
|
||||||
|
getContextMenu: function() {
|
||||||
|
if (!this.contextMenu) {
|
||||||
|
// Create the View's context menu
|
||||||
|
this.contextMenu = new Ext.menu.Menu({
|
||||||
|
id: this.id + "-contextmenu"
|
||||||
|
});
|
||||||
|
this.el.on("contextmenu", this.showContextMenu, this);
|
||||||
|
}
|
||||||
|
return this.contextMenu;
|
||||||
|
},
|
||||||
|
|
||||||
|
disableContextMenu: function() {
|
||||||
|
if (this.contextMenu) {
|
||||||
|
this.el.un("contextmenu", this.showContextMenu, this);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
showContextMenu: function(e, item) {
|
||||||
|
item = this.findItemFromChild(e.getTarget());
|
||||||
|
if (item) {
|
||||||
|
e.stopEvent();
|
||||||
|
this.select(this.getNode(item), this.multiSelect && e.ctrlKey, true);
|
||||||
|
this.contextMenu.showAt(e.getXY());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove {@link Ext.data.Record}s at the specified indices.
|
||||||
|
* @param {Array/Number} selectedIndices The index (or Array of indices) of Records to remove.
|
||||||
|
*/
|
||||||
|
remove: function(selectedIndices) {
|
||||||
|
selectedIndices = [].concat(selectedIndices);
|
||||||
|
for (var i = 0; i < selectedIndices.length; i++) {
|
||||||
|
var rec = this.store.getAt(selectedIndices[i]);
|
||||||
|
this.store.remove(rec);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Double click fires the event, but also, if this is draggable, and there is only one other
|
||||||
|
* related DropZone that is in another DDView, it drops the selected node on that DDView.
|
||||||
|
*/
|
||||||
|
onDblClick : function(e){
|
||||||
|
var item = this.findItemFromChild(e.getTarget());
|
||||||
|
if(item){
|
||||||
|
if (this.fireEvent("dblclick", this, this.indexOf(item), item, e) === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.dragGroup) {
|
||||||
|
var targets = Ext.dd.DragDropMgr.getRelated(this.dragZone, true);
|
||||||
|
|
||||||
|
// Remove instances of this View's DropZone
|
||||||
|
while (targets.contains(this.dropZone)) {
|
||||||
|
targets.remove(this.dropZone);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there's only one other DropZone, and it is owned by a DDView, then drop it in
|
||||||
|
if ((targets.length == 1) && (targets[0].owningView)) {
|
||||||
|
this.dragZone.cachedTarget = null;
|
||||||
|
var el = Ext.get(targets[0].getEl());
|
||||||
|
var box = el.getBox(true);
|
||||||
|
targets[0].onNodeDrop(el.dom, {
|
||||||
|
target: el.dom,
|
||||||
|
xy: [box.x, box.y + box.height - 1]
|
||||||
|
}, null, this.getDragData(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onItemClick : function(item, index, e){
|
||||||
|
// The DragZone's mousedown->getDragData already handled selection
|
||||||
|
if (this.ignoreNextClick) {
|
||||||
|
delete this.ignoreNextClick;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.fireEvent("beforeclick", this, index, item, e) === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.multiSelect || this.singleSelect){
|
||||||
|
if(this.multiSelect && e.shiftKey && this.lastSelection){
|
||||||
|
this.select(this.getNodes(this.indexOf(this.lastSelection), index), false);
|
||||||
|
} else if (this.isSelected(item) && e.ctrlKey) {
|
||||||
|
this.deselect(item);
|
||||||
|
}else{
|
||||||
|
this.deselect(item);
|
||||||
|
this.select(item, this.multiSelect && e.ctrlKey);
|
||||||
|
this.lastSelection = item;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
19
WebWidgets/ExtJS/testsuite/bin/Multiselect.css
Normal file
19
WebWidgets/ExtJS/testsuite/bin/Multiselect.css
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
.ux-mselect{
|
||||||
|
overflow:auto;
|
||||||
|
background:white;
|
||||||
|
position:relative; /* for calculating scroll offsets */
|
||||||
|
zoom:1;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
.ux-mselect-item{
|
||||||
|
font:normal 12px tahoma, arial, helvetica, sans-serif;
|
||||||
|
padding:2px;
|
||||||
|
border:1px solid #fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.ux-mselect-selected{
|
||||||
|
border:1px dotted #a3bae9 !important;
|
||||||
|
background:#DFE8F6;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
536
WebWidgets/ExtJS/testsuite/bin/Multiselect.js
Normal file
536
WebWidgets/ExtJS/testsuite/bin/Multiselect.js
Normal file
@ -0,0 +1,536 @@
|
|||||||
|
//version 3.0
|
||||||
|
|
||||||
|
Ext.ux.Multiselect = Ext.extend(Ext.form.Field, {
|
||||||
|
store:null,
|
||||||
|
dataFields:[],
|
||||||
|
data:[],
|
||||||
|
width:100,
|
||||||
|
height:100,
|
||||||
|
displayField:0,
|
||||||
|
valueField:1,
|
||||||
|
allowBlank:true,
|
||||||
|
minLength:0,
|
||||||
|
maxLength:Number.MAX_VALUE,
|
||||||
|
blankText:Ext.form.TextField.prototype.blankText,
|
||||||
|
minLengthText:'Minimum {0} item(s) required',
|
||||||
|
maxLengthText:'Maximum {0} item(s) allowed',
|
||||||
|
copy:false,
|
||||||
|
allowDup:false,
|
||||||
|
allowTrash:false,
|
||||||
|
legend:null,
|
||||||
|
focusClass:undefined,
|
||||||
|
delimiter:',',
|
||||||
|
view:null,
|
||||||
|
dragGroup:null,
|
||||||
|
dropGroup:null,
|
||||||
|
tbar:null,
|
||||||
|
appendOnly:false,
|
||||||
|
sortField:null,
|
||||||
|
sortDir:'ASC',
|
||||||
|
initVal:null,
|
||||||
|
defaultAutoCreate : {tag: "div"},
|
||||||
|
|
||||||
|
initComponent: function(){
|
||||||
|
Ext.ux.Multiselect.superclass.initComponent.call(this);
|
||||||
|
this.addEvents({
|
||||||
|
'dblclick' : true,
|
||||||
|
'click' : true,
|
||||||
|
'change' : true,
|
||||||
|
'drop' : true
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
onRender: function(ct, position){
|
||||||
|
var fs, cls, tpl;
|
||||||
|
Ext.ux.Multiselect.superclass.onRender.call(this, ct, position);
|
||||||
|
|
||||||
|
|
||||||
|
cls = 'ux-mselect';
|
||||||
|
|
||||||
|
fs = new Ext.form.FieldSet({
|
||||||
|
renderTo:this.el,
|
||||||
|
title:this.legend,
|
||||||
|
height:this.height,
|
||||||
|
width:this.width,
|
||||||
|
style:"padding:1px;",
|
||||||
|
tbar:this.tbar
|
||||||
|
});
|
||||||
|
if(!this.legend) { var e = fs.el.down('.'+fs.headerCls); if(e) {e.remove();}}
|
||||||
|
fs.body.addClass(cls);
|
||||||
|
|
||||||
|
tpl = '<tpl for="."><div class="' + cls + '-item';
|
||||||
|
if(Ext.isIE || Ext.isIE7)tpl+='" unselectable=on';
|
||||||
|
else tpl+=' x-unselectable"';
|
||||||
|
tpl+='>{' + this.displayField + '}</div></tpl>';
|
||||||
|
|
||||||
|
if(!this.store){
|
||||||
|
this.store = new Ext.data.SimpleStore({
|
||||||
|
fields: this.dataFields,
|
||||||
|
data : this.data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.view = new Ext.ux.DDView({
|
||||||
|
multiSelect: true, store: this.store, selectedClass: cls+"-selected", tpl:tpl,
|
||||||
|
allowDup:this.allowDup, copy: this.copy, allowTrash: this.allowTrash,
|
||||||
|
dragGroup: this.dragGroup, dropGroup: this.dropGroup, itemSelector:"."+cls+"-item",
|
||||||
|
isFormField:false, applyTo:fs.body, appendOnly:this.appendOnly,
|
||||||
|
sortField:this.sortField, sortDir:this.sortDir
|
||||||
|
});
|
||||||
|
|
||||||
|
fs.add(this.view);
|
||||||
|
|
||||||
|
this.view.on('click', this.onViewClick, this);
|
||||||
|
this.view.on('beforeClick', this.onViewBeforeClick, this);
|
||||||
|
this.view.on('dblclick', this.onViewDblClick, this);
|
||||||
|
this.view.on('drop', function(ddView, n, dd, e, data){
|
||||||
|
return this.fireEvent("drop", ddView, n, dd, e, data);
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
this.hiddenName = this.name;
|
||||||
|
var hiddenTag={tag: "input", type: "hidden", value: "", name:this.name};
|
||||||
|
if (this.isFormField) {
|
||||||
|
this.hiddenField = this.el.createChild(hiddenTag);
|
||||||
|
} else {
|
||||||
|
this.hiddenField = Ext.get(document.body).createChild(hiddenTag);
|
||||||
|
}
|
||||||
|
if (this.initVal != null)
|
||||||
|
{
|
||||||
|
this.setValue(this.initVal);
|
||||||
|
this.initVal = null;
|
||||||
|
}
|
||||||
|
fs.doLayout();
|
||||||
|
},
|
||||||
|
|
||||||
|
initValue:Ext.emptyFn,
|
||||||
|
|
||||||
|
onViewClick: function(vw, index, node, e) {
|
||||||
|
var arrayIndex = this.preClickSelections.indexOf(index);
|
||||||
|
if (arrayIndex != -1)
|
||||||
|
{
|
||||||
|
this.preClickSelections.splice(arrayIndex, 1);
|
||||||
|
this.view.clearSelections(true);
|
||||||
|
this.view.select(this.preClickSelections);
|
||||||
|
}
|
||||||
|
this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
|
||||||
|
this.hiddenField.dom.value = this.getValue();
|
||||||
|
this.fireEvent('click', this, e);
|
||||||
|
this.validate();
|
||||||
|
},
|
||||||
|
|
||||||
|
onViewBeforeClick: function(vw, index, node, e) {
|
||||||
|
this.preClickSelections = this.view.getSelectedIndexes();
|
||||||
|
if (this.disabled) {return false;}
|
||||||
|
},
|
||||||
|
|
||||||
|
onViewDblClick : function(vw, index, node, e) {
|
||||||
|
return this.fireEvent('dblclick', vw, index, node, e);
|
||||||
|
},
|
||||||
|
|
||||||
|
getValue: function(valueField){
|
||||||
|
var returnArray = [];
|
||||||
|
var selectionsArray = this.view.getSelectedIndexes();
|
||||||
|
if (selectionsArray.length == 0) {return '';}
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
returnArray.push(this.store.getAt(selectionsArray[i]).get(((valueField != null)? valueField : this.valueField)));
|
||||||
|
}
|
||||||
|
return returnArray.join(this.delimiter);
|
||||||
|
},
|
||||||
|
|
||||||
|
setValue: function(values) {
|
||||||
|
var index;
|
||||||
|
var selections = [];
|
||||||
|
this.view.clearSelections();
|
||||||
|
this.hiddenField.dom.value = '';
|
||||||
|
|
||||||
|
if (!values || (values == '')) { return; }
|
||||||
|
|
||||||
|
if (!(values instanceof Array)) { values = values.split(this.delimiter); }
|
||||||
|
for (var i=0; i<values.length; i++) {
|
||||||
|
index = this.view.store.indexOf(this.view.store.query(this.valueField,
|
||||||
|
new RegExp('^' + values[i] + '$', "i")).itemAt(0));
|
||||||
|
selections.push(index);
|
||||||
|
}
|
||||||
|
this.view.select(selections);
|
||||||
|
this.hiddenField.dom.value = this.getValue();
|
||||||
|
this.validate();
|
||||||
|
},
|
||||||
|
|
||||||
|
reset : function() {
|
||||||
|
this.setValue('');
|
||||||
|
},
|
||||||
|
|
||||||
|
getRawValue: function(valueField) {
|
||||||
|
var tmp = this.getValue(valueField);
|
||||||
|
if (tmp.length) {
|
||||||
|
tmp = tmp.split(this.delimiter);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tmp = [];
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
},
|
||||||
|
|
||||||
|
setRawValue: function(values){
|
||||||
|
setValue(values);
|
||||||
|
},
|
||||||
|
|
||||||
|
validateValue : function(value){
|
||||||
|
if (value.length < 1) { // if it has no value
|
||||||
|
if (this.allowBlank) {
|
||||||
|
this.clearInvalid();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
this.markInvalid(this.blankText);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value.length < this.minLength) {
|
||||||
|
this.markInvalid(String.format(this.minLengthText, this.minLength));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (value.length > this.maxLength) {
|
||||||
|
this.markInvalid(String.format(this.maxLengthText, this.maxLength));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Ext.reg("multiselect", Ext.ux.Multiselect);
|
||||||
|
|
||||||
|
Ext.ux.ItemSelector = Ext.extend(Ext.form.Field, {
|
||||||
|
msWidth:200,
|
||||||
|
msHeight:300,
|
||||||
|
hideNavIcons:false,
|
||||||
|
imagePath:"",
|
||||||
|
iconUp:"up2.gif",
|
||||||
|
iconDown:"down2.gif",
|
||||||
|
iconLeft:"left2.gif",
|
||||||
|
iconRight:"right2.gif",
|
||||||
|
iconTop:"top2.gif",
|
||||||
|
iconBottom:"bottom2.gif",
|
||||||
|
drawUpIcon:true,
|
||||||
|
drawDownIcon:true,
|
||||||
|
drawLeftIcon:true,
|
||||||
|
drawRightIcon:true,
|
||||||
|
drawTopIcon:true,
|
||||||
|
drawBotIcon:true,
|
||||||
|
fromStore:null,
|
||||||
|
toStore:null,
|
||||||
|
fromData:null,
|
||||||
|
toData:null,
|
||||||
|
displayField:0,
|
||||||
|
valueField:1,
|
||||||
|
switchToFrom:false,
|
||||||
|
allowDup:false,
|
||||||
|
focusClass:undefined,
|
||||||
|
delimiter:',',
|
||||||
|
readOnly:false,
|
||||||
|
toLegend:null,
|
||||||
|
fromLegend:null,
|
||||||
|
toSortField:null,
|
||||||
|
fromSortField:null,
|
||||||
|
toSortDir:'ASC',
|
||||||
|
fromSortDir:'ASC',
|
||||||
|
toTBar:null,
|
||||||
|
fromTBar:null,
|
||||||
|
bodyStyle:null,
|
||||||
|
border:false,
|
||||||
|
defaultAutoCreate:{tag: "div"},
|
||||||
|
|
||||||
|
initComponent: function(){
|
||||||
|
Ext.ux.ItemSelector.superclass.initComponent.call(this);
|
||||||
|
this.addEvents({
|
||||||
|
'rowdblclick' : true,
|
||||||
|
'change' : true
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onRender: function(ct, position){
|
||||||
|
Ext.ux.ItemSelector.superclass.onRender.call(this, ct, position);
|
||||||
|
|
||||||
|
this.fromMultiselect = new Ext.ux.Multiselect({
|
||||||
|
legend: this.fromLegend,
|
||||||
|
delimiter: this.delimiter,
|
||||||
|
allowDup: this.allowDup,
|
||||||
|
copy: this.allowDup,
|
||||||
|
allowTrash: this.allowDup,
|
||||||
|
dragGroup: this.readOnly ? null : "drop2-"+this.el.dom.id,
|
||||||
|
dropGroup: this.readOnly ? null : "drop1-"+this.el.dom.id,
|
||||||
|
width: this.msWidth,
|
||||||
|
height: this.msHeight,
|
||||||
|
dataFields: this.dataFields,
|
||||||
|
data: this.fromData,
|
||||||
|
displayField: this.displayField,
|
||||||
|
valueField: this.valueField,
|
||||||
|
store: this.fromStore,
|
||||||
|
isFormField: false,
|
||||||
|
tbar: this.fromTBar,
|
||||||
|
appendOnly: true,
|
||||||
|
sortField: this.fromSortField,
|
||||||
|
sortDir: this.fromSortDir
|
||||||
|
});
|
||||||
|
this.fromMultiselect.on('dblclick', this.onRowDblClick, this);
|
||||||
|
|
||||||
|
if (!this.toStore) {
|
||||||
|
this.toStore = new Ext.data.SimpleStore({
|
||||||
|
fields: this.dataFields,
|
||||||
|
data : this.toData
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.toStore.on('add', this.valueChanged, this);
|
||||||
|
this.toStore.on('remove', this.valueChanged, this);
|
||||||
|
this.toStore.on('load', this.valueChanged, this);
|
||||||
|
|
||||||
|
this.toMultiselect = new Ext.ux.Multiselect({
|
||||||
|
legend: this.toLegend,
|
||||||
|
delimiter: this.delimiter,
|
||||||
|
allowDup: this.allowDup,
|
||||||
|
dragGroup: this.readOnly ? null : "drop1-"+this.el.dom.id,
|
||||||
|
//dropGroup: this.readOnly ? null : "drop2-"+this.el.dom.id+(this.toSortField ? "" : ",drop1-"+this.el.dom.id),
|
||||||
|
dropGroup: this.readOnly ? null : "drop2-"+this.el.dom.id+",drop1-"+this.el.dom.id,
|
||||||
|
width: this.msWidth,
|
||||||
|
height: this.msHeight,
|
||||||
|
displayField: this.displayField,
|
||||||
|
valueField: this.valueField,
|
||||||
|
store: this.toStore,
|
||||||
|
isFormField: false,
|
||||||
|
tbar: this.toTBar,
|
||||||
|
sortField: this.toSortField,
|
||||||
|
sortDir: this.toSortDir
|
||||||
|
});
|
||||||
|
this.toMultiselect.on('dblclick', this.onRowDblClick, this);
|
||||||
|
|
||||||
|
var p = new Ext.Panel({
|
||||||
|
bodyStyle:this.bodyStyle,
|
||||||
|
border:this.border,
|
||||||
|
layout:"table",
|
||||||
|
layoutConfig:{columns:3}
|
||||||
|
});
|
||||||
|
p.add(this.switchToFrom ? this.toMultiselect : this.fromMultiselect);
|
||||||
|
var icons = new Ext.Panel({header:false});
|
||||||
|
p.add(icons);
|
||||||
|
p.add(this.switchToFrom ? this.fromMultiselect : this.toMultiselect);
|
||||||
|
p.render(this.el);
|
||||||
|
icons.el.down('.'+icons.bwrapCls).remove();
|
||||||
|
|
||||||
|
if (this.imagePath!="" && this.imagePath.charAt(this.imagePath.length-1)!="/")
|
||||||
|
this.imagePath+="/";
|
||||||
|
this.iconUp = this.imagePath + (this.iconUp || 'up2.gif');
|
||||||
|
this.iconDown = this.imagePath + (this.iconDown || 'down2.gif');
|
||||||
|
this.iconLeft = this.imagePath + (this.iconLeft || 'left2.gif');
|
||||||
|
this.iconRight = this.imagePath + (this.iconRight || 'right2.gif');
|
||||||
|
this.iconTop = this.imagePath + (this.iconTop || 'top2.gif');
|
||||||
|
this.iconBottom = this.imagePath + (this.iconBottom || 'bottom2.gif');
|
||||||
|
var el=icons.getEl();
|
||||||
|
if (!this.toSortField) {
|
||||||
|
this.toTopIcon = el.createChild({tag:'img', src:this.iconTop, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
el.createChild({tag: 'br'});
|
||||||
|
this.upIcon = el.createChild({tag:'img', src:this.iconUp, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
el.createChild({tag: 'br'});
|
||||||
|
}
|
||||||
|
this.addIcon = el.createChild({tag:'img', src:this.switchToFrom?this.iconLeft:this.iconRight, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
el.createChild({tag: 'br'});
|
||||||
|
this.removeIcon = el.createChild({tag:'img', src:this.switchToFrom?this.iconRight:this.iconLeft, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
el.createChild({tag: 'br'});
|
||||||
|
if (!this.toSortField) {
|
||||||
|
this.downIcon = el.createChild({tag:'img', src:this.iconDown, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
el.createChild({tag: 'br'});
|
||||||
|
this.toBottomIcon = el.createChild({tag:'img', src:this.iconBottom, style:{cursor:'pointer', margin:'2px'}});
|
||||||
|
}
|
||||||
|
if (!this.readOnly) {
|
||||||
|
if (!this.toSortField) {
|
||||||
|
this.toTopIcon.on('click', this.toTop, this);
|
||||||
|
this.upIcon.on('click', this.up, this);
|
||||||
|
this.downIcon.on('click', this.down, this);
|
||||||
|
this.toBottomIcon.on('click', this.toBottom, this);
|
||||||
|
}
|
||||||
|
this.addIcon.on('click', this.fromTo, this);
|
||||||
|
this.removeIcon.on('click', this.toFrom, this);
|
||||||
|
}
|
||||||
|
if (!this.drawUpIcon || this.hideNavIcons) { this.upIcon.dom.style.display='none'; }
|
||||||
|
if (!this.drawDownIcon || this.hideNavIcons) { this.downIcon.dom.style.display='none'; }
|
||||||
|
if (!this.drawLeftIcon || this.hideNavIcons) { this.addIcon.dom.style.display='none'; }
|
||||||
|
if (!this.drawRightIcon || this.hideNavIcons) { this.removeIcon.dom.style.display='none'; }
|
||||||
|
if (!this.drawTopIcon || this.hideNavIcons) { this.toTopIcon.dom.style.display='none'; }
|
||||||
|
if (!this.drawBotIcon || this.hideNavIcons) { this.toBottomIcon.dom.style.display='none'; }
|
||||||
|
|
||||||
|
var tb = p.body.first();
|
||||||
|
this.el.setWidth(p.body.first().getWidth());
|
||||||
|
p.body.removeClass();
|
||||||
|
|
||||||
|
this.hiddenName = this.name;
|
||||||
|
var hiddenTag={tag: "input", type: "hidden", value: "", name:this.name};
|
||||||
|
this.hiddenField = this.el.createChild(hiddenTag);
|
||||||
|
this.valueChanged(this.toStore);
|
||||||
|
},
|
||||||
|
|
||||||
|
initValue:Ext.emptyFn,
|
||||||
|
|
||||||
|
toTop : function() {
|
||||||
|
var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
|
||||||
|
var records = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
selectionsArray.sort();
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
records.push(record);
|
||||||
|
}
|
||||||
|
selectionsArray = [];
|
||||||
|
for (var i=records.length-1; i>-1; i--) {
|
||||||
|
record = records[i];
|
||||||
|
this.toMultiselect.view.store.remove(record);
|
||||||
|
this.toMultiselect.view.store.insert(0, record);
|
||||||
|
selectionsArray.push(((records.length - 1) - i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
this.toMultiselect.view.select(selectionsArray);
|
||||||
|
},
|
||||||
|
|
||||||
|
toBottom : function() {
|
||||||
|
var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
|
||||||
|
var records = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
selectionsArray.sort();
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
records.push(record);
|
||||||
|
}
|
||||||
|
selectionsArray = [];
|
||||||
|
for (var i=0; i<records.length; i++) {
|
||||||
|
record = records[i];
|
||||||
|
this.toMultiselect.view.store.remove(record);
|
||||||
|
this.toMultiselect.view.store.add(record);
|
||||||
|
selectionsArray.push((this.toMultiselect.view.store.getCount()) - (records.length - i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
this.toMultiselect.view.select(selectionsArray);
|
||||||
|
},
|
||||||
|
|
||||||
|
up : function() {
|
||||||
|
var record = null;
|
||||||
|
var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
|
||||||
|
selectionsArray.sort();
|
||||||
|
var newSelectionsArray = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
if ((selectionsArray[i] - 1) >= 0) {
|
||||||
|
this.toMultiselect.view.store.remove(record);
|
||||||
|
this.toMultiselect.view.store.insert(selectionsArray[i] - 1, record);
|
||||||
|
newSelectionsArray.push(selectionsArray[i] - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
this.toMultiselect.view.select(newSelectionsArray);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
down : function() {
|
||||||
|
var record = null;
|
||||||
|
var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
|
||||||
|
selectionsArray.sort();
|
||||||
|
selectionsArray.reverse();
|
||||||
|
var newSelectionsArray = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
if ((selectionsArray[i] + 1) < this.toMultiselect.view.store.getCount()) {
|
||||||
|
this.toMultiselect.view.store.remove(record);
|
||||||
|
this.toMultiselect.view.store.insert(selectionsArray[i] + 1, record);
|
||||||
|
newSelectionsArray.push(selectionsArray[i] + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
this.toMultiselect.view.select(newSelectionsArray);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fromTo : function() {
|
||||||
|
var selectionsArray = this.fromMultiselect.view.getSelectedIndexes();
|
||||||
|
var records = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.fromMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
records.push(record);
|
||||||
|
}
|
||||||
|
if(!this.allowDup)selectionsArray = [];
|
||||||
|
for (var i=0; i<records.length; i++) {
|
||||||
|
record = records[i];
|
||||||
|
if(this.allowDup){
|
||||||
|
var x=new Ext.data.Record();
|
||||||
|
record.id=x.id;
|
||||||
|
delete x;
|
||||||
|
this.toMultiselect.view.store.add(record);
|
||||||
|
}else{
|
||||||
|
this.fromMultiselect.view.store.remove(record);
|
||||||
|
this.toMultiselect.view.store.add(record);
|
||||||
|
selectionsArray.push((this.toMultiselect.view.store.getCount() - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
this.fromMultiselect.view.refresh();
|
||||||
|
if(this.toSortField)this.toMultiselect.store.sort(this.toSortField, this.toSortDir);
|
||||||
|
if(this.allowDup)this.fromMultiselect.view.select(selectionsArray);
|
||||||
|
else this.toMultiselect.view.select(selectionsArray);
|
||||||
|
},
|
||||||
|
|
||||||
|
toFrom : function() {
|
||||||
|
var selectionsArray = this.toMultiselect.view.getSelectedIndexes();
|
||||||
|
var records = [];
|
||||||
|
if (selectionsArray.length > 0) {
|
||||||
|
for (var i=0; i<selectionsArray.length; i++) {
|
||||||
|
record = this.toMultiselect.view.store.getAt(selectionsArray[i]);
|
||||||
|
records.push(record);
|
||||||
|
}
|
||||||
|
selectionsArray = [];
|
||||||
|
for (var i=0; i<records.length; i++) {
|
||||||
|
record = records[i];
|
||||||
|
this.toMultiselect.view.store.remove(record);
|
||||||
|
if(!this.allowDup){
|
||||||
|
this.fromMultiselect.view.store.add(record);
|
||||||
|
selectionsArray.push((this.fromMultiselect.view.store.getCount() - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.fromMultiselect.view.refresh();
|
||||||
|
this.toMultiselect.view.refresh();
|
||||||
|
if(this.fromSortField)this.fromMultiselect.store.sort(this.fromSortField, this.fromSortDir);
|
||||||
|
this.fromMultiselect.view.select(selectionsArray);
|
||||||
|
},
|
||||||
|
|
||||||
|
valueChanged: function(store) {
|
||||||
|
var record = null;
|
||||||
|
var values = [];
|
||||||
|
for (var i=0; i<store.getCount(); i++) {
|
||||||
|
record = store.getAt(i);
|
||||||
|
values.push(record.get(this.valueField));
|
||||||
|
}
|
||||||
|
this.hiddenField.dom.value = values.join(this.delimiter);
|
||||||
|
this.fireEvent('change', this, this.getValue(), this.hiddenField.dom.value);
|
||||||
|
},
|
||||||
|
|
||||||
|
getValue : function() {
|
||||||
|
return this.hiddenField.dom.value;
|
||||||
|
},
|
||||||
|
|
||||||
|
onRowDblClick : function(vw, index, node, e) {
|
||||||
|
return this.fireEvent('rowdblclick', vw, index, node, e);
|
||||||
|
},
|
||||||
|
|
||||||
|
reset: function(){
|
||||||
|
range = this.toMultiselect.store.getRange();
|
||||||
|
this.toMultiselect.store.removeAll();
|
||||||
|
if (!this.allowDup) {
|
||||||
|
this.fromMultiselect.store.add(range);
|
||||||
|
this.fromMultiselect.store.sort(this.displayField,'ASC');
|
||||||
|
}
|
||||||
|
this.valueChanged(this.toMultiselect.store);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Ext.reg("itemselector", Ext.ux.ItemSelector);
|
BIN
WebWidgets/ExtJS/testsuite/bin/Sunset.jpg
Normal file
BIN
WebWidgets/ExtJS/testsuite/bin/Sunset.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
BIN
WebWidgets/ExtJS/testsuite/bin/bottom2.gif
Normal file
BIN
WebWidgets/ExtJS/testsuite/bin/bottom2.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 927 B |
BIN
WebWidgets/ExtJS/testsuite/bin/down2.gif
Normal file
BIN
WebWidgets/ExtJS/testsuite/bin/down2.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 920 B |
157
WebWidgets/ExtJS/testsuite/bin/ext-all.js
Normal file
157
WebWidgets/ExtJS/testsuite/bin/ext-all.js
Normal file
File diff suppressed because one or more lines are too long
10
WebWidgets/ExtJS/testsuite/bin/ext-base.js
Normal file
10
WebWidgets/ExtJS/testsuite/bin/ext-base.js
Normal file
File diff suppressed because one or more lines are too long
BIN
WebWidgets/ExtJS/testsuite/bin/left2.gif
Normal file
BIN
WebWidgets/ExtJS/testsuite/bin/left2.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 920 B |
3
WebWidgets/ExtJS/testsuite/bin/resources/css/README.txt
Normal file
3
WebWidgets/ExtJS/testsuite/bin/resources/css/README.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
2006-11-21 jvs:
|
||||||
|
ext-all.css contains all of the other css files combined and stripped of comments (except themes).
|
||||||
|
|
61
WebWidgets/ExtJS/testsuite/bin/resources/css/borders.css
Normal file
61
WebWidgets/ExtJS/testsuite/bin/resources/css/borders.css
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-header-noborder {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #99bbe8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-tbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #99bbe8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-panel-noborder .x-panel-bbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-top:1px solid #99bbe8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-noborder .x-window-mc {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-window-plain .x-window-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-body-noborder {
|
||||||
|
border-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-header-noborder {
|
||||||
|
border-top-width:0;
|
||||||
|
border-left-width:0;
|
||||||
|
border-right-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-noborder .x-tab-panel-footer-noborder {
|
||||||
|
border-bottom-width:0;
|
||||||
|
border-left-width:0;
|
||||||
|
border-right-width:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.x-tab-panel-bbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-top:1px solid #99bbe8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-tab-panel-tbar-noborder .x-toolbar {
|
||||||
|
border-width:0;
|
||||||
|
border-bottom:1px solid #99bbe8;
|
||||||
|
}
|
111
WebWidgets/ExtJS/testsuite/bin/resources/css/box.css
Normal file
111
WebWidgets/ExtJS/testsuite/bin/resources/css/box.css
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
|
||||||
|
<div class="x-box-blue">
|
||||||
|
<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>
|
||||||
|
<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc">
|
||||||
|
<h3>YOUR TITLE HERE (optional)</h3>
|
||||||
|
<div>YOUR CONTENT HERE</div>
|
||||||
|
</div></div></div>
|
||||||
|
<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
|
||||||
|
</div>
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-box-tl {
|
||||||
|
background: transparent url(../images/default/box/corners.gif) no-repeat 0 0;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-tc {
|
||||||
|
height: 8px;
|
||||||
|
background: transparent url(../images/default/box/tb.gif) repeat-x 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-tr {
|
||||||
|
background: transparent url(../images/default/box/corners.gif) no-repeat right -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-ml {
|
||||||
|
background: transparent url(../images/default/box/l.gif) repeat-y 0;
|
||||||
|
padding-left: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-mc {
|
||||||
|
background: #eee url(../images/default/box/tb.gif) repeat-x 0 -16px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;
|
||||||
|
color: #393939;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-mc h3 {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0 0 4px 0;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-mr {
|
||||||
|
background: transparent url(../images/default/box/r.gif) repeat-y right;
|
||||||
|
padding-right: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-bl {
|
||||||
|
background: transparent url(../images/default/box/corners.gif) no-repeat 0 -16px;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-bc {
|
||||||
|
background: transparent url(../images/default/box/tb.gif) repeat-x 0 -8px;
|
||||||
|
height: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-br {
|
||||||
|
background: transparent url(../images/default/box/corners.gif) no-repeat right -24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-tl, .x-box-bl {
|
||||||
|
padding-left: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-tr, .x-box-br {
|
||||||
|
padding-right: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
|
||||||
|
background-image: url(../images/default/box/corners-blue.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
|
||||||
|
background-image: url(../images/default/box/tb-blue.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-mc {
|
||||||
|
background-color: #c3daf9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-mc h3 {
|
||||||
|
color: #17385b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-ml {
|
||||||
|
background-image: url(../images/default/box/l-blue.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-box-blue .x-box-mr {
|
||||||
|
background-image: url(../images/default/box/r-blue.gif);
|
||||||
|
}
|
159
WebWidgets/ExtJS/testsuite/bin/resources/css/button.css
Normal file
159
WebWidgets/ExtJS/testsuite/bin/resources/css/button.css
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-btn{
|
||||||
|
font:normal 11px tahoma, verdana, helvetica;
|
||||||
|
cursor:pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.x-btn button{
|
||||||
|
border:0 none;
|
||||||
|
background:transparent;
|
||||||
|
font:normal 11px tahoma,verdana,helvetica;
|
||||||
|
padding-left:3px;
|
||||||
|
padding-right:3px;
|
||||||
|
cursor:pointer;
|
||||||
|
margin:0;
|
||||||
|
overflow:visible;
|
||||||
|
width:auto;
|
||||||
|
-moz-outline:0 none;
|
||||||
|
outline:0 none;
|
||||||
|
}
|
||||||
|
* html .ext-ie .x-btn button {
|
||||||
|
width:1px;
|
||||||
|
}
|
||||||
|
.ext-gecko .x-btn button {
|
||||||
|
padding-left:0;
|
||||||
|
padding-right:0;
|
||||||
|
}
|
||||||
|
.ext-ie .x-btn button {
|
||||||
|
padding-top:2px;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Predefined css class for buttons with only icon. Add this class (x-btn-icon) and a class with a background-image
|
||||||
|
to your button for a button with just an icon.
|
||||||
|
e.g.
|
||||||
|
.my-class .x-btn-text { background-image: url(foo.gif); }
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-btn-icon .x-btn-center .x-btn-text{
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
cursor:pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.x-btn-icon .x-btn-center{
|
||||||
|
padding:1px;
|
||||||
|
}
|
||||||
|
.x-btn em {
|
||||||
|
font-style:normal;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Button class for icon and text. Add this class (x-btn-text-icon) and a class with a background-image
|
||||||
|
to your button for both text and icon.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-btn-text-icon .x-btn-center .x-btn-text{
|
||||||
|
background-position: 0 2px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-left:18px;
|
||||||
|
padding-top:3px;
|
||||||
|
padding-bottom:2px;
|
||||||
|
padding-right:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-left, .x-btn-right{
|
||||||
|
font-size:1px;
|
||||||
|
line-height:1px;
|
||||||
|
}
|
||||||
|
.x-btn-left{
|
||||||
|
width:3px;
|
||||||
|
height:21px;
|
||||||
|
background:url(../images/default/button/btn-sprite.gif) no-repeat 0 0;
|
||||||
|
}
|
||||||
|
.x-btn-right{
|
||||||
|
width:3px;
|
||||||
|
height:21px;
|
||||||
|
background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -21px;
|
||||||
|
}
|
||||||
|
.x-btn-left i, .x-btn-right i{
|
||||||
|
display:block;
|
||||||
|
width:3px;
|
||||||
|
overflow:hidden;
|
||||||
|
font-size:1px;
|
||||||
|
line-height:1px;
|
||||||
|
}
|
||||||
|
.x-btn-center{
|
||||||
|
background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -42px;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align:center;
|
||||||
|
padding:0 5px;
|
||||||
|
cursor:pointer;
|
||||||
|
white-space:nowrap;
|
||||||
|
}
|
||||||
|
.x-btn-over .x-btn-left{
|
||||||
|
background-position:0 -63px;
|
||||||
|
}
|
||||||
|
.x-btn-over .x-btn-right{
|
||||||
|
background-position:0 -84px;
|
||||||
|
}
|
||||||
|
.x-btn-over .x-btn-center{
|
||||||
|
background-position:0 -105px;
|
||||||
|
}
|
||||||
|
.x-btn-click .x-btn-center, .x-btn-menu-active .x-btn-center{
|
||||||
|
background-position:0 -126px;
|
||||||
|
}
|
||||||
|
.x-btn-disabled *{
|
||||||
|
color:gray !important;
|
||||||
|
cursor:default !important;
|
||||||
|
}
|
||||||
|
.x-btn-menu-text-wrap .x-btn-center {
|
||||||
|
padding:0 3px;
|
||||||
|
}
|
||||||
|
.ext-gecko .x-btn-menu-text-wrap .x-btn-center {
|
||||||
|
padding:0 1px;
|
||||||
|
}
|
||||||
|
.x-btn-menu-arrow-wrap .x-btn-center {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.x-btn-menu-arrow-wrap .x-btn-center button {
|
||||||
|
width:12px !important;
|
||||||
|
height:21px;
|
||||||
|
padding:0 !important;
|
||||||
|
display:block;
|
||||||
|
background:transparent url(../images/default/button/btn-arrow.gif) no-repeat left 3px;
|
||||||
|
}
|
||||||
|
.x-btn-with-menu .x-btn-center {
|
||||||
|
padding-right:2px !important;
|
||||||
|
}
|
||||||
|
.x-btn-with-menu .x-btn-center em {
|
||||||
|
display:block;
|
||||||
|
background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 0;
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-btn-text-icon .x-btn-with-menu .x-btn-center em {
|
||||||
|
display:block;
|
||||||
|
background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 3px;
|
||||||
|
padding-right:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toggle button styles */
|
||||||
|
.x-btn-pressed .x-btn-left{
|
||||||
|
background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -63px;
|
||||||
|
}
|
||||||
|
.x-btn-pressed .x-btn-right{
|
||||||
|
background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -84px;
|
||||||
|
}
|
||||||
|
.x-btn-pressed .x-btn-center{
|
||||||
|
background: url(../images/default/button/btn-sprite.gif) repeat-x 0 -126px;
|
||||||
|
}
|
55
WebWidgets/ExtJS/testsuite/bin/resources/css/combo.css
Normal file
55
WebWidgets/ExtJS/testsuite/bin/resources/css/combo.css
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-combo-list {
|
||||||
|
border:1px solid #98c0f4;
|
||||||
|
background:#ddecfe;
|
||||||
|
zoom:1;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.x-combo-list-inner {
|
||||||
|
overflow:auto;
|
||||||
|
background:white;
|
||||||
|
position:relative; /* for calculating scroll offsets */
|
||||||
|
zoom:1;
|
||||||
|
overflow-x:hidden;
|
||||||
|
}
|
||||||
|
.x-combo-list-hd {
|
||||||
|
font:bold 11px tahoma, arial, helvetica, sans-serif;
|
||||||
|
color:#15428b;
|
||||||
|
background-image: url(../images/default/layout/panel-title-light-bg.gif);
|
||||||
|
border-bottom:1px solid #98c0f4;
|
||||||
|
padding:3px;
|
||||||
|
}
|
||||||
|
.x-resizable-pinned .x-combo-list-inner {
|
||||||
|
border-bottom:1px solid #98c0f4;
|
||||||
|
}
|
||||||
|
.x-combo-list-item {
|
||||||
|
font:normal 12px tahoma, arial, helvetica, sans-serif;
|
||||||
|
padding:2px;
|
||||||
|
border:1px solid #fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.x-combo-list .x-combo-selected{
|
||||||
|
border:1px dotted #a3bae9 !important;
|
||||||
|
background:#DFE8F6;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.x-combo-noedit{
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.x-combo-list .x-toolbar {
|
||||||
|
border-top:1px solid #98c0f4;
|
||||||
|
border-bottom:0 none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-combo-list-small .x-combo-list-item {
|
||||||
|
font:normal 11px tahoma, arial, helvetica, sans-serif;
|
||||||
|
}
|
314
WebWidgets/ExtJS/testsuite/bin/resources/css/core.css
Normal file
314
WebWidgets/ExtJS/testsuite/bin/resources/css/core.css
Normal file
@ -0,0 +1,314 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ext-el-mask {
|
||||||
|
z-index: 20000;
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
-moz-opacity: 0.5;
|
||||||
|
opacity: .50;
|
||||||
|
filter: alpha(opacity=50);
|
||||||
|
background-color: #CCC;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
.ext-el-mask-msg {
|
||||||
|
z-index: 20001;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border:1px solid #6593cf;
|
||||||
|
background: #c3daf9 url(../images/default/box/tb-blue.gif) repeat-x 0 -16px;
|
||||||
|
padding:2px;
|
||||||
|
}
|
||||||
|
.ext-el-mask-msg div {
|
||||||
|
padding:5px 10px 5px 10px;
|
||||||
|
background: #eee;
|
||||||
|
border:1px solid #a3bad9;
|
||||||
|
color:#222;
|
||||||
|
font:normal 11px tahoma, arial, helvetica, sans-serif;
|
||||||
|
cursor:wait;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ext-shim {
|
||||||
|
position:absolute;
|
||||||
|
visibility:hidden;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.ext-ie .ext-shim {
|
||||||
|
filter: alpha(opacity=0);
|
||||||
|
}
|
||||||
|
.ext-ie6 .ext-shim {
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-mask-loading div {
|
||||||
|
padding:5px 10px 5px 25px;
|
||||||
|
background: #fbfbfb url( '../images/default/grid/loading.gif' ) no-repeat 5px 5px;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
/* class for hiding elements without using display:none */
|
||||||
|
.x-hidden, .x-hide-offsets {
|
||||||
|
position:absolute;
|
||||||
|
left:-10000px;
|
||||||
|
top:-10000px;
|
||||||
|
visibility:hidden;
|
||||||
|
}
|
||||||
|
.x-hide-display {
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-hide-visibility {
|
||||||
|
visibility:hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-masked {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-masked select, .x-masked object, .x-masked embed {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-layer {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-unselectable, .x-unselectable * {
|
||||||
|
-moz-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-repaint {
|
||||||
|
zoom: 1;
|
||||||
|
background-color: transparent;
|
||||||
|
-moz-outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-item-disabled {
|
||||||
|
color: gray;
|
||||||
|
cursor: default;
|
||||||
|
opacity: .6;
|
||||||
|
-moz-opacity: .6;
|
||||||
|
filter: alpha(opacity=60);
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-item-disabled * {
|
||||||
|
color: gray !important;
|
||||||
|
cursor: default !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-splitbar-proxy {
|
||||||
|
position: absolute;
|
||||||
|
visibility: hidden;
|
||||||
|
z-index: 20001;
|
||||||
|
background: #aaa;
|
||||||
|
zoom: 1;
|
||||||
|
line-height: 1px;
|
||||||
|
font-size: 1px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-splitbar-h, .x-splitbar-proxy-h {
|
||||||
|
cursor: e-resize;
|
||||||
|
cursor: col-resize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-splitbar-v, .x-splitbar-proxy-v {
|
||||||
|
cursor: s-resize;
|
||||||
|
cursor: row-resize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-color-palette {
|
||||||
|
width: 150px;
|
||||||
|
height: 92px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-color-palette a {
|
||||||
|
border: 1px solid #fff;
|
||||||
|
float: left;
|
||||||
|
padding: 2px;
|
||||||
|
text-decoration: none;
|
||||||
|
-moz-outline: 0 none;
|
||||||
|
outline: 0 none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel {
|
||||||
|
border: 1px solid #8BB8F3;
|
||||||
|
background: #deecfd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-color-palette em {
|
||||||
|
display: block;
|
||||||
|
border: 1px solid #ACA899;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-color-palette em span {
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
height: 10px;
|
||||||
|
line-height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-ie-shadow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
overflow: hidden;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
background:#777;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
overflow: hidden;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow * {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow * {
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
clear: none;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* top bottom */
|
||||||
|
.x-shadow .xstc, .x-shadow .xsbc {
|
||||||
|
height: 6px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* corners */
|
||||||
|
.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sides */
|
||||||
|
.x-shadow .xsc {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsml, .x-shadow .xsmr {
|
||||||
|
width: 6px;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsmc {
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
background: transparent url( ../images/default/shadow-c.png );
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xst, .x-shadow .xsb {
|
||||||
|
height: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsml {
|
||||||
|
background: transparent url( ../images/default/shadow-lr.png ) repeat-y 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsmr {
|
||||||
|
background: transparent url( ../images/default/shadow-lr.png ) repeat-y -6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xstl {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) no-repeat 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xstc {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) repeat-x 0 -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xstr {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) repeat-x 0 -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsbl {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) no-repeat 0 -12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsbc {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) repeat-x 0 -36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-shadow .xsbr {
|
||||||
|
background: transparent url( ../images/default/shadow.png ) repeat-x 0 -6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-indicator {
|
||||||
|
font-size: 11px;
|
||||||
|
background-image: url(../images/default/grid/loading.gif);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left;
|
||||||
|
padding-left: 20px;
|
||||||
|
line-height: 16px;
|
||||||
|
margin: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-text-resize {
|
||||||
|
position: absolute;
|
||||||
|
left: -1000px;
|
||||||
|
top: -1000px;
|
||||||
|
visibility: hidden;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-drag-overlay {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background-image:url(../images/default/s.gif);
|
||||||
|
z-index: 20000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-clear {
|
||||||
|
clear:both;
|
||||||
|
height:0;
|
||||||
|
overflow:hidden;
|
||||||
|
line-height:0;
|
||||||
|
font-size:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.x-spotlight {
|
||||||
|
z-index: 8999;
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
-moz-opacity: 0.5;
|
||||||
|
opacity: .50;
|
||||||
|
filter: alpha(opacity=50);
|
||||||
|
background-color: #CCC;
|
||||||
|
width:0;
|
||||||
|
height:0;
|
||||||
|
zoom: 1;
|
||||||
|
}
|
246
WebWidgets/ExtJS/testsuite/bin/resources/css/date-picker.css
Normal file
246
WebWidgets/ExtJS/testsuite/bin/resources/css/date-picker.css
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-date-picker {
|
||||||
|
border: 1px solid #1b376c;
|
||||||
|
border-top:0 none;
|
||||||
|
background:#fff;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
.x-date-picker a {
|
||||||
|
-moz-outline:0 none;
|
||||||
|
outline:0 none;
|
||||||
|
}
|
||||||
|
.x-date-inner, .x-date-inner td, .x-date-inner th{
|
||||||
|
border-collapse:separate;
|
||||||
|
}
|
||||||
|
.x-date-middle,.x-date-left,.x-date-right {
|
||||||
|
background: url(../images/default/shared/hd-sprite.gif) repeat-x 0 -83px;
|
||||||
|
color:#FFF;
|
||||||
|
font:bold 11px "sans serif", tahoma, verdana, helvetica;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{
|
||||||
|
background:transparent !important;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
.x-date-middle .x-btn .x-btn-text {
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.x-date-middle .x-btn-with-menu .x-btn-center em {
|
||||||
|
background:transparent url(../images/default/toolbar/btn-arrow-light.gif) no-repeat right 0;
|
||||||
|
}
|
||||||
|
.x-date-right, .x-date-left {
|
||||||
|
width:18px;
|
||||||
|
}
|
||||||
|
.x-date-right{
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
.x-date-middle {
|
||||||
|
padding-top:2px;padding-bottom:2px;
|
||||||
|
}
|
||||||
|
.x-date-right a, .x-date-left a{
|
||||||
|
display:block;
|
||||||
|
width:16px;
|
||||||
|
height:16px;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
cursor:pointer;
|
||||||
|
-moz-opacity: 0.6;
|
||||||
|
opacity:.6;
|
||||||
|
filter: alpha(opacity=60);
|
||||||
|
}
|
||||||
|
.x-date-right a:hover, .x-date-left a:hover{
|
||||||
|
-moz-opacity: 1;
|
||||||
|
opacity:1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.x-date-right a {
|
||||||
|
background-image: url(../images/default/shared/right-btn.gif);
|
||||||
|
margin-right:2px;
|
||||||
|
text-decoration:none !important;
|
||||||
|
}
|
||||||
|
.x-date-left a{
|
||||||
|
background-image: url(../images/default/shared/left-btn.gif);
|
||||||
|
margin-left:2px;
|
||||||
|
text-decoration:none !important;
|
||||||
|
}
|
||||||
|
table.x-date-inner {
|
||||||
|
width:100%;
|
||||||
|
table-layout:fixed;
|
||||||
|
}
|
||||||
|
.x-date-inner th {
|
||||||
|
width:25px;
|
||||||
|
}
|
||||||
|
.x-date-inner th {
|
||||||
|
background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;
|
||||||
|
text-align:right !important;
|
||||||
|
border-bottom: 1px solid #a3bad9;
|
||||||
|
font:normal 10px arial, helvetica,tahoma,sans-serif;
|
||||||
|
color:#233d6d;
|
||||||
|
cursor:default;
|
||||||
|
padding:0;
|
||||||
|
border-collapse:separate;
|
||||||
|
}
|
||||||
|
.x-date-inner th span {
|
||||||
|
display:block;
|
||||||
|
padding:2px;
|
||||||
|
padding-right:7px;
|
||||||
|
}
|
||||||
|
.x-date-inner td {
|
||||||
|
border: 1px solid #fff;
|
||||||
|
text-align:right;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
.x-date-inner a {
|
||||||
|
padding:2px 5px;
|
||||||
|
display:block;
|
||||||
|
font:normal 11px arial, helvetica,tahoma,sans-serif;
|
||||||
|
text-decoration:none;
|
||||||
|
color:black;
|
||||||
|
text-align:right;
|
||||||
|
zoom:1;
|
||||||
|
}
|
||||||
|
.x-date-inner .x-date-active{
|
||||||
|
cursor:pointer;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
.x-date-inner .x-date-selected a{
|
||||||
|
background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;
|
||||||
|
border:1px solid #8db2e3;
|
||||||
|
padding:1px 4px;
|
||||||
|
}
|
||||||
|
.x-date-inner .x-date-today a{
|
||||||
|
border: 1px solid darkred;
|
||||||
|
padding:1px 4px;
|
||||||
|
}
|
||||||
|
.x-date-inner .x-date-selected span{
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a {
|
||||||
|
color:#aaaaaa;
|
||||||
|
text-decoration:none !important;
|
||||||
|
}
|
||||||
|
.x-date-bottom {
|
||||||
|
padding:4px;
|
||||||
|
border-top: 1px solid #a3bad9;
|
||||||
|
background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{
|
||||||
|
text-decoration:none !important;
|
||||||
|
color:black;
|
||||||
|
background: #ddecfe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-date-inner .x-date-disabled a {
|
||||||
|
cursor:default;
|
||||||
|
background:#eeeeee;
|
||||||
|
color:#bbbbbb;
|
||||||
|
}
|
||||||
|
.x-date-mmenu{
|
||||||
|
background:#eeeeee !important;
|
||||||
|
}
|
||||||
|
.x-date-mmenu .x-menu-item {
|
||||||
|
font-size:10px;
|
||||||
|
padding:1px 24px 1px 4px;
|
||||||
|
white-space: nowrap;
|
||||||
|
color:#000;
|
||||||
|
}
|
||||||
|
.x-date-mmenu .x-menu-item .x-menu-item-icon {
|
||||||
|
width:10px;height:10px;margin-right:5px;
|
||||||
|
background-position:center -4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-date-mp {
|
||||||
|
position:absolute;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
background:white;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
.x-date-mp td {
|
||||||
|
padding:2px;
|
||||||
|
font:normal 11px arial, helvetica,tahoma,sans-serif;
|
||||||
|
}
|
||||||
|
td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn {
|
||||||
|
border: 0 none;
|
||||||
|
text-align:center;
|
||||||
|
vertical-align: middle;
|
||||||
|
width:25%;
|
||||||
|
}
|
||||||
|
.x-date-mp-ok {
|
||||||
|
margin-right:3px;
|
||||||
|
}
|
||||||
|
.x-date-mp-btns button {
|
||||||
|
text-decoration:none;
|
||||||
|
text-align:center;
|
||||||
|
text-decoration:none !important;
|
||||||
|
background:#083772;
|
||||||
|
color:white;
|
||||||
|
border:1px solid;
|
||||||
|
border-color: #3366cc #000055 #000055 #3366cc;
|
||||||
|
padding:1px 3px 1px;
|
||||||
|
font:normal 11px arial, helvetica,tahoma,sans-serif;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
.x-date-mp-btns {
|
||||||
|
background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;
|
||||||
|
}
|
||||||
|
.x-date-mp-btns td {
|
||||||
|
border-top: 1px solid #c5d2df;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
td.x-date-mp-month a,td.x-date-mp-year a {
|
||||||
|
display:block;
|
||||||
|
padding:2px 4px;
|
||||||
|
text-decoration:none;
|
||||||
|
text-align:center;
|
||||||
|
color:#15428b;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
|
||||||
|
color:#15428b;
|
||||||
|
text-decoration:none;
|
||||||
|
cursor:pointer;
|
||||||
|
background: #ddecfe;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.x-date-mp-sel a {
|
||||||
|
padding:1px 3px;
|
||||||
|
background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;
|
||||||
|
border:1px solid #8db2e3;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn a {
|
||||||
|
overflow:hidden;
|
||||||
|
width:15px;
|
||||||
|
height:15px;
|
||||||
|
cursor:pointer;
|
||||||
|
background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat;
|
||||||
|
display:block;
|
||||||
|
margin:0 auto;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn a.x-date-mp-next {
|
||||||
|
background-position:0 -120px;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn a.x-date-mp-next:hover {
|
||||||
|
background-position:-15px -120px;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn a.x-date-mp-prev {
|
||||||
|
background-position:0 -105px;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn a.x-date-mp-prev:hover {
|
||||||
|
background-position:-15px -105px;
|
||||||
|
}
|
||||||
|
.x-date-mp-ybtn {
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
td.x-date-mp-sep {
|
||||||
|
border-right:1px solid #c5d2df;
|
||||||
|
}
|
75
WebWidgets/ExtJS/testsuite/bin/resources/css/dd.css
Normal file
75
WebWidgets/ExtJS/testsuite/bin/resources/css/dd.css
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
.x-dd-drag-proxy{
|
||||||
|
position:absolute;
|
||||||
|
left:0;top:0;
|
||||||
|
visibility:hidden;
|
||||||
|
z-index:15000;
|
||||||
|
}
|
||||||
|
.x-dd-drag-ghost{
|
||||||
|
color: black;
|
||||||
|
font: normal 11px arial, helvetica, sans-serif;
|
||||||
|
-moz-opacity: 0.85;
|
||||||
|
opacity:.85;
|
||||||
|
filter: alpha(opacity=85);
|
||||||
|
border-top:1px solid #dddddd;
|
||||||
|
border-left:1px solid #dddddd;
|
||||||
|
border-right:1px solid #bbbbbb;
|
||||||
|
border-bottom:1px solid #bbbbbb;
|
||||||
|
padding:3px;
|
||||||
|
padding-left:20px;
|
||||||
|
background-color:white;
|
||||||
|
white-space:nowrap;
|
||||||
|
}
|
||||||
|
.x-dd-drag-repair .x-dd-drag-ghost{
|
||||||
|
-moz-opacity: 0.4;
|
||||||
|
opacity:.4;
|
||||||
|
filter: alpha(opacity=40);
|
||||||
|
border:0 none;
|
||||||
|
padding:0;
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
.x-dd-drag-repair .x-dd-drop-icon{
|
||||||
|
visibility:hidden;
|
||||||
|
}
|
||||||
|
.x-dd-drop-icon{
|
||||||
|
position:absolute;
|
||||||
|
top:3px;
|
||||||
|
left:3px;
|
||||||
|
display:block;
|
||||||
|
width:16px;
|
||||||
|
height:16px;
|
||||||
|
background-color:transparent;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
z-index:1;
|
||||||
|
}
|
||||||
|
.x-dd-drop-nodrop .x-dd-drop-icon{
|
||||||
|
background-image: url(../images/default/dd/drop-no.gif);
|
||||||
|
}
|
||||||
|
.x-dd-drop-ok .x-dd-drop-icon{
|
||||||
|
background-image: url(../images/default/dd/drop-yes.gif);
|
||||||
|
}
|
||||||
|
.x-dd-drop-ok-add .x-dd-drop-icon{
|
||||||
|
background-image: url(../images/default/dd/drop-add.gif);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.x-view-selector {
|
||||||
|
position:absolute;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
width:0;
|
||||||
|
background:#c3daf9;
|
||||||
|
border:1px dotted #3399bb;
|
||||||
|
opacity: .5;
|
||||||
|
-moz-opacity: .5;
|
||||||
|
filter:alpha(opacity=50);
|
||||||
|
zoom:1;
|
||||||
|
}
|
37
WebWidgets/ExtJS/testsuite/bin/resources/css/debug.css
Normal file
37
WebWidgets/ExtJS/testsuite/bin/resources/css/debug.css
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* Ext JS Library 2.0.2
|
||||||
|
* Copyright(c) 2006-2008, Ext JS, LLC.
|
||||||
|
* licensing@extjs.com
|
||||||
|
*
|
||||||
|
* http://extjs.com/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
#x-debug-browser .x-tree .x-tree-node a span {
|
||||||
|
color:#222297;
|
||||||
|
font-size:11px;
|
||||||
|
padding-top:2px;
|
||||||
|
font-family:"monotype","courier new",sans-serif;
|
||||||
|
line-height:18px;
|
||||||
|
}
|
||||||
|
#x-debug-browser .x-tree a i {
|
||||||
|
color:#FF4545;
|
||||||
|
font-style:normal;
|
||||||
|
}
|
||||||
|
#x-debug-browser .x-tree a em {
|
||||||
|
color:#999;
|
||||||
|
}
|
||||||
|
#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{
|
||||||
|
background:#c3daf9;
|
||||||
|
}
|
||||||
|
#x-debug-browser .x-tool-toggle {
|
||||||
|
background-position:0 -75px;
|
||||||
|
}
|
||||||
|
#x-debug-browser .x-tool-toggle-over {
|
||||||
|
background-position:-15px -75px;
|
||||||
|
}
|
||||||
|
#x-debug-browser.x-panel-collapsed .x-tool-toggle {
|
||||||
|
background-position:0 -60px;
|
||||||
|
}
|
||||||
|
#x-debug-browser.x-panel-collapsed .x-tool-toggle-over {
|
||||||
|
background-position:-15px -60px;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user