Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added SampleObjectManager project

  • Loading branch information...
commit 715e37a38be5df34bf5e444cc6684b0a3ba9455f 1 parent 4b9a2c1
Dale Fugier dalefugier authored
6 SampleObjectManager/SampleObjectManager.def
View
@@ -0,0 +1,6 @@
+; SampleObjectManager.def : Declares the module parameters for the DLL.
+
+; LIBRARY "SampleObjectManager"
+
+EXPORTS
+ ; Explicit exports can go here
162 SampleObjectManager/SampleObjectManager.rc
View
@@ -0,0 +1,162 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#include ""res\\SampleObjectManager.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "00000409"
+ BEGIN
+ VALUE "CompanyName", "Robert McNeel & Associates"
+ VALUE "FileDescription", "SampleObjectManager"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "InternalName", "SampleObjectManager.rhp"
+ VALUE "LegalCopyright", "Copyright � 2012, Robert McNeel & Associates"
+ VALUE "OriginalFilename", "SampleObjectManager.rhp"
+ VALUE "ProductName", "SampleObjectManager"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1033
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OBJECT_MANAGER_DIALOG DIALOGEX 0, 0, 186, 233
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LISTBOX IDC_LISTBOX,7,18,172,208,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
+ LTEXT "0 objects selected",IDC_LABEL,7,7,172,8
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OBJECT_MANAGER_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 226
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_DOCKBAR_ICON ICON "res\\SampleObjectManager.ico"
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#include "res\SampleObjectManager.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
316 SampleObjectManager/SampleObjectManager.vcxproj
View
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PseudoDebug|Win32">
+ <Configuration>PseudoDebug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PseudoDebug|x64">
+ <Configuration>PseudoDebug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EB443967-35D8-4929-918D-A68E082C5ACC}</ProjectGuid>
+ <RootNamespace>SampleObjectManager</RootNamespace>
+ <Keyword>MFCDLLProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ <PlatformToolset>v80rhino5</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ <PlatformToolset>v80rhino5</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ <PlatformToolset>v80rhino5</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|Win32'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'">
+ <TargetExt>.rhp</TargetExt>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN64;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>Disabled</Optimization>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;RHINO_DEBUG_PLUGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>
+ </EnableCOMDATFolding>
+ <OptimizeReferences>
+ </OptimizeReferences>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN64;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>Disabled</Optimization>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <IntrinsicFunctions>false</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN64;_WINDOWS;NDEBUG;_USRDLL;RHINO_DEBUG_PLUGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>
+ </EnableCOMDATFolding>
+ <OptimizeReferences>
+ </OptimizeReferences>
+ <ModuleDefinitionFile>.\SampleObjectManager.def</ModuleDefinitionFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="cmdSampleObjectManager.cpp" />
+ <ClCompile Include="SampleObjectManagerApp.cpp" />
+ <ClCompile Include="SampleObjectManagerDialog.cpp" />
+ <ClCompile Include="SampleObjectManagerPlugIn.cpp" />
+ <ClCompile Include="stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Resource.h" />
+ <ClInclude Include="SampleObjectManagerApp.h" />
+ <ClInclude Include="SampleObjectManagerDialog.h" />
+ <ClInclude Include="SampleObjectManagerPlugIn.h" />
+ <ClInclude Include="stdafx.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\SampleObjectManager.ico" />
+ <None Include="res\SampleObjectManager.rc2" />
+ <None Include="SampleObjectManager.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="SampleObjectManager.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
67 SampleObjectManager/SampleObjectManager.vcxproj.filters
View
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="SampleObjectManagerApp.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="SampleObjectManagerPlugIn.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="cmdSampleObjectManager.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="SampleObjectManagerDialog.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="SampleObjectManagerApp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SampleObjectManagerPlugIn.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="SampleObjectManagerDialog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="SampleObjectManager.def">
+ <Filter>Source Files</Filter>
+ </None>
+ <None Include="res\SampleObjectManager.rc2">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\SampleObjectManager.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="SampleObjectManager.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
77 SampleObjectManager/SampleObjectManagerApp.cpp
View
@@ -0,0 +1,77 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerApp.cpp : Defines the initialization routines for the DLL.
+//
+
+#include "stdafx.h"
+#include "SampleObjectManagerApp.h"
+
+//
+// Note!
+//
+// A Rhino plug-in is an MFC DLL.
+//
+// If this DLL is dynamically linked against the MFC
+// DLLs, any functions exported from this DLL which
+// call into MFC must have the AFX_MANAGE_STATE macro
+// added at the very beginning of the function.
+//
+// For example:
+//
+// extern "C" BOOL PASCAL EXPORT ExportedFunction()
+// {
+// AFX_MANAGE_STATE(AfxGetStaticModuleState());
+// // normal function body here
+// }
+//
+// It is very important that this macro appear in each
+// function, prior to any calls into MFC. This means that
+// it must appear as the first statement within the
+// function, even before any object variable declarations
+// as their constructors may generate calls into the MFC
+// DLL.
+//
+// Please see MFC Technical Notes 33 and 58 for additional
+// details.
+//
+
+
+// CSampleObjectManagerApp
+
+BEGIN_MESSAGE_MAP(CSampleObjectManagerApp, CWinApp)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CSampleObjectManagerApp construction
+
+CSampleObjectManagerApp::CSampleObjectManagerApp()
+{
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+// The one and only CSampleObjectManagerApp object
+CSampleObjectManagerApp theApp;
+
+/////////////////////////////////////////////////////////////////////////////
+// CSampleObjectManagerApp initialization
+
+BOOL CSampleObjectManagerApp::InitInstance()
+{
+ // CRITICAL: DO NOT CALL RHINO SDK FUNCTIONS HERE!
+ // Only standard MFC DLL instance initialization belongs here.
+ // All other significant initialization should take place in
+ // CSampleObjectManagerPlugIn::OnLoadPlugIn().
+
+ CWinApp::InitInstance();
+
+ return TRUE;
+}
+
+int CSampleObjectManagerApp::ExitInstance()
+{
+ // CRITICAL: DO NOT CALL RHINO SDK FUNCTIONS HERE!
+ // Only standard MFC DLL instance clean up belongs here.
+ // All other significant cleanup should take place in either
+ // CSampleObjectManagerPlugIn::OnSaveAllSettings() or CSampleObjectManagerPlugIn::OnUnloadPlugIn().
+ return CWinApp::ExitInstance();
+}
29 SampleObjectManager/SampleObjectManagerApp.h
View
@@ -0,0 +1,29 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerApp.h : main header file for the SampleObjectManager DLL
+//
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "Resource.h" // main symbols
+
+/////////////////////////////////////////////////////////////////////////////
+// CSampleObjectManagerApp
+// See SampleObjectManagerApp.cpp for the implementation of this class
+//
+
+class CSampleObjectManagerApp : public CWinApp
+{
+public:
+ CSampleObjectManagerApp();
+
+// Overrides
+public:
+ virtual BOOL InitInstance();
+ virtual int ExitInstance();
+
+ DECLARE_MESSAGE_MAP()
+};
358 SampleObjectManager/SampleObjectManagerDialog.cpp
View
@@ -0,0 +1,358 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerDialog.cpp
+//
+
+#include "stdafx.h"
+#include "SampleObjectManagerDialog.h"
+#include "SampleObjectManagerPlugIn.h"
+
+IMPLEMENT_DYNCREATE( CSampleObjectManagerDialog, CRhinoTabbedDockBarDialog )
+
+CSampleObjectManagerDialog::CSampleObjectManagerDialog()
+: CRhinoTabbedDockBarDialog()
+{
+ CRhinoEventWatcher::Register();
+ CRhinoEventWatcher::Enable( FALSE );
+}
+
+CSampleObjectManagerDialog::~CSampleObjectManagerDialog()
+{
+ CRhinoEventWatcher::Enable( FALSE );
+ CRhinoEventWatcher::UnRegister();
+}
+
+const wchar_t* CSampleObjectManagerDialog::Caption() const
+{
+ return L"Objects";
+}
+
+ON_UUID CSampleObjectManagerDialog::TabId() const
+{
+ return ID();
+}
+
+ON_UUID CSampleObjectManagerDialog::ID()
+{
+ // {BAB358D5-D9CF-42B5-90AE-064853BACC5B}
+ static const GUID SampleObjectManagerDialog_UUID =
+ { 0xBAB358D5, 0xD9CF, 0x42B5, { 0x90, 0xAE, 0x06, 0x48, 0x53, 0xBA, 0xCC, 0x5B } };
+ return SampleObjectManagerDialog_UUID;
+}
+
+ON_UUID CSampleObjectManagerDialog::PlugInId() const
+{
+ return SampleObjectManagerPlugIn().PlugInID();
+}
+
+HICON CSampleObjectManagerDialog::Icon() const
+{
+ AFX_MANAGE_STATE( AfxGetStaticModuleState() );
+ return ::LoadIcon( AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_DOCKBAR_ICON) );
+}
+
+void CSampleObjectManagerDialog::DoDataExchange(CDataExchange* pDX)
+{
+ CRhinoTabbedDockBarDialog::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_LABEL, m_label);
+ DDX_Control(pDX, IDC_LISTBOX, m_listbox);
+}
+
+void CSampleObjectManagerDialog::OnShowDockBar( bool bShowDockBar )
+{
+ if( bShowDockBar )
+ {
+ CRhinoEventWatcher::Enable( TRUE );
+ FillListBox();
+ }
+ else
+ {
+ CRhinoEventWatcher::Enable( FALSE );
+ m_listbox.ResetContent();
+ }
+}
+
+BEGIN_MESSAGE_MAP(CSampleObjectManagerDialog, CRhinoTabbedDockBarDialog)
+ ON_WM_TIMER()
+END_MESSAGE_MAP()
+
+BOOL CSampleObjectManagerDialog::PreTranslateMessage( MSG* pMsg )
+{
+ if( pMsg && pMsg->message == WM_KEYDOWN )
+ {
+ if( pMsg->wParam == VK_F5 )
+ {
+ FillListBox();
+ return TRUE;
+ }
+ }
+ return CRhinoTabbedDockBarDialog::PreTranslateMessage( pMsg );
+}
+
+BOOL CSampleObjectManagerDialog::OnInitDialog()
+{
+ m_Resize.Add( IDC_LABEL, CRhinoUiDialogItemResizer::resize_lockleft | CRhinoUiDialogItemResizer::resize_lockright );
+ m_Resize.Add( IDC_LISTBOX, CRhinoUiDialogItemResizer::resize_lockall );
+
+ CRhinoTabbedDockBarDialog::OnInitDialog();
+
+ return TRUE;
+}
+
+bool CSampleObjectManagerDialog::IsValid() const
+{
+ if( ::IsWindow(m_hWnd) && ::IsWindowVisible(m_hWnd) )
+ return true;
+ return false;
+}
+
+void CSampleObjectManagerDialog::CreateTimer( timer_type timer )
+{
+ if( m_timer_ids[timer] )
+ {
+ KillTimer( m_timer_ids[timer] );
+ m_timer_ids[timer] = 0;
+ }
+
+ UINT_PTR timer_id = SetTimer( WM_USER + timer, 100, 0 );
+ if( timer_id )
+ m_timer_ids[timer] = timer_id;
+ else
+ OnTimer( WM_USER + timer );
+}
+
+void CSampleObjectManagerDialog::OnTimer( UINT_PTR nIDEvent )
+{
+ UINT_PTR timer = nIDEvent - WM_USER;
+ if( add_timer <= timer && timer <= deselectall_timer )
+ {
+ KillTimer( m_timer_ids[timer] );
+ m_timer_ids[timer] = 0;
+ }
+
+ switch( timer )
+ {
+ case add_timer:
+ AddHelper();
+ break;
+
+ case delete_timer:
+ DeleteHelper();
+ break;
+
+ case select_timer:
+ SelectHelper();
+ break;
+
+ case deselect_timer:
+ DeselectHelper();
+ break;
+
+ case deselectall_timer:
+ DeselectAllHelper();
+ break;
+ }
+
+ CRhinoTabbedDockBarDialog::OnTimer( nIDEvent );
+}
+
+void CSampleObjectManagerDialog::OnNewDocument( CRhinoDoc& doc )
+{
+}
+
+void CSampleObjectManagerDialog::OnEndOpenDocument( CRhinoDoc& doc, const wchar_t* filename, BOOL bMerge, BOOL bReference )
+{
+}
+
+void CSampleObjectManagerDialog::OnCloseDocument( CRhinoDoc& doc )
+{
+ m_listbox.ResetContent();
+}
+
+void CSampleObjectManagerDialog::OnBeginCommand( const CRhinoCommand& command, const CRhinoCommandContext& context )
+{
+}
+
+void CSampleObjectManagerDialog::OnEndCommand( const CRhinoCommand& command, const CRhinoCommandContext& context, CRhinoCommand::result rc )
+{
+}
+
+void CSampleObjectManagerDialog::OnAddObject( CRhinoDoc& doc, CRhinoObject& object )
+{
+ if( IsValid() )
+ {
+ m_add_ids.AddUuid( object.Attributes().m_uuid );
+ CreateTimer( add_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnDeleteObject( CRhinoDoc& doc, CRhinoObject& object )
+{
+ if( IsValid() )
+ {
+ m_delete_ids.AddUuid( object.Attributes().m_uuid );
+ CreateTimer( delete_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnSelectObject( CRhinoDoc& doc, const CRhinoObject& object )
+{
+ if( IsValid() )
+ {
+ m_select_ids.AddUuid( object.Attributes().m_uuid );
+ CreateTimer( select_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnSelectObjects( CRhinoDoc& doc, const ON_SimpleArray<const CRhinoObject*>& objects )
+{
+ if( IsValid() )
+ {
+ for( int i = 0; i < objects.Count(); i++ )
+ {
+ const CRhinoObject* object = objects[i];
+ if( object )
+ m_select_ids.AddUuid( object->Attributes().m_uuid );
+ }
+ CreateTimer( select_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnDeselectObject( CRhinoDoc& doc, const CRhinoObject& object )
+{
+ if( IsValid() )
+ {
+ m_deselect_ids.AddUuid( object.Attributes().m_uuid );
+ CreateTimer( deselect_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnDeselectObjects( CRhinoDoc& doc, const ON_SimpleArray<const CRhinoObject*>& objects )
+{
+ if( IsValid() )
+ {
+ for( int i = 0; i < objects.Count(); i++ )
+ {
+ const CRhinoObject* object = objects[i];
+ if( object )
+ m_deselect_ids.AddUuid( object->Attributes().m_uuid );
+ }
+ CreateTimer( deselect_timer );
+ }
+}
+
+void CSampleObjectManagerDialog::OnDeselectAllObjects( CRhinoDoc& doc, int count )
+{
+ if( IsValid() )
+ CreateTimer( deselectall_timer );
+}
+
+void CSampleObjectManagerDialog::AddHelper()
+{
+ const ON_UUID* pids = m_add_ids.Array();
+ if( pids )
+ {
+ int i, index = -1;
+ ON_wString str;
+ for( i = 0; i < m_add_ids.Count(); i++ )
+ {
+ ON_UuidToString( pids[i], str );
+ str.MakeLower();
+ index = m_listbox.AddString( str );
+ }
+ }
+ m_add_ids.Empty();
+}
+
+void CSampleObjectManagerDialog::DeleteHelper()
+{
+ const ON_UUID* pids = m_delete_ids.Array();
+ if( pids )
+ {
+ int i, index = -1;
+ ON_wString str;
+ for( i = 0; i < m_delete_ids.Count(); i++ )
+ {
+ ON_UuidToString( pids[i], str );
+ str.MakeLower();
+ index = m_listbox.FindStringExact( index, str );
+ if( index != LB_ERR )
+ m_listbox.DeleteString( index );
+ else
+ break;
+ }
+ }
+ m_delete_ids.Empty();
+}
+
+void CSampleObjectManagerDialog::SelectHelper()
+{
+ const ON_UUID* pids = m_select_ids.Array();
+ if( pids )
+ {
+ int i, index = -1;
+ ON_wString str;
+ for( i = 0; i < m_select_ids.Count(); i++ )
+ {
+ ON_UuidToString( pids[i], str );
+ str.MakeLower();
+ index = m_listbox.FindStringExact( index, str );
+ if( index != LB_ERR )
+ m_listbox.SetSel( index, TRUE );
+ else
+ break;
+ }
+ }
+ m_select_ids.Empty();
+}
+
+void CSampleObjectManagerDialog::DeselectHelper()
+{
+ const ON_UUID* pids = m_deselect_ids.Array();
+ if( pids )
+ {
+ int i, index = -1;
+ ON_wString str;
+ for( i = 0; i < m_deselect_ids.Count(); i++ )
+ {
+ ON_UuidToString( pids[i], str );
+ str.MakeLower();
+ index = m_listbox.FindStringExact( index, str );
+ if( index != LB_ERR )
+ m_listbox.SetSel( index, FALSE );
+ else
+ break;
+ }
+ }
+ m_deselect_ids.Empty();
+}
+
+void CSampleObjectManagerDialog::DeselectAllHelper()
+{
+ m_listbox.SetSel( -1, FALSE );
+ m_deselect_ids.Empty();
+}
+
+void CSampleObjectManagerDialog::FillListBox()
+{
+ m_listbox.SetRedraw( FALSE );
+ m_listbox.ResetContent();
+
+ CRhinoObjectIterator it( CRhinoObjectIterator::normal_objects, CRhinoObjectIterator::active_and_reference_objects );
+ it.IncludeLights( true );
+ it.IncludeGrips( false );
+
+ const CRhinoObject* obj = 0;
+ ON_wString str;
+ for( obj = it.First(); obj; obj = it.Next() )
+ {
+ ON_UuidToString( obj->Attributes().m_uuid, str );
+ str.MakeLower();
+ int index = m_listbox.AddString( str );
+ if( obj->IsSelected() )
+ m_listbox.SetSel( index, TRUE );
+ }
+
+ m_listbox.SetRedraw( TRUE );
+ m_listbox.Invalidate();
+ m_listbox.UpdateWindow();
+}
78 SampleObjectManager/SampleObjectManagerDialog.h
View
@@ -0,0 +1,78 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerDialog.h
+//
+
+#pragma once
+
+#include "Resource.h"
+
+class CSampleObjectManagerDialog : public CRhinoTabbedDockBarDialog,
+ public CRhinoEventWatcher
+{
+ DECLARE_DYNCREATE( CSampleObjectManagerDialog )
+
+public:
+ CSampleObjectManagerDialog();
+ virtual ~CSampleObjectManagerDialog();
+
+ // Required CRhinoTabbedDockBarDialog overrides
+ const wchar_t* Caption() const;
+ ON_UUID TabId() const;
+ static ON_UUID ID();
+ ON_UUID PlugInId() const;
+ HICON Icon() const;
+
+ // Optional CRhinoTabbedDockBarDialog overrides
+ void OnShowDockBar( bool bShowDockBar );
+
+ // Optional CRhinoEventWatcher overrides
+ void OnNewDocument( CRhinoDoc& doc );
+ void OnEndOpenDocument( CRhinoDoc& doc, const wchar_t* filename, BOOL bMerge, BOOL bReference );
+ void OnCloseDocument( CRhinoDoc& doc );
+ void OnBeginCommand( const CRhinoCommand& command, const CRhinoCommandContext& context );
+ void OnEndCommand( const CRhinoCommand& command, const CRhinoCommandContext& context, CRhinoCommand::result rc );
+ void OnAddObject( CRhinoDoc& doc, CRhinoObject& object );
+ void OnDeleteObject( CRhinoDoc& doc, CRhinoObject& object );
+ void OnSelectObject( CRhinoDoc& doc, const CRhinoObject& object );
+ void OnSelectObjects( CRhinoDoc& doc, const ON_SimpleArray<const CRhinoObject*>& objects );
+ void OnDeselectObject( CRhinoDoc& doc, const CRhinoObject& object );
+ void OnDeselectObjects( CRhinoDoc& doc, const ON_SimpleArray<const CRhinoObject*>& objects );
+ void OnDeselectAllObjects( CRhinoDoc& doc, int count );
+
+ // Dialog Data
+ enum { IDD = IDD_OBJECT_MANAGER_DIALOG };
+ CStatic m_label;
+ CListBox m_listbox;
+
+ ON_UuidList m_add_ids;
+ ON_UuidList m_delete_ids;
+ ON_UuidList m_select_ids;
+ ON_UuidList m_deselect_ids;
+
+ UINT_PTR m_timer_ids[5];
+ enum timer_type
+ {
+ add_timer = 0,
+ delete_timer,
+ select_timer,
+ deselect_timer,
+ deselectall_timer,
+ };
+ void CreateTimer( timer_type timer );
+
+protected:
+ virtual void DoDataExchange( CDataExchange* pDX );
+ virtual BOOL OnInitDialog();
+ virtual BOOL PreTranslateMessage( MSG* pMsg );
+ afx_msg void OnTimer( UINT_PTR nIDEvent );
+ DECLARE_MESSAGE_MAP()
+
+private:
+ bool IsValid() const;
+ void AddHelper();
+ void DeleteHelper();
+ void SelectHelper();
+ void DeselectHelper();
+ void DeselectAllHelper();
+ void FillListBox();
+};
144 SampleObjectManager/SampleObjectManagerPlugIn.cpp
View
@@ -0,0 +1,144 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerPlugIn.cpp : defines the initialization routines for the plug-in.
+//
+
+#include "StdAfx.h"
+#include "SampleObjectManagerPlugIn.h"
+#include "SampleObjectManagerDialog.h"
+
+// The plug-in object must be constructed before any plug-in classes
+// derived from CRhinoCommand. The #pragma init_seg(lib) ensures that
+// this happens.
+
+#pragma warning( push )
+#pragma warning( disable : 4073 )
+#pragma init_seg( lib )
+#pragma warning( pop )
+
+// Rhino plug-in declaration
+RHINO_PLUG_IN_DECLARE
+
+// Rhino plug-in name
+// Provide a short, friendly name for this plug-in.
+RHINO_PLUG_IN_NAME( L"SampleObjectManager" );
+
+// Rhino plug-in id
+// Provide a unique uuid for this plug-in
+RHINO_PLUG_IN_ID( L"990DDEEC-E207-4C17-9825-60D5E1846A41" );
+
+// Rhino plug-in version
+// Provide a version number string for this plug-in
+RHINO_PLUG_IN_VERSION( __DATE__" "__TIME__ )
+
+// Rhino plug-in developer declarations
+RHINO_PLUG_IN_DEVELOPER_ORGANIZATION( L"Robert McNeel & Associates" );
+RHINO_PLUG_IN_DEVELOPER_ADDRESS( L"3670 Woodland Park Avenue North\015\012Seattle WA 98103" );
+RHINO_PLUG_IN_DEVELOPER_COUNTRY( L"United States" );
+RHINO_PLUG_IN_DEVELOPER_PHONE( L"206-545-6877" );
+RHINO_PLUG_IN_DEVELOPER_FAX( L"206-545-7321" );
+RHINO_PLUG_IN_DEVELOPER_EMAIL( L"tech@mcneel.com" );
+RHINO_PLUG_IN_DEVELOPER_WEBSITE( L"http://www.rhino3d.com" );
+RHINO_PLUG_IN_UPDATE_URL( L"https://github.com/mcneel/" );
+
+// The one and only CSampleObjectManagerPlugIn object
+static CSampleObjectManagerPlugIn thePlugIn;
+
+/////////////////////////////////////////////////////////////////////////////
+// CSampleObjectManagerPlugIn definition
+
+CSampleObjectManagerPlugIn& SampleObjectManagerPlugIn()
+{
+ // Return a reference to the one and only CSampleObjectManagerPlugIn object
+ return thePlugIn;
+}
+
+CSampleObjectManagerPlugIn::CSampleObjectManagerPlugIn()
+{
+ // Description:
+ // CSampleObjectManagerPlugIn constructor. The constructor is called when the
+ // plug-in is loaded and "thePlugIn" is constructed. Once the plug-in
+ // is loaded, CSampleObjectManagerPlugIn::OnLoadPlugIn() is called. The
+ // constructor should be simple and solid. Do anything that might fail in
+ // CSampleObjectManagerPlugIn::OnLoadPlugIn().
+
+ // TODO: Add construction code here
+ m_plugin_version = RhinoPlugInVersion();
+}
+
+CSampleObjectManagerPlugIn::~CSampleObjectManagerPlugIn()
+{
+ // Description:
+ // CSampleObjectManagerPlugIn destructor. The destructor is called to destroy
+ // "thePlugIn" when the plug-in is unloaded. Immediately before the
+ // DLL is unloaded, CSampleObjectManagerPlugIn::OnUnloadPlugin() is called. Do
+ // not do too much here. Be sure to clean up any memory you have allocated
+ // with onmalloc(), onrealloc(), oncalloc(), or onstrdup().
+
+ // TODO: Add destruction code here
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// Required overrides
+
+const wchar_t* CSampleObjectManagerPlugIn::PlugInName() const
+{
+ // Description:
+ // Plug-in name display string. This name is displayed by Rhino when
+ // loading the plug-in, in the plug-in help menu, and in the Rhino
+ // interface for managing plug-ins.
+
+ // TODO: Return a short, friendly name for the plug-in.
+ return RhinoPlugInName();
+}
+
+const wchar_t* CSampleObjectManagerPlugIn::PlugInVersion() const
+{
+ // Description:
+ // Plug-in version display string. This name is displayed by Rhino
+ // when loading the plug-in and in the Rhino interface for managing
+ // plug-ins.
+
+ // TODO: Return the version number of the plug-in.
+ return m_plugin_version;
+}
+
+GUID CSampleObjectManagerPlugIn::PlugInID() const
+{
+ // Description:
+ // Plug-in unique identifier. The identifier is used by Rhino to
+ // manage the plug-ins.
+
+ // TODO: Return a unique identifier for the plug-in.
+ // {990DDEEC-E207-4C17-9825-60D5E1846A41}
+ return ON_UuidFromString( RhinoPlugInId() );
+}
+
+BOOL CSampleObjectManagerPlugIn::OnLoadPlugIn()
+{
+ // Description:
+ // Called after the plug-in is loaded and the constructor has been
+ // run. This is a good place to perform any significant initialization,
+ // license checking, and so on. This function must return TRUE for
+ // the plug-in to continue to load.
+
+ // TODO: Add plug-in initialization code here.
+ CSampleObjectManagerDialog::CRhinoTabbedDockBarDialog::Register(
+ RUNTIME_CLASS(CSampleObjectManagerDialog),
+ CSampleObjectManagerDialog::IDD,
+ AfxGetStaticModuleState()
+ );
+
+ return CRhinoUtilityPlugIn::OnLoadPlugIn();
+}
+
+void CSampleObjectManagerPlugIn::OnUnloadPlugIn()
+{
+ // Description:
+ // Called when the plug-in is about to be unloaded. After
+ // this function is called, the destructor will be called.
+
+ // TODO: Add plug-in cleanup code here.
+
+ CRhinoUtilityPlugIn::OnUnloadPlugIn();
+}
+
34 SampleObjectManager/SampleObjectManagerPlugIn.h
View
@@ -0,0 +1,34 @@
+/////////////////////////////////////////////////////////////////////////////
+// SampleObjectManagerPlugIn.h : main header file for the SampleObjectManager plug-in
+//
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////////////////
+// CSampleObjectManagerPlugIn
+// See SampleObjectManagerPlugIn.cpp for the implementation of this class
+//
+
+class CSampleObjectManagerPlugIn : public CRhinoUtilityPlugIn
+{
+public:
+ CSampleObjectManagerPlugIn();
+ ~CSampleObjectManagerPlugIn();
+
+ // Required overrides
+ const wchar_t* PlugInName() const;
+ const wchar_t* PlugInVersion() const;
+ GUID PlugInID() const;
+ BOOL OnLoadPlugIn();
+ void OnUnloadPlugIn();
+
+private:
+ ON_wString m_plugin_version;
+
+ // TODO: Add additional class information here
+};
+
+CSampleObjectManagerPlugIn& SampleObjectManagerPlugIn();
+
+
+
113 SampleObjectManager/cmdSampleObjectManager.cpp
View
@@ -0,0 +1,113 @@
+/////////////////////////////////////////////////////////////////////////////
+// cmdSampleObjectManager.cpp : command file
+//
+
+#include "StdAfx.h"
+#include "SampleObjectManagerPlugIn.h"
+#include "SampleObjectManagerDialog.h"
+
+////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////
+//
+// BEGIN SampleObjectManager command
+//
+
+#pragma region SampleObjectManager command
+
+
+// Do NOT put the definition of class CCommandSampleObjectManager in a header
+// file. There is only ONE instance of a CCommandSampleObjectManager class
+// and that instance is the static theSampleObjectManagerCommand that appears
+// immediately below the class definition.
+
+class CCommandSampleObjectManager : public CRhinoCommand
+{
+public:
+ // The one and only instance of CCommandSampleObjectManager is created below.
+ // No copy constructor or operator= is required. Values of
+ // member variables persist for the duration of the application.
+
+ // CCommandSampleObjectManager::CCommandSampleObjectManager()
+ // is called exactly once when static theSampleObjectManagerCommand is created.
+ CCommandSampleObjectManager() {}
+
+ // CCommandSampleObjectManager::~CCommandSampleObjectManager()
+ // is called exactly once when static theSampleObjectManagerCommand is
+ // destroyed. The destructor should not make any calls to
+ // the Rhino SDK. If your command has persistent settings,
+ // then override CRhinoCommand::SaveProfile and CRhinoCommand::LoadProfile.
+ ~CCommandSampleObjectManager() {}
+
+ // Returns a unique UUID for this command.
+ // If you try to use an id that is already being used, then
+ // your command will not work. Use GUIDGEN.EXE to make unique UUID.
+ UUID CommandUUID()
+ {
+ // {415ABCAE-E332-466A-B139-2963E81166C1}
+ static const GUID SampleObjectManagerCommand_UUID =
+ { 0x415ABCAE, 0xE332, 0x466A, { 0xB1, 0x39, 0x29, 0x63, 0xE8, 0x11, 0x66, 0xC1 } };
+ return SampleObjectManagerCommand_UUID;
+ }
+
+ // Returns the English command name.
+ const wchar_t* EnglishCommandName() { return L"SampleObjectManager"; }
+
+ // Returns the localized command name.
+ const wchar_t* LocalCommandName() const { return L"SampleObjectManager"; }
+
+ // Rhino calls RunCommand to run the command.
+ CRhinoCommand::result RunCommand( const CRhinoCommandContext& );
+};
+
+// The one and only CCommandSampleObjectManager object.
+// Do NOT create any other instance of a CCommandSampleObjectManager class.
+static class CCommandSampleObjectManager theSampleObjectManagerCommand;
+
+CRhinoCommand::result CCommandSampleObjectManager::RunCommand( const CRhinoCommandContext& context )
+{
+ ON_UUID tabId = CSampleObjectManagerDialog::ID();
+
+ if( context.IsInteractive() )
+ {
+ CRhinoTabbedDockBarDialog::OpenDockbarTab( tabId );
+ }
+ else
+ {
+ bool bVisible = CRhinoTabbedDockBarDialog::IsTabVisible( tabId );
+
+ ON_wString str;
+ str.Format( L"%s is %s. New value", LocalCommandName(), bVisible ? L"visible" : L"hidden" );
+
+ CRhinoGetOption go;
+ go.SetCommandPrompt( str );
+ int h_option = go.AddCommandOption( RHCMDOPTNAME(L"Hide") );
+ int s_option = go.AddCommandOption( RHCMDOPTNAME(L"Show") );
+ int t_option = go.AddCommandOption( RHCMDOPTNAME(L"Toggle") );
+ go.GetOption();
+ if( go.CommandResult() != CRhinoCommand::success )
+ return go.CommandResult();
+
+ const CRhinoCommandOption* option = go.Option();
+ if( 0 == option )
+ return CRhinoCommand::failure;
+
+ int option_index = option->m_option_index;
+
+ if( h_option == option_index && bVisible )
+ CRhinoTabbedDockBarDialog::ShowDockbarTab( tabId, false );
+ else if( s_option == option_index && !bVisible )
+ CRhinoTabbedDockBarDialog::ShowDockbarTab( tabId, true );
+ else if( t_option == option_index )
+ CRhinoTabbedDockBarDialog::ShowDockbarTab( tabId, !bVisible );
+ }
+
+ return CRhinoCommand::success;
+}
+
+#pragma endregion
+
+//
+// END SampleObjectManager command
+//
+////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////
BIN  SampleObjectManager/res/SampleObjectManager.ico
View
Binary file not shown
13 SampleObjectManager/res/SampleObjectManager.rc2
View
@@ -0,0 +1,13 @@
+//
+// SampleObjectManager.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
20 SampleObjectManager/resource.h
View
@@ -0,0 +1,20 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by SampleObjectManager.rc
+//
+#define IDC_LISTBOX 17000
+#define IDD_OBJECT_MANAGER_DIALOG 17000
+#define IDC_LABEL 17001
+#define IDI_ICON1 23002
+#define IDI_DOCKBAR_ICON 23002
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 23003
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 23002
+#define _APS_NEXT_SYMED_VALUE 23002
+#endif
+#endif
8 SampleObjectManager/stdafx.cpp
View
@@ -0,0 +1,8 @@
+/////////////////////////////////////////////////////////////////////////////
+// stdafx.cpp : source file that includes just the standard includes
+// SampleObjectManager.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
80 SampleObjectManager/stdafx.h
View
@@ -0,0 +1,80 @@
+/////////////////////////////////////////////////////////////////////////////
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#endif
+
+// Disable warning C4100: 'identifier' : unreferenced formal parameter
+#pragma warning( disable:4100 )
+
+// Rhino plug-ins must always use the release MFC that Rhino uses.
+// Rhino plug-ins that require debugging information need to be built
+// with RHINO_DEBUG_PLUGIN defined.
+#if defined(RHINO_DEBUG_PLUGIN) && defined(_DEBUG)
+// V4 PseudoDebug plug-ins should define RHINO_DEBUG_PLUGIN,
+// but not define _DEBUG in the .vcproj file.
+#error Do not define _DEBUG - use RHINO_DEBUG_PLUGIN instead
+#endif
+
+// Rhino SDK Preamble
+#include "C:\Program Files (x86)\Rhino 5.0 x64 SDK\Inc\RhinoSdkStdafxPreamble.h"
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> // MFC OLE classes
+#include <afxodlgs.h> // MFC OLE dialog classes
+#include <afxdisp.h> // MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> // MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> // MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//
+// TODO: include additional commonly used header files here
+//
+
+#if defined(_M_X64) && defined(WIN32) && defined(WIN64)
+// The afxwin.h includes afx.h, which includes afxver_.h,
+// which unconditionally defines WIN32 This is a bug.
+// Note, all Windows builds (32 and 64 bit) define _WIN32.
+// Only 64-bit builds define _WIN64. Never define/undefine
+// _WIN32 or _WIN64. Only define EXACTLY one of WIN32 or WIN64.
+// See the MSDN "Predefined Macros" help file for details.
+#undef WIN32
+#endif
+
+// Rhino Plug-in
+#include "C:\Program Files (x86)\Rhino 5.0 x64 SDK\Inc\RhinoSdk.h"
+
+// Render Development Kit.
+#include "C:\Program Files (x86)\Rhino 5.0 x64 SDK\Inc\RhRdkHeaders.h"
+
+#if defined(RHINO_DEBUG_PLUGIN)
+// Now that all the system headers are read, we can
+// safely define _DEBUG so the developers can test
+// for _DEBUG in their code.
+#define _DEBUG
+#endif
+
+// Rhino Plug-in Linking Pragmas
+#include "C:\Program Files (x86)\Rhino 5.0 x64 SDK\Inc\rhinoSdkPlugInLinkingPragmas.h"
+
Please sign in to comment.
Something went wrong with that request. Please try again.