src/GraphicObjects/Panel.cs
src/GraphicObjects/VerticalWrappingWidget.cs
src/GraphicObjects/HorizontalWrappingWidget.cs
+MonoDevelop.Crow/build
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ReleaseVersion>0.1.*</ReleaseVersion>
+ <ReleaseVersion>0.4</ReleaseVersion>
<Description>Crow project description</Description>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Drawing" />
- <Reference Include="cairo-sharp">
- <HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\cairo-sharp.dll</HintPath>
+ <Reference Include="Mono.Cairo" />
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>glib-sharp-2.0</Package>
</Reference>
- <Reference Include="gdk-sharp">
- <HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gdk-sharp.dll</HintPath>
- </Reference>
- <Reference Include="gio-sharp">
- <HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gio-sharp.dll</HintPath>
- </Reference>
- <Reference Include="glib-sharp">
- <HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\glib-sharp.dll</HintPath>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
- <None Include="packages.config" />
</ItemGroup>
</Project>
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{74289092-9F70-4941-AFCB-DFD7BE2140B6}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.GOLib", "MonoDevelop.GOLib\MonoDevelop.GOLib.csproj", "{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Crow", "MonoDevelop.GOLib\MonoDevelop.Crow.csproj", "{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Diagram", "..\MonoDevelop.Diagram\MonoDevelop.Diagram.csproj", "{232716B4-D19D-4FD7-B310-94A98FD926F0}"
EndProject
{232716B4-D19D-4FD7-B310-94A98FD926F0}.Debug|Linux_x86.ActiveCfg = Debug|Any CPU
{232716B4-D19D-4FD7-B310-94A98FD926F0}.Release|Linux_x86.ActiveCfg = Debug|Any CPU
{350D4F49-9901-4998-9903-BCA7D48DA58C}.Debug|Linux_x86.ActiveCfg = Debug|Linux_x86
- {350D4F49-9901-4998-9903-BCA7D48DA58C}.Debug|Linux_x86.Build.0 = Debug|Linux_x86
{350D4F49-9901-4998-9903-BCA7D48DA58C}.Release|Linux_x86.ActiveCfg = Release|Linux_x86
{350D4F49-9901-4998-9903-BCA7D48DA58C}.Release|Linux_x86.Build.0 = Release|Linux_x86
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Linux_x86.ActiveCfg = Debug|Any CPU
- {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Linux_x86.Build.0 = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Linux_x86.ActiveCfg = Release|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Linux_x86.Build.0 = Release|Any CPU
{7BAE4448-E8F4-48B3-BB11-FA78E7F4506B}.Debug|Linux_x86.ActiveCfg = Debug|Any CPU
- {7BAE4448-E8F4-48B3-BB11-FA78E7F4506B}.Debug|Linux_x86.Build.0 = Debug|Any CPU
{7BAE4448-E8F4-48B3-BB11-FA78E7F4506B}.Release|Linux_x86.ActiveCfg = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Linux_x86.ActiveCfg = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Linux_x86.Build.0 = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Linux_x86.ActiveCfg = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Linux_x86.Build.0 = Release|Any CPU
{D6F98B08-56B8-405C-9212-F9D26097E35F}.Debug|Linux_x86.ActiveCfg = Debug|Linux_x86
- {D6F98B08-56B8-405C-9212-F9D26097E35F}.Debug|Linux_x86.Build.0 = Debug|Linux_x86
{D6F98B08-56B8-405C-9212-F9D26097E35F}.Release|Linux_x86.ActiveCfg = Release|Linux_x86
{D6F98B08-56B8-405C-9212-F9D26097E35F}.Release|Linux_x86.Build.0 = Release|Linux_x86
{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}.Debug|Linux_x86.ActiveCfg = Debug|Any CPU
+ {E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}.Debug|Linux_x86.Build.0 = Debug|Any CPU
{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}.Release|Linux_x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
--- /dev/null
+<ExtensionModel>
+ <Extension path = "/MonoDevelop/Ide/DisplayBindings">
+ <DisplayBinding
+ id = "Crow designer"
+ insertafter ="AssemblyBrowser"
+ class = "MonoDevelop.Crow.CrowDisplayBinding" />
+ </Extension>
+ <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
+ <NodeBuilder id = "CrowNodeExtension" class = "MonoDevelop.Crow.CrowNodeExtension"/>
+ </Extension>
+ <Extension path = "/MonoDevelop/Core/MimeTypes">
+ <MimeType id="text/x-goml" _description="GOlib interface definition" icon="md-csharp-file" isText="false">
+ <File pattern="*.goml" />
+ </MimeType>
+ <MimeType id="text/x-crow" _description="Crow interface definition" icon="md-csharp-file" isText="false">
+ <File pattern="*.crow" />
+ </MimeType>
+ </Extension>
+<!-- <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders" extension-nodes="Class">
+ <Class class = "MonoDevelop.GOLib.GOLibItemPropertyProvider"/>
+ </Extension>-->
+</ExtensionModel>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>MonoDevelop.Crow</RootNamespace>
+ <AssemblyName>MonoDevelop.Crow</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <OutputPath>build</OutputPath>
+ <CustomCommands>
+ <CustomCommands>
+ <Command type="Execute" command="/opt/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/opt/lib/monodevelop/bin">
+ <EnvironmentVariables>
+ <Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_LOGGING_PAD_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_USE_COLOUR" value="True" />
+ </EnvironmentVariables>
+ </Command>
+ </CustomCommands>
+ </CustomCommands>
+ <ReleaseVersion>0.4</ReleaseVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <CustomCommands>
+ <CustomCommands>
+ <Command type="Execute" command="/opt/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/opt/lib/monodevelop/bin">
+ <EnvironmentVariables>
+ <Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_LOGGING_PAD_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_USE_COLOUR" value="True" />
+ </EnvironmentVariables>
+ </Command>
+ </CustomCommands>
+ </CustomCommands> <OutputPath>..\MonoDevelop.Crow\build</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <CustomCommands>
+ <CustomCommands>
+ <Command type="Execute" command="/opt/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/opt/lib/monodevelop/bin">
+ <EnvironmentVariables>
+ <Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_LOGGING_PAD_LEVEL" value="UpToDebug" />
+ <Variable name="MONODEVELOP_CONSOLE_LOG_USE_COLOUR" value="True" />
+ </EnvironmentVariables>
+ </Command>
+ </CustomCommands>
+ </CustomCommands>
+ <OutputPath>..\MonoDevelop.Crow\build</OutputPath>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="ICSharpCode.NRefactory">
+ <HintPath>\opt\lib\monodevelop\bin\ICSharpCode.NRefactory.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoDevelop.Ide">
+ <HintPath>\opt\lib\monodevelop\bin\MonoDevelop.Ide.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoDevelop.Core">
+ <HintPath>\opt\lib\monodevelop\bin\MonoDevelop.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoDevelop.DesignerSupport">
+ <HintPath>\opt\lib\monodevelop\AddIns\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="MonoDevelop.SourceEditor2">
+ <HintPath>\opt\lib\monodevelop\AddIns\DisplayBindings\SourceEditor\MonoDevelop.SourceEditor2.dll</HintPath>
+ </Reference>
+ <Reference Include="Mono.TextEditor">
+ <HintPath>\opt\lib\monodevelop\bin\Mono.TextEditor.dll</HintPath>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gio-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>glib-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="Mono.Cairo" />
+ <Reference Include="Mono.Addins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <Package>mono-addins</Package>
+ </Reference>
+ <Reference Include="Xwt">
+ <HintPath>..\..\..\..\..\opt\lib\monodevelop\bin\Xwt.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\AddinInfo.cs" />
+ <Compile Include="src\CrowDisplayBinding.cs" />
+ <Compile Include="src\CrowView.cs" />
+ <Compile Include="src\CrowNodeExtension.cs" />
+ <Compile Include="src\XwtContainer.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Folder Include="src\" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="MonoDevelop.Crow.addin.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Crow.csproj">
+ <Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
+ <Name>Crow</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="src\GOLibGtkHost.cs" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
+++ /dev/null
-<ExtensionModel>
- <Extension path = "/MonoDevelop/Ide/DisplayBindings">
- <DisplayBinding
- id = "GOLib designer"
- insertafter ="AssemblyBrowser"
- class = "MonoDevelop.GOLib.GOLibDisplayBinding" />
- </Extension>
- <Extension path = "/MonoDevelop/Ide/Pads/ProjectPad">
- <NodeBuilder id = "GOLibNodeExtension" class = "MonoDevelop.GOLib.GOLibNodeExtension"/>
- </Extension>
- <Extension path = "/MonoDevelop/Core/MimeTypes">
- <MimeType id="text/x-goml" _description="GOlib interface definition" icon="md-csharp-file" isText="false">
- <File pattern="*.goml" />
- </MimeType>
- </Extension>
-<!-- <Extension path = "/MonoDevelop/DesignerSupport/PropertyProviders" extension-nodes="Class">
- <Class class = "MonoDevelop.GOLib.GOLibItemPropertyProvider"/>
- </Extension>-->
-</ExtensionModel>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E9E14DB5-3C67-4E01-B5C3-4D90D7E31A2E}</ProjectGuid>
- <OutputType>Library</OutputType>
- <RootNamespace>MonoDevelop.GOLib</RootNamespace>
- <AssemblyName>MonoDevelop.GOLib</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <OutputPath>build</OutputPath>
- <CustomCommands>
- <CustomCommands>
- <Command type="Execute" command="/usr/local/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/usr/local/lib/monodevelop/bin">
- <EnvironmentVariables>
- <Variable name="MONODEVELOP_DEV_ADDINS" value="${TargetDir}" />
- <Variable name="MONODEVELOP_CONSOLE_LOG_LEVEL" value="UpToDebug" />
- <Variable name="MONODEVELOP_LOGGING_PAD_LEVEL" value="UpToDebug" />
- <Variable name="MONODEVELOP_CONSOLE_LOG_USE_COLOUR" value="True" />
- </EnvironmentVariables>
- </Command>
- </CustomCommands>
- </CustomCommands>
- <ReleaseVersion>0.4</ReleaseVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <DefineConstants>DEBUG;</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <CustomCommands>
- <CustomCommands>
- <Command type="Execute" command="/usr/local/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/usr/local/lib/monodevelop/bin" />
- </CustomCommands>
- </CustomCommands>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>true</Optimize>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- <CustomCommands>
- <CustomCommands>
- <Command type="Execute" command="/usr/local/lib/monodevelop/bin/MonoDevelop.exe --no-redirect" workingdir="/usr/local/lib/monodevelop/bin" />
- </CustomCommands>
- </CustomCommands>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="ICSharpCode.NRefactory">
- <HintPath>\usr\local\lib\monodevelop\bin\ICSharpCode.NRefactory.dll</HintPath>
- </Reference>
- <Reference Include="Mono.Addins">
- <Package>mono-addins</Package>
- </Reference>
- <Reference Include="MonoDevelop.Ide">
- <HintPath>\usr\local\lib\monodevelop\bin\MonoDevelop.Ide.dll</HintPath>
- </Reference>
- <Reference Include="MonoDevelop.Core">
- <HintPath>\usr\local\lib\monodevelop\bin\MonoDevelop.Core.dll</HintPath>
- </Reference>
- <Reference Include="MonoDevelop.DesignerSupport">
- <HintPath>\usr\local\lib\monodevelop\AddIns\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.dll</HintPath>
- </Reference>
- <Reference Include="Mono.Cairo" />
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>gtk-sharp-2.0</Package>
- </Reference>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
- <Package>glib-sharp-2.0</Package>
- </Reference>
- <Reference Include="System.Xml" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Drawing" />
- <Reference Include="OpenTK">
- <HintPath>..\..\opentk\Binaries\OpenTK\Release\OpenTK.dll</HintPath>
- </Reference>
- <Reference Include="MonoDevelop.SourceEditor2">
- <HintPath>..\..\..\..\..\usr\local\lib\monodevelop\AddIns\DisplayBindings\SourceEditor\MonoDevelop.SourceEditor2.dll</HintPath>
- </Reference>
- <Reference Include="Mono.TextEditor">
- <HintPath>..\..\..\..\..\usr\local\lib\monodevelop\bin\Mono.TextEditor.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Properties\AddinInfo.cs" />
- <Compile Include="src\DisplayBinding.cs" />
- <Compile Include="src\GOLibView.cs" />
- <Compile Include="src\GOLibNodeExtension.cs" />
- <Compile Include="src\GOLibGtkHost.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Folder Include="src\" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="MonoDevelop.GOLib.addin.xml" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Crow.csproj">
- <Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
- <Name>Crow</Name>
- </ProjectReference>
- </ItemGroup>
-</Project>
\ No newline at end of file
using Mono.Addins;
using Mono.Addins.Description;
-[assembly:Addin ("GOLib",
+[assembly:Addin ("Crow",
Namespace = "MonoDevelop",
Version = MonoDevelop.BuildInfo.Version,
Category = "IDE extensions")]
-[assembly:AddinName ("MonoDevelop GOLib interface designer")]
+[assembly:AddinName ("MonoDevelop Crow interface designer")]
[assembly:AddinDescription ("")]
[assembly:AddinDependency ("Core", MonoDevelop.BuildInfo.Version)]
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
-[assembly: AssemblyTitle ("MonoDevelop.GOLib")]
-[assembly: AssemblyDescription ("GOLib interface designer for MonoDevelop")]
+[assembly: AssemblyTitle ("MonoDevelop.Crow")]
+[assembly: AssemblyDescription ("Crow interface designer for MonoDevelop")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
--- /dev/null
+//
+// DisplayBinding.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2015 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+//
+// DisplayBinding.cs
+//
+// Author:
+// Mike Krüger <mkrueger@novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System.IO;
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Projects;
+using System.Globalization;
+using System.Diagnostics;
+
+namespace MonoDevelop.Crow
+{
+ class CrowDisplayBinding : IViewDisplayBinding
+ {
+ bool canHandle = false;
+
+ public string Name {
+ get {
+ return GettextCatalog.GetString ("Crow designer");
+ }
+ }
+ public bool CanUseAsDefault
+ { get { return true; }}
+
+ public IViewContent CreateContent (FilePath fileName, string mimeType, Project ownerProject)
+ {
+ return new CrowView ();
+
+
+ }
+ public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
+ {
+ canHandle = mimeType.StartsWith("text/x-goml", System.StringComparison.OrdinalIgnoreCase) |
+ mimeType.StartsWith ("text/x-crow", System.StringComparison.OrdinalIgnoreCase);
+ return canHandle;
+ }
+ }
+}
--- /dev/null
+//
+// ImageViewerNodeExtension.cs
+//
+// Author:
+// Mike Krüger <mkrueger@novell.com>
+//
+// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using MonoDevelop.Projects;
+using MonoDevelop.Ide.Gui.Components;
+using MonoDevelop.Components;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Ide;
+using System.Linq;
+using MonoDevelop.DesignerSupport;
+
+namespace MonoDevelop.Crow
+{
+ enum Commands {
+ ShowGOLibViewer
+ }
+
+ class CrowNodeExtension : NodeBuilderExtension
+ {
+ public override Type CommandHandlerType {
+ get { return typeof(CrowCommandHandler); }
+ }
+ public override bool CanBuildNode (Type dataType)
+ {
+ return typeof(ProjectFile).IsAssignableFrom (dataType);
+ }
+ public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
+ {
+ ProjectFile pf = dataObject as ProjectFile;
+
+// string mimeType = DesktopService.GetMimeTypeForUri (pf.FilePath);
+// if (mimeType.StartsWith ("image/", StringComparison.CurrentCultureIgnoreCase)) {
+// Image i;
+// if (pf != null) {
+// i = Image.FromFile (pf.FilePath);
+// nodeInfo.Icon = i.Scale (16.0 / i.Width, 16.0 / i.Height);
+// }
+// }
+
+ base.BuildNode (treeBuilder, dataObject, nodeInfo);
+ }
+ }
+
+ class CrowCommandHandler: NodeCommandHandler //, IPropertyPadProvider
+ {
+ [CommandHandler (Commands.ShowGOLibViewer)]
+ protected void OnShowGOLibViewer ()
+ {
+
+ CrowView view = new CrowView ();
+
+ ProjectFile file = CurrentNode.DataItem as ProjectFile;
+
+ if (file != null)
+ view.Load (file.FilePath);
+
+
+ IdeApp.Workbench.OpenDocument (view, true);
+ //IdeApp.Workbench.Documents.Where (d => d.FileName == file.FilePath);
+ }
+
+// public override void ActivateItem ()
+// {
+// ProjectFile o = this.CurrentNode.DataItem as ProjectFile;
+//
+// Ide.Gui.Document[] doc = IdeApp.Workbench.Documents.Where (d => d.FileName == o.FilePath).ToArray();
+// var tmp = MonoDevelop.Ide.Gui.DisplayBindingService.GetFileViewers (o.FilePath, o.Project).ToList();
+//
+// OnShowGOLibViewer ();
+// }
+
+// #region IPropertyPadProvider implementation
+// public object GetActiveComponent ()
+// {
+// if (CurrentNodes.Length == 1)
+// return CurrentNode.DataItem;
+// else
+// return null;
+// }
+// public object GetProvider ()
+// {
+// return null;
+// }
+// public void OnEndEditing (object obj)
+// {
+// throw new NotImplementedException ();
+// }
+// public void OnChanged (object obj)
+// {
+//
+// }
+// #endregion
+ }
+
+// class GOLibItemPropertyProvider : IPropertyProvider
+// {
+// #region IPropertyProvider implementation
+// public object CreateProvider (object obj)
+// {
+// var projectFile = obj as ProjectFile;
+// return projectFile;
+// }
+//
+// public bool SupportsObject (object obj)
+// {
+// return obj is ProjectFile;
+// }
+// #endregion
+// }
+}
+
--- /dev/null
+//
+// ImageViewer.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2015 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+//
+// HexEditorView.cs
+//
+// Author:
+// Mike Krüger <mkrueger@novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.IO;
+using Crow;
+using MonoDevelop.DesignerSupport;
+using MonoDevelop.SourceEditor;
+
+namespace MonoDevelop.Crow
+{
+ class CustomVPaned : Gtk.VPaned, IPropertyPadProvider
+ {
+ #region IPropertyPadProvider implementation
+ public object GetActiveComponent ()
+ {
+ return this.Child1 == null ? this as object: (this.Child1 as XwtContainer).CrowInterface.activeWidget as object;
+ }
+ public object GetProvider ()
+ {
+ return null;
+ //throw new NotImplementedException ();
+ }
+ public void OnEndEditing (object obj)
+ {
+ //throw new NotImplementedException ();
+ }
+ public void OnChanged (object obj)
+ {
+ //throw new NotImplementedException ();
+ }
+ #endregion
+
+ }
+ class CrowView : SourceEditorView
+ {
+ XwtContainer gtkCrowHost;
+ CustomVPaned gtkCrowWidget;
+
+
+ double zoom = 1.0;
+
+ public override Gtk.Widget Control {
+ get {
+ return gtkCrowWidget;
+ }
+ }
+
+ public CrowView () : base()
+ {
+ gtkCrowHost = new XwtContainer ();
+ gtkCrowWidget = new CustomVPaned ();
+ gtkCrowWidget.CanFocus = true;
+ gtkCrowWidget.Name = "vpaned1";
+ gtkCrowWidget.Add (gtkCrowHost);
+ gtkCrowWidget.Add (base.Control);
+ gtkCrowWidget.SizeAllocated += GtkGOMLWidget_SizeAllocated;
+
+ this.Document.DocumentUpdated += Document_DocumentUpdated;
+ //this.DirtyChanged += GOLibView_DirtyChanged;
+ }
+
+ void Document_DocumentUpdated (object sender, EventArgs e)
+ {
+ reloadGOML ();
+ }
+
+ void GOLibView_DirtyChanged (object sender, EventArgs e)
+ {
+
+ }
+
+ void reloadGOML()
+ {
+ using (MemoryStream stream = new MemoryStream ()) {
+ using (StreamWriter writer = new StreamWriter (stream)) {
+ writer.Write (this.Document.Text);
+ writer.Flush ();
+
+ stream.Position = 0;
+ gtkCrowHost.CrowInterface.LoadInterface (stream);
+ }
+ }
+ }
+
+ void GtkGOMLWidget_SizeAllocated (object o, Gtk.SizeAllocatedArgs args)
+ {
+ gtkCrowHost.SetSizeRequest (-1, args.Allocation.Height / 2);
+ }
+
+ public override void Load (string fileName)
+ {
+ gtkCrowHost.CrowInterface.LoadInterface (fileName);
+ //ContentName = fileName;
+ //this.IsDirty = false;
+ gtkCrowWidget.ShowAll ();
+ gtkCrowWidget.Show ();
+
+ base.Load (fileName);
+ }
+// public override bool CanReuseView (string fileName)
+// {
+// return base.CanReuseView (fileName);
+// }
+// public override void RedrawContent ()
+// {
+// base.RedrawContent ();
+// }
+
+ }
+}
+++ /dev/null
-//
-// DisplayBinding.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2015 jp
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-//
-// DisplayBinding.cs
-//
-// Author:
-// Mike Krüger <mkrueger@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System.IO;
-using MonoDevelop.Core;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Projects;
-using System.Globalization;
-using System.Diagnostics;
-
-namespace MonoDevelop.GOLib
-{
- class GOLibDisplayBinding : IViewDisplayBinding
- {
- bool canHandle = false;
-
- public string Name {
- get {
- return GettextCatalog.GetString ("GOLib designer");
- }
- }
- public bool CanUseAsDefault
- { get { return true; }}
-
- public IViewContent CreateContent (FilePath fileName, string mimeType, Project ownerProject)
- {
- return new GOLibView ();
-
-
- }
- public bool CanHandle (FilePath fileName, string mimeType, Project ownerProject)
- {
- canHandle = mimeType.StartsWith("text/x-goml");
- return canHandle;
- }
- }
-}
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.IO;
using System.Linq;
using Crow;
+using MonoDevelop.Components.Commands;
using MonoDevelop.Core;
+using MonoDevelop.DesignerSupport;
using MonoDevelop.Ide;
using MonoDevelop.Projects;
-using System.Diagnostics;
using OpenTK.Input;
-using MonoDevelop.DesignerSupport;
-using System.IO;
-using MonoDevelop.Components.Commands;
-namespace MonoDevelop.GOLib
+namespace MonoDevelop.Crow
{
- public class GOLibGtkHost : Gtk.DrawingArea, ILayoutable, IGOLibHost, IPropertyPadProvider,ICommandDelegator
+ public class GOLibGtkHost : Gtk.DrawingArea, IPropertyPadProvider,ICommandDelegator
{
#region ICommandDelegator implementation
+++ /dev/null
-//
-// ImageViewerNodeExtension.cs
-//
-// Author:
-// Mike Krüger <mkrueger@novell.com>
-//
-// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using MonoDevelop.Projects;
-using MonoDevelop.Ide.Gui.Components;
-using MonoDevelop.Components;
-using MonoDevelop.Components.Commands;
-using MonoDevelop.Ide;
-using System.Linq;
-using MonoDevelop.DesignerSupport;
-
-namespace MonoDevelop.GOLib
-{
- enum Commands {
- ShowGOLibViewer
- }
-
- class GOLibNodeExtension : NodeBuilderExtension
- {
- public override Type CommandHandlerType {
- get { return typeof(GOLibCommandHandler); }
- }
- public override bool CanBuildNode (Type dataType)
- {
- return typeof(ProjectFile).IsAssignableFrom (dataType);
- }
- public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
- {
- ProjectFile pf = dataObject as ProjectFile;
-
-// string mimeType = DesktopService.GetMimeTypeForUri (pf.FilePath);
-// if (mimeType.StartsWith ("image/", StringComparison.CurrentCultureIgnoreCase)) {
-// Image i;
-// if (pf != null) {
-// i = Image.FromFile (pf.FilePath);
-// nodeInfo.Icon = i.Scale (16.0 / i.Width, 16.0 / i.Height);
-// }
-// }
-
- base.BuildNode (treeBuilder, dataObject, nodeInfo);
- }
- }
-
- class GOLibCommandHandler: NodeCommandHandler //, IPropertyPadProvider
- {
- [CommandHandler (Commands.ShowGOLibViewer)]
- protected void OnShowGOLibViewer ()
- {
-
- GOLibView view = new GOLibView ();
-
- ProjectFile file = CurrentNode.DataItem as ProjectFile;
-
- if (file != null)
- view.Load (file.FilePath);
-
-
- IdeApp.Workbench.OpenDocument (view, true);
- //IdeApp.Workbench.Documents.Where (d => d.FileName == file.FilePath);
- }
-
-// public override void ActivateItem ()
-// {
-// ProjectFile o = this.CurrentNode.DataItem as ProjectFile;
-//
-// Ide.Gui.Document[] doc = IdeApp.Workbench.Documents.Where (d => d.FileName == o.FilePath).ToArray();
-// var tmp = MonoDevelop.Ide.Gui.DisplayBindingService.GetFileViewers (o.FilePath, o.Project).ToList();
-//
-// OnShowGOLibViewer ();
-// }
-
-// #region IPropertyPadProvider implementation
-// public object GetActiveComponent ()
-// {
-// if (CurrentNodes.Length == 1)
-// return CurrentNode.DataItem;
-// else
-// return null;
-// }
-// public object GetProvider ()
-// {
-// return null;
-// }
-// public void OnEndEditing (object obj)
-// {
-// throw new NotImplementedException ();
-// }
-// public void OnChanged (object obj)
-// {
-//
-// }
-// #endregion
- }
-
-// class GOLibItemPropertyProvider : IPropertyProvider
-// {
-// #region IPropertyProvider implementation
-// public object CreateProvider (object obj)
-// {
-// var projectFile = obj as ProjectFile;
-// return projectFile;
-// }
-//
-// public bool SupportsObject (object obj)
-// {
-// return obj is ProjectFile;
-// }
-// #endregion
-// }
-}
-
+++ /dev/null
-//
-// ImageViewer.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2015 jp
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-//
-// HexEditorView.cs
-//
-// Author:
-// Mike Krüger <mkrueger@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// 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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.IO;
-using MonoDevelop.Ide.Gui;
-using MonoDevelop.Ide.Gui.Content;
-using MonoDevelop.Ide.Fonts;
-using Mono.Addins;
-using MonoDevelop.Core;
-using MonoDevelop.Ide;
-using Crow;
-using MonoDevelop.DesignerSupport;
-using MonoDevelop.SourceEditor;
-
-namespace MonoDevelop.GOLib
-{
- class CustomVPaned : Gtk.VPaned, IPropertyPadProvider
- {
- #region IPropertyPadProvider implementation
- public object GetActiveComponent ()
- {
- return this.Child1 == null ? this as object: (this.Child1 as GOLibGtkHost).activeWidget as object;
- }
- public object GetProvider ()
- {
- return null;
- //throw new NotImplementedException ();
- }
- public void OnEndEditing (object obj)
- {
- //throw new NotImplementedException ();
- }
- public void OnChanged (object obj)
- {
- //throw new NotImplementedException ();
- }
- #endregion
-
- }
- class GOLibView : SourceEditorView
- {
- GOLibGtkHost gtkGoWidgetHost;
- CustomVPaned gtkGOMLWidget;
-
-
- double zoom = 1.0;
-
- public override Gtk.Widget Control {
- get {
- return gtkGOMLWidget;
- }
- }
-
- public GOLibView () : base()
- {
- gtkGoWidgetHost = new GOLibGtkHost ();
- gtkGOMLWidget = new CustomVPaned ();
- gtkGOMLWidget.CanFocus = true;
- gtkGOMLWidget.Name = "vpaned1";
- gtkGOMLWidget.Add (gtkGoWidgetHost);
- gtkGOMLWidget.Add (base.Control);
- gtkGOMLWidget.SizeAllocated += GtkGOMLWidget_SizeAllocated;
-
- this.Document.DocumentUpdated += Document_DocumentUpdated;
- //this.DirtyChanged += GOLibView_DirtyChanged;
- }
-
- void Document_DocumentUpdated (object sender, EventArgs e)
- {
- reloadGOML ();
- }
-
- void GOLibView_DirtyChanged (object sender, EventArgs e)
- {
-
- }
-
- void reloadGOML()
- {
- using (MemoryStream stream = new MemoryStream ()) {
- using (StreamWriter writer = new StreamWriter (stream)) {
- writer.Write (this.Document.Text);
- writer.Flush ();
-
- stream.Position = 0;
- gtkGoWidgetHost.Load (stream);
- }
- }
- }
-
- void GtkGOMLWidget_SizeAllocated (object o, Gtk.SizeAllocatedArgs args)
- {
- gtkGoWidgetHost.SetSizeRequest (-1, args.Allocation.Height / 2);
- }
-
- public override void Load (string fileName)
- {
- gtkGoWidgetHost.Load (fileName);
- //ContentName = fileName;
- //this.IsDirty = false;
- gtkGOMLWidget.ShowAll ();
- gtkGOMLWidget.Show ();
-
- base.Load (fileName);
- }
-// public override bool CanReuseView (string fileName)
-// {
-// return base.CanReuseView (fileName);
-// }
-// public override void RedrawContent ()
-// {
-// base.RedrawContent ();
-// }
-
- }
-}
--- /dev/null
+//
+// OpenTKGameWindow.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2016 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Threading;
+using System.Xml;
+using Cairo;
+using Crow;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Core;
+using MonoDevelop.DesignerSupport;
+using MonoDevelop.Ide;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.Crow
+{
+ public class XwtContainer : Xwt.Canvas, IPropertyPadProvider,ICommandDelegator
+ {
+ public Interface CrowInterface;
+
+ #region ICommandDelegator implementation
+
+ public object GetDelegatedCommandTarget ()
+ {
+ return CrowInterface.hoverWidget;
+ }
+
+ #endregion
+
+ #region IPropertyPadProvider implementation
+
+ public object GetActiveComponent ()
+ {
+ return CrowInterface.activeWidget;
+ }
+ public object GetProvider ()
+ {
+ return CrowInterface.activeWidget;
+ }
+ public void OnEndEditing (object obj)
+ {
+
+ }
+ public void OnChanged (object obj)
+ {
+ (obj as GraphicObject).RegisterForGraphicUpdate ();
+ QueueDraw ();
+ }
+ #endregion
+
+ #region ctor
+ public XwtContainer() : this(0,0,"test"){}
+ public XwtContainer(int _width, int _height, string _title="Crow")
+ : base()
+ {
+ CrowInterface = new Interface ();
+ CrowInterface.Quit += Quit;
+
+
+ //this.OverrideBackgroundColor (Gtk.StateFlags.Normal, Gdk.RGBA.Zero);
+ //this.Visual = Gdk.Global.DefaultRootWindow.Screen.RgbaVisual;
+
+ this.ButtonPressEvent += OpenTKGameWindow_ButtonPressEvent;
+ this.ButtonReleaseEvent += OpenTKGameWindow_ButtonReleaseEvent;
+ this.MotionNotifyEvent += OpenTKGameWindow_MotionNotifyEvent;
+ this.KeyPressEvent += OpenTKGameWindow_KeyPressEvent;
+ this.SizeAllocated += OpenTKGameWindow_SizeAllocated;
+
+ this.Show ();
+
+ //GLib.Idle.Add (new GLib.IdleHandler (idleHandler));
+ GLib.Timeout.Add (10, new GLib.TimeoutHandler (updateHandler));
+ }
+ #endregion
+
+
+
+ #region Timers
+ bool updateHandler(){
+ CrowInterface.Update();
+ return true;
+ }
+ bool idleHandler(){
+ if (CrowInterface.IsDirty) {
+ QueueDrawArea (CrowInterface.DirtyRect.X, CrowInterface.DirtyRect.Y, CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height);
+ return false;
+ }
+ return true;
+ }
+ #endregion
+
+ protected void Quit (object sender, EventArgs e)
+ {
+ Gtk.Application.Quit ();
+ }
+
+ static double[] dashed = {2.0};
+ protected override void OnDraw (Xwt.Drawing.Context ctx, Xwt.Rectangle dirtyRect)
+ {
+ base.OnDraw (ctx, dirtyRect);
+ if (CrowInterface.IsDirty) {
+ using (MemoryStream ms = new MemoryStream (CrowInterface.dirtyBmp)) {
+ //Xwt.Drawing.ImageBuilder im = new Xwt.Drawing.ImageBuilder(CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height);
+ //bmp.
+ using (Xwt.Drawing.Image img = Xwt.Drawing.BitmapImage.FromStream (ms)) {
+ img.WithSize (CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height);
+ ctx.DrawImage (img, CrowInterface.DirtyRect.X, CrowInterface.DirtyRect.Y);
+ ctx.Fill ();
+ }
+ }
+ CrowInterface.IsDirty = false;
+ GLib.Idle.Add (new GLib.IdleHandler (idleHandler));
+ return;
+ }
+ if (CrowInterface.bmp != null) {
+ using (ImageSurface img = new ImageSurface (CrowInterface.bmp, Format.Argb32, CrowInterface.ClientRectangle.Width, CrowInterface.ClientRectangle.Height, 4 * CrowInterface.ClientRectangle.Width)) {
+ cr.SetSourceSurface (img, CrowInterface.ClientRectangle.X, CrowInterface.ClientRectangle.Y);
+ cr.Paint ();
+ }
+ }
+ if (CrowInterface.hoverWidget != null) {
+ cr.Rectangle (CrowInterface.hoverWidget.ScreenCoordinates (
+ CrowInterface.hoverWidget.getSlot ()));
+ cr.LineWidth = 1;
+ cr.SetDash (dashed, 0);
+ //cr.Color = Crow.Color.Yellow;
+ cr.Stroke ();
+ }
+
+ }
+ void Win_DeleteEvent (object o, Gtk.DeleteEventArgs args)
+ {
+ Gtk.Application.Quit ();
+ }
+ void OpenTKGameWindow_SizeAllocated (object o, Gtk.SizeAllocatedArgs args)
+ {
+ CrowInterface.ProcessResize (new Rectangle (args.Allocation.X, args.Allocation.Y, args.Allocation.Width, args.Allocation.Height));
+ }
+ void OpenTKGameWindow_MotionNotifyEvent (object o, Gtk.MotionNotifyEventArgs args)
+ {
+ CrowInterface.ProcessMouseMove ((int)args.Event.X, (int)args.Event.Y);
+ }
+
+ void OpenTKGameWindow_ButtonReleaseEvent (object o, Gtk.ButtonReleaseEventArgs args)
+ {
+ CrowInterface.ProcessMouseButtonUp ((int)args.Event.Button - 1);
+ }
+ void OpenTKGameWindow_ButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
+ {
+ CrowInterface.ProcessMouseButtonDown ((int)args.Event.Button - 1);
+ }
+
+// void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs otk_e)
+// {
+// MouseWheelEventArgs e = new MouseWheelEventArgs (otk_e.X, otk_e.Y, otk_e.Value, otk_e.Delta);
+// MouseState ms = e.Mouse;
+// update_mouseButtonStates (ref ms, otk_e.Mouse);
+// e.Mouse = ms;
+//
+// if (hoverWidget == null) {
+// MouseWheelChanged.Raise (this, otk_e);
+// return;
+// }
+// hoverWidget.onMouseWheel (this, e);
+// }
+
+
+
+ #region keyboard Handling
+// KeyboardState Keyboad = new KeyboardState ();
+// void Keyboard_KeyDown(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
+// {
+//// if (_focusedWidget == null) {
+// KeyboardKeyDown.Raise (this, otk_e);
+//// return;
+//// }
+// Keyboad.SetKeyState ((Crow.Key)otk_e.Key, true);
+// KeyboardKeyEventArgs e = new KeyboardKeyEventArgs((Crow.Key)otk_e.Key, otk_e.IsRepeat,Keyboad);
+// _focusedWidget.onKeyDown (sender, e);
+// }
+ void OpenTKGameWindow_KeyPressEvent (object o, Gtk.KeyPressEventArgs args)
+ {
+
+ }
+
+ #endregion
+ }
+}
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
+ <ReleaseVersion>0.4</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Linux_x86' ">
<DebugSymbols>true</DebugSymbols>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="gtk-sharp.Linux.3.14" version="3.14.7" targetFramework="net45" />
-</packages>
\ No newline at end of file
return tmp;
}
}
-
+ public GraphicObject LoadInterface (Stream stream)
+ {
+ lock (UpdateMutex) {
+ GraphicObject tmp = Interface.Load (stream,
+ Interface.GetTopContainerOfGOMLStream(stream), this);
+ AddWidget (tmp);
+ return tmp;
+ }
+ }
#endregion
#if MEASURE_TIME