From: Jean-Philippe Bruyère Date: Tue, 13 Feb 2018 05:53:18 +0000 (+0100) Subject: CrowIDE, ObservableList, include Crow.Coding X-Git-Tag: 0.7.0~21 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=01cdc32b1ccc12743b06c306aa3d931c6f322d67;p=jp%2Fcrow.git CrowIDE, ObservableList, include Crow.Coding --- diff --git a/Crow.csproj b/Crow.csproj index a8b47dc8..4de640dd 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -30,12 +30,14 @@ true full true - DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0 + DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING;DEBUG_CLIP_RECTANGLE0 false + $(SolutionDir)build\Debug true __linux__ + $(SolutionDir)build\Release @@ -213,6 +215,10 @@ + + + + diff --git a/Crow.sln b/Crow.sln index 5fc9079f..61aaa3af 100644 --- a/Crow.sln +++ b/Crow.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE", "CrowIDE\CrowIDE.csproj", "{B6D911CD-1D09-42FC-B300-9187190F2AE1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Coding", "..\gts\CrowEdit\Crow.Coding\Crow.Coding.csproj", "{78842EE4-8A2F-4C75-AEC6-C95F15AD3994}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -22,32 +24,46 @@ Global {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.Build.0 = Release|Any CPU {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.Build.0 = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU + {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.StandardHeader = $1 $1.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) 2013-2017 Jean-Philippe Bruyère\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE. - $1.IncludeInNewFiles = True $0.DotNetNamingPolicy = $2 - $2.DirectoryNamespaceAssociation = None - $2.ResourceNamePolicy = FileFormatDefault $0.TextStylePolicy = $3 - $3.FileWidth = 120 - $3.TabsToSpaces = False $3.EolMarker = Unix - $3.inheritsSet = VisualStudio - $3.inheritsScope = text/plain $3.scope = text/x-csharp $0.CSharpFormattingPolicy = $4 $4.AfterDelegateDeclarationParameterComma = True - $4.inheritsSet = Mono - $4.inheritsScope = text/x-csharp $4.scope = text/x-csharp + $4.IndentSwitchSection = False + $4.NewLinesForBracesInProperties = False + $4.NewLinesForBracesInAccessors = False + $4.NewLinesForBracesInAnonymousMethods = False + $4.NewLinesForBracesInControlBlocks = False + $4.NewLinesForBracesInAnonymousTypes = False + $4.NewLinesForBracesInObjectCollectionArrayInitializers = False + $4.NewLinesForBracesInLambdaExpressionBody = False + $4.NewLineForElse = False + $4.NewLineForCatch = False + $4.NewLineForFinally = False + $4.NewLineForMembersInObjectInit = False + $4.NewLineForMembersInAnonymousTypes = False + $4.NewLineForClausesInQuery = False + $4.SpacingAfterMethodDeclarationName = True + $4.SpaceAfterMethodCallName = True + $4.SpaceBeforeOpenSquareBracket = True $0.VersionControlPolicy = $5 $5.CommitMessageStyle = $6 $6.Indent = @\t @@ -55,7 +71,6 @@ Global $6.LastFilePostfix = "@:\n " $6.LineAlign = 0 $6.Wrap = False - $5.inheritsSet = Mono description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n version = 0.5 EndGlobalSection diff --git a/CrowIDE/CrowIDE.csproj b/CrowIDE/CrowIDE.csproj index 6dc82f3f..8caa22a3 100644 --- a/CrowIDE/CrowIDE.csproj +++ b/CrowIDE/CrowIDE.csproj @@ -52,6 +52,12 @@ %24{SolutionDir}\build\%24{ProjectConfigName} false + + Program + %24{TargetName} + %24{SolutionDir}\build\%24{ProjectConfigName} + false + @@ -67,6 +73,10 @@ {C2980F9B-4798-4C05-99E2-E174810F7C7B} Crow + + {78842EE4-8A2F-4C75-AEC6-C95F15AD3994} + Crow.Coding + @@ -94,6 +104,9 @@ src\InterfaceControler.cs + + + @@ -101,7 +114,6 @@ - @@ -121,10 +133,44 @@ + + CrowIDE.EditPane.template + + + + + + + + + + + + + + + + Crow.TabItem.template + PreserveNewest + + + + + + + + + + + + + + + diff --git a/CrowIDE/src/CrowIDE.cs b/CrowIDE/src/CrowIDE.cs index 315f148a..fda596b3 100644 --- a/CrowIDE/src/CrowIDE.cs +++ b/CrowIDE/src/CrowIDE.cs @@ -31,91 +31,48 @@ using System.IO; using Crow.IML; using System.Xml; using System.Linq; +using Crow.Coding; namespace CrowIDE { - public enum ItemType { - ReferenceGroup, - Reference, - ProjectReference, - VirtualGroup, - Folder, - None, - Compile, - EmbeddedResource, - } - - public class ProjectNode { - ItemType type; - string name; - - public Project Project; - - List childNodes = new List(); - - public virtual ItemType Type { - get { return type; } - } - public virtual string DisplayName { - get { return name; } - } - public List ChildNodes { - get { return childNodes; } - } - - public void SortChilds () { - foreach (ProjectNode pn in childNodes) - pn.SortChilds (); - childNodes = childNodes.OrderBy(c=>c.Type).ThenBy(cn=>cn.DisplayName).ToList(); - } + class CrowIDE : CrowWindow + { + public Command CMDNew, CMDOpen, CMDSave, CMDSaveAs, CMDQuit, + CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp, + CMDAbout, CMDOptions, + CMDViewGTExp, CMDViewProps, CMDViewProj, CMDViewProjProps, + CMDCompile; + + void initCommands () { + CMDNew = new Command(new Action(() => newFile())) { Caption = "New", Icon = new SvgPicture("#CrowIDE.ui.icons.blank-file.svg"), CanExecute = false}; + CMDOpen = new Command(new Action(() => openFileDialog())) { Caption = "Open...", Icon = new SvgPicture("#CrowIDE.ui.icons.outbox.svg")}; + CMDSave = new Command(new Action(() => saveFileDialog())) { Caption = "Save", Icon = new SvgPicture("#CrowIDE.ui.icons.inbox.svg"), CanExecute = false}; + CMDSaveAs = new Command(new Action(() => saveFileDialog())) { Caption = "Save As...", Icon = new SvgPicture("#CrowIDE.ui.icons.inbox.svg"), CanExecute = false}; + CMDQuit = new Command(new Action(() => Quit (null, null))) { Caption = "Quit", Icon = new SvgPicture("#CrowIDE.ui.icons.sign-out.svg")}; + CMDUndo = new Command(new Action(() => undo())) { Caption = "Undo", Icon = new SvgPicture("#CrowIDE.ui.icons.reply.svg"), CanExecute = false}; + CMDRedo = new Command(new Action(() => redo())) { Caption = "Redo", Icon = new SvgPicture("#CrowIDE.ui.icons.share-arrow.svg"), CanExecute = false}; + CMDCut = new Command(new Action(() => Quit (null, null))) { Caption = "Cut", Icon = new SvgPicture("#CrowIDE.ui.icons.scissors.svg"), CanExecute = false}; + CMDCopy = new Command(new Action(() => Quit (null, null))) { Caption = "Copy", Icon = new SvgPicture("#CrowIDE.ui.icons.copy-file.svg"), CanExecute = false}; + CMDPaste = new Command(new Action(() => Quit (null, null))) { Caption = "Paste", Icon = new SvgPicture("#CrowIDE.ui.icons.paste-on-document.svg"), CanExecute = false}; + CMDHelp = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("help"))) { Caption = "Help", Icon = new SvgPicture("#CrowIDE.ui.icons.question.svg")}; + CMDOptions = new Command(new Action(() => openOptionsDialog())) { Caption = "Editor Options", Icon = new SvgPicture("#CrowIDE.ui.icons.tools.svg")}; - #region CTOR - public ProjectNode (Project project, ItemType _type, string _name) : this(project){ - type = _type; - name = _name; - } - public ProjectNode (Project project){ - Project = project; - } - #endregion - } - public class ProjectItem : ProjectNode { - public XmlNode node; - public string Path { - get { - return node.Attributes["Include"]?.Value.Replace('\\','/'); - } - } - public override ItemType Type { - get { - return (ItemType)Enum.Parse (typeof(ItemType), node.Name, true); - } - } - public override string DisplayName { - get { - return Type == ItemType.Reference ? - Path : - Path.Split ('\\', '/').LastOrDefault(); - } + CMDViewGTExp = new Command(new Action(() => loadWindow ("#CrowIDE.ui.GTreeExplorer.crow"))) { Caption = "Graphic Tree Explorer"}; + CMDViewProps = new Command(new Action(() => loadWindow ("#CrowIDE.ui.MemberView.crow"))) { Caption = "Properties View"}; + CMDCompile = new Command(new Action(() => compileSolution())) { Caption = "Compile"}; + CMDViewProj = new Command(new Action(() => loadWindow ("#CrowIDE.ui.CSProjExplorer.crow"))) { Caption = "Project Explorer"}; + CMDViewProjProps = new Command(new Action(loadProjProps) ){ Caption = "Project Properties"}; } - public ProjectItem (Project project, XmlNode _node) : base (project){ - node = _node; + void openFileDialog () { + AddWidget (instFileDlg.CreateInstance(CurrentInterface)).DataSource = this; } - } - + void openOptionsDialog(){} + void newFile() {} + void saveFileDialog() {} + void undo() {} + void redo() {} - class CrowIDE : CrowWindow - { - public Command CMDSave = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("Save"))) { Caption = "Save", Icon = new SvgPicture("#Crow.Icons.open-file.svg")}; -// public Command CMDSave = new Command(actionOpenFile) { Caption = "Open...", Icon = new SvgPicture("#Crow.Icons.open-file.svg")}; -// public Command CMDQuit = new Command(actionOpenFile) { Caption = "Open...", Icon = new SvgPicture("#Crow.Icons.open-file.svg")}; - public Command CMDCut = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("Cut"))) { Caption = "Cut", Icon = new SvgPicture("#Crow.Icons.scissors.svg")}; - public Command CMDCopy = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("Copy"))) { Caption = "Copy", Icon = new SvgPicture("#Crow.Icons.copy-file.svg")}; - public Command CMDPaste = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("Paste"))) { Caption = "Paste", Icon = new SvgPicture("#Crow.Icons.paste-on-document.svg")}; - public Command CMDHelp = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("Help"))) { Caption = "Help", Icon = new SvgPicture("#Crow.Icons.question.svg")}; - - public Command CMDLoad, CMDQuit, CMDViewGTExp, CMDViewProps, CMDViewProj, CMDViewProjProps; [STAThread] static void Main () @@ -129,44 +86,43 @@ namespace CrowIDE { } ImlVisualEditor imlVE; + SourceEditor srcEditor; Instantiator instFileDlg; Solution currentSolution; - Project currentProject; - TreeView tv; - - public IList Projects { get {return null;}} protected override void OnLoad (EventArgs e) { base.OnLoad (e); - ReopenLastSolution = true; - instFileDlg = Instantiator.CreateFromImlFragment (""); - CMDLoad = new Command(new Action(()=>openFileDialog())) { Caption = "Open", Icon = new SvgPicture("#Crow.Icons.open-file.svg")}; - CMDQuit = new Command(new Action(() => Quit (null, null))) { Caption = "Quit", Icon = new SvgPicture("#Crow.Icons.exit-symbol.svg")}; - CMDViewGTExp = new Command(new Action(() => loadWindow ("#CrowIDE.ui.GTreeExplorer.crow"))) { Caption = "Graphic Tree Explorer"}; - CMDViewProps = new Command(new Action(() => loadWindow ("#CrowIDE.ui.MemberView.crow"))) { Caption = "Properties View"}; - CMDViewProj = new Command(new Action(() => loadWindow ("#CrowIDE.ui.CSProjExplorer.crow"))) { Caption = "Project Explorer"}; - CMDViewProjProps = new Command(new Action(loadProjProps) ){ Caption = "Project Properties"}; + initCommands (); + this.KeyDown += CrowIDE_KeyDown; //this.CrowInterface.LoadInterface ("#CrowIDE.ui.imlEditor.crow").DataSource = this; //GraphicObject go = this.CrowInterface.LoadInterface (@"ui/test.crow"); - GraphicObject go = CurrentInterface.AddWidget (@"#CrowIDE.ui.imlEditor.crow"); + GraphicObject go = AddWidget (@"#CrowIDE.ui.CrowIDE.crow"); imlVE = go.FindByName ("crowContainer") as ImlVisualEditor; - go.DataSource = this; - if (ReopenLastSolution && !string.IsNullOrEmpty(LastOpenSolution)) CurrentSolution = Solution.LoadSolution (LastOpenSolution); + + go.DataSource = this; + } void loadProjProps () { - loadWindow ("#CrowIDE.ui.ProjectProperties.crow", currentProject); + //loadWindow ("#CrowIDE.ui.ProjectProperties.crow", currentProject); + } + void compileSolution () { + //ProjectItem pi = CurrentSolution.SelectedItem; + Project p = CurrentSolution?.Projects[1]; + if (p == null) + return; + p.Compile (); } public string CurrentDirectory { @@ -176,7 +132,7 @@ namespace CrowIDE } } public Solution CurrentSolution { - get { return CurrentSolution; } + get { return currentSolution; } set { if (currentSolution == value) return; @@ -184,12 +140,7 @@ namespace CrowIDE NotifyValueChanged ("CurrentSolution", currentSolution); } } - public string LastOpenProject { - get { return Crow.Configuration.Get("LastOpenProject");} - set { - Crow.Configuration.Set ("LastOpenProject", value); - } - } + public string LastOpenSolution { get { return Crow.Configuration.Get("LastOpenSolution");} set { @@ -208,9 +159,6 @@ namespace CrowIDE NotifyValueChanged ("ReopenLastSolution", value); } } - void openFileDialog () { - AddWidget (instFileDlg.CreateInstance(CurrentInterface)).DataSource = this; - } public void onFileOpen (object sender, EventArgs e) { diff --git a/CrowIDE/src/DesignInterface.cs b/CrowIDE/src/DesignInterface.cs new file mode 100644 index 00000000..ae104feb --- /dev/null +++ b/CrowIDE/src/DesignInterface.cs @@ -0,0 +1,138 @@ +// +// DesignInterface.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2013-2017 Jean-Philippe Bruyère +// +// 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 Crow; +using System.Globalization; + +namespace CrowIDE +{ + public class DesignInterface : Interface, IValueChange + { + #region IValueChange implementation + /// + /// Raise to notify that the value of a property has changed, the binding system + /// rely mainly on this event. the member name may not be present in the class, this is + /// used in **propertyless** bindings, this allow to raise custom named events without needing + /// to create an new one in the class or a new property. + /// + public event EventHandler ValueChanged; + /// + /// Helper function to raise the value changed event + /// + public virtual void NotifyValueChanged(string MemberName, object _value) + { + //Debug.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value); + ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value)); + } + #endregion + public DesignInterface () + { + CurrentInterface = this; + CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.InvariantCulture; + } + + public override bool ProcessMouseMove (int x, int y) + { + int deltaX = x - Mouse.X; + int deltaY = y - Mouse.Y; + Mouse.X = x; + Mouse.Y = y; + MouseMoveEventArgs e = new MouseMoveEventArgs (x, y, deltaX, deltaY); + e.Mouse = Mouse; + + if (ActiveWidget != null) { + //TODO, ensure object is still in the graphic tree + //send move evt even if mouse move outside bounds + ActiveWidget.onMouseMove (this, e); + if (!ActiveWidget.IsDragged)//if active is dragged, process mouse move as it was not visible. + return true; + } + + if (HoverWidget != null) { + + //check topmost graphicobject first + GraphicObject tmp = HoverWidget; + GraphicObject topc = null; + while (tmp is GraphicObject) { + topc = tmp; + tmp = tmp.LogicalParent as GraphicObject; + } + int idxhw = GraphicTree.IndexOf (topc); + if (idxhw != 0) { + int i = 0; + while (i < idxhw) { + if (GraphicTree [i].localLogicalParentIsNull) { + if (GraphicTree [i].MouseIsIn (e.Position)) { + while (HoverWidget != null) { + HoverWidget.onMouseLeave (HoverWidget, e); + HoverWidget = HoverWidget.LogicalParent as GraphicObject; + } + + GraphicTree [i].checkHoverWidget (e); + return true; + } + } + i++; + } + } + + if (HoverWidget.MouseIsIn (e.Position)) { + if (!(HoverWidget is TemplatedControl)) + HoverWidget.checkHoverWidget (e); + return true; + } else { + HoverWidget.onMouseLeave (HoverWidget, e); + //seek upward from last focused graph obj's + while (HoverWidget.LogicalParent as GraphicObject != null) { + HoverWidget = HoverWidget.LogicalParent as GraphicObject; + if (HoverWidget.MouseIsIn (e.Position)) { + HoverWidget.checkHoverWidget (e); + return true; + } else + HoverWidget.onMouseLeave (HoverWidget, e); + } + } + } + + //top level graphic obj's parsing + lock (GraphicTree) { + for (int i = 0; i < GraphicTree.Count; i++) { + GraphicObject g = GraphicTree [i]; + if (g.MouseIsIn (e.Position)) { + if (!(HoverWidget is TemplatedControl)) + g.checkHoverWidget (e); + if (g is Window) + PutOnTop (g); + return true; + } + } + } + HoverWidget = null; + return false; + } + } +} + diff --git a/CrowIDE/src/EditPane.cs b/CrowIDE/src/EditPane.cs new file mode 100644 index 00000000..a1103909 --- /dev/null +++ b/CrowIDE/src/EditPane.cs @@ -0,0 +1,57 @@ +// +// EditPane.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2013-2017 Jean-Philippe Bruyère +// +// 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 Crow; +using System.Linq; + +namespace CrowIDE +{ + public class EditPane : TemplatedGroup + { + public EditPane () : base() + { + } + public override object SelectedItem { + get { return base.SelectedItem; } + set { + base.SelectedItem = value; + //Items.FirstOrDefault (i=>i.DataSource == value). + } + } + object selectedItemElement = null; + + public object SelectedItemElement { + get { return selectedItemElement; } + set { + if (selectedItemElement == value) + return; + selectedItemElement = value; + NotifyValueChanged ("SelectedItemElement", selectedItemElement); + } + } + } +} + diff --git a/CrowIDE/src/ImlVisualEditor.cs b/CrowIDE/src/ImlVisualEditor.cs index e238a706..55c7b0c6 100644 --- a/CrowIDE/src/ImlVisualEditor.cs +++ b/CrowIDE/src/ImlVisualEditor.cs @@ -34,21 +34,23 @@ namespace CrowIDE #region CTOR public ImlVisualEditor () : base() { - imlVE = new Interface (); + imlVE = new DesignInterface (); Thread t = new Thread (interfaceThread); t.IsBackground = true; t.Start (); } #endregion - Interface imlVE; + DesignInterface imlVE; Instantiator itor; - string imlSource; GraphicObject selectedItem; + string imlSource; + ProjectItem projectItem; bool drawGrid; int gridSpacing; + [XmlAttributeAttribute][DefaultValue(true)] public bool DrawGrid { get { return drawGrid; } @@ -81,6 +83,17 @@ namespace CrowIDE RegisterForRedraw (); } } + /// Pointer is over the widget + public virtual GraphicObject HoverWidget + { + get { return imlVE.HoverWidget; } + set { + if (HoverWidget == value) + return; + imlVE.HoverWidget = value; + NotifyValueChanged ("HoverWidget", HoverWidget); + } + } [XmlIgnore]public List LQIs { get { return imlVE.LQIs; } } @@ -100,14 +113,8 @@ namespace CrowIDE public string ImlPath { get { return projectItem?.Path; } } - ProjectItem projectItem; - Project project; - [XmlAttributeAttribute] - public Project Project { - get { return project; } - set { project = value; } - } + [XmlAttributeAttribute] public ProjectNode ProjectNode { get { return projectItem; } @@ -212,19 +219,19 @@ namespace CrowIDE } public override void onMouseMove (object sender, MouseMoveEventArgs e) { - base.onMouseMove (sender, e); - GraphicObject oldHW = imlVE.HoverWidget; + //base.onMouseMove (sender, e); + GraphicObject oldHW = HoverWidget; Rectangle scr = this.ScreenCoordinates (this.getSlot ()); ProcessMouseMove (e.X - scr.X, e.Y - scr.Y); - if (oldHW == imlVE.HoverWidget) + if (oldHW == HoverWidget) return; RegisterForRedraw (); } public override void onMouseDown (object sender, MouseButtonEventArgs e) { - base.onMouseDown (sender, e); - SelectedItem = imlVE.HoverWidget; + //base.onMouseDown (sender, e); + SelectedItem = HoverWidget; } protected override void onDraw (Cairo.Context gr) { @@ -264,8 +271,8 @@ namespace CrowIDE } Rectangle hr; - if (imlVE.HoverWidget != null) { - hr = imlVE.HoverWidget.ScreenCoordinates (imlVE.HoverWidget.getSlot ()); + if (HoverWidget != null) { + hr = HoverWidget.ScreenCoordinates (HoverWidget.getSlot ()); // gr.SetSourceColor (Color.LightGray); // gr.DrawCote (new Cairo.PointD (hr.X, hr.Center.Y), new Cairo.PointD (hr.Right, hr.Center.Y)); // gr.DrawCote (new Cairo.PointD (hr.Center.X, hr.Y), new Cairo.PointD (hr.Center.X, hr.Bottom)); @@ -285,6 +292,42 @@ namespace CrowIDE } #endregion + void WidgetCheckOver (GraphicObject go, MouseMoveEventArgs e){ + Type tGo = go.GetType(); + if (typeof(TemplatedGroup).IsAssignableFrom (tGo)) { + + } else if (typeof(TemplatedContainer).IsAssignableFrom (tGo)) { + TemplatedContainer c = go as TemplatedContainer; + if (c.Content?.MouseIsIn (e.Position) == true) { + WidgetCheckOver (c.Content, e); + return; + } + } else if (typeof(TemplatedControl).IsAssignableFrom (tGo)) { + } else if (typeof(Group).IsAssignableFrom (tGo)) { + Group c = go as Group; + for (int i = c.Children.Count -1; i >= 0; i--) { + if (c.Children[i].MouseIsIn (e.Position)) { + WidgetCheckOver (c.Children[i], e); + return; + } + } + } else if (typeof(Crow.Container).IsAssignableFrom (tGo)) { + Crow.Container c = go as Crow.Container; + if (c.Child?.MouseIsIn (e.Position)==true) { + WidgetCheckOver (c.Child, e); + return; + } + } + HoverWidget = go; + WidgetMouseEnter (go, e); + } + void WidgetMouseLeave (GraphicObject go, MouseMoveEventArgs e){ + + } + void WidgetMouseEnter (GraphicObject go, MouseMoveEventArgs e){ + + } + void WidgetMouseMove (GraphicObject go, MouseMoveEventArgs e){} public bool ProcessMouseMove(int x, int y) { int deltaX = x - imlVE.Mouse.X; @@ -297,14 +340,14 @@ namespace CrowIDE if (imlVE.ActiveWidget != null) { //TODO, ensure object is still in the graphic tree //send move evt even if mouse move outside bounds - imlVE.ActiveWidget.onMouseMove (this, e); + WidgetMouseMove (imlVE.ActiveWidget, e); return true; } - if (imlVE.HoverWidget != null) { + if (HoverWidget != null) { //TODO, ensure object is still in the graphic tree //check topmost graphicobject first - GraphicObject tmp = imlVE.HoverWidget; + GraphicObject tmp = HoverWidget; GraphicObject topc = null; while (tmp is GraphicObject) { topc = tmp; @@ -317,11 +360,11 @@ namespace CrowIDE if (imlVE.GraphicTree [i].LogicalParent == imlVE.GraphicTree [i].Parent) { if (imlVE.GraphicTree [i].MouseIsIn (e.Position)) { while (imlVE.HoverWidget != null) { - imlVE.HoverWidget.onMouseLeave (imlVE.HoverWidget, e); + WidgetMouseLeave (imlVE.HoverWidget, e); imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject; } - imlVE.GraphicTree [i].checkHoverWidget (e); + WidgetCheckOver (GraphicTree [i], e); return true; } } @@ -331,18 +374,18 @@ namespace CrowIDE if (imlVE.HoverWidget.MouseIsIn (e.Position)) { - imlVE.HoverWidget.checkHoverWidget (e); + WidgetCheckOver (imlVE.HoverWidget, (e)); return true; } else { - imlVE.HoverWidget.onMouseLeave (imlVE.HoverWidget, e); + WidgetMouseLeave (imlVE.HoverWidget, e); //seek upward from last focused graph obj's while (imlVE.HoverWidget.LogicalParent as GraphicObject != null) { imlVE.HoverWidget = imlVE.HoverWidget.LogicalParent as GraphicObject; if (imlVE.HoverWidget.MouseIsIn (e.Position)) { - imlVE.HoverWidget.checkHoverWidget (e); + WidgetCheckOver (imlVE.HoverWidget, e); return true; } else - imlVE.HoverWidget.onMouseLeave (imlVE.HoverWidget, e); + WidgetMouseLeave (imlVE.HoverWidget, e); } } } @@ -352,9 +395,7 @@ namespace CrowIDE for (int i = 0; i < imlVE.GraphicTree.Count; i++) { GraphicObject g = imlVE.GraphicTree [i]; if (g.MouseIsIn (e.Position)) { - g.checkHoverWidget (e); - if (g is Window) - imlVE.PutOnTop (g); + WidgetCheckOver (g, e); return true; } } diff --git a/CrowIDE/src/MembersView.cs b/CrowIDE/src/MembersView.cs index 67c712bd..00d3023e 100644 --- a/CrowIDE/src/MembersView.cs +++ b/CrowIDE/src/MembersView.cs @@ -93,6 +93,10 @@ namespace CrowIDE return; instance = value; NotifyValueChanged ("Instance", instance); + if (Instance is GraphicObject) + NotifyValueChanged ("SelectedItemName", (Instance as GraphicObject).Name); + else + NotifyValueChanged ("SelectedItemName", ""); if (instance == null) { Data = null; diff --git a/CrowIDE/src/Project.cs b/CrowIDE/src/Project.cs index 2c724311..ac675713 100644 --- a/CrowIDE/src/Project.cs +++ b/CrowIDE/src/Project.cs @@ -28,16 +28,18 @@ using System.Xml; using System.IO; using System.Collections.Generic; using System.Linq; +using Microsoft.CSharp; +using System.CodeDom.Compiler; namespace CrowIDE -{ +{ public class Project { string path; XmlDocument xmlDoc; XmlNode nodeProject; XmlNode nodeProps; XmlNodeList nodesItems; - Solution solution; + public Solution solution; public string Name { get { return solution.projects.FirstOrDefault(p=>p.ProjectGuid == ProjectGuid).ProjectName; } @@ -120,7 +122,7 @@ namespace CrowIDE case ItemType.None: case ItemType.EmbeddedResource: ProjectNode curNode = root; - string[] folds = pn.Path.Split ('\\', '/'); + string[] folds = pn.Path.Split ('/'); for (int i = 0; i < folds.Length - 1; i++) { ProjectNode nextNode = curNode.ChildNodes.FirstOrDefault (n => n.DisplayName == folds [i] && n.Type == ItemType.VirtualGroup); if (nextNode == null) { @@ -159,6 +161,25 @@ namespace CrowIDE nodesItems = xmlDoc.SelectNodes ("/Project/ItemGroup"); } + + + public void Compile () { + CSharpCodeProvider cp = new CSharpCodeProvider(); + + CompilerParameters parameters = new CompilerParameters(); + + foreach (ProjectItem pi in Items.Where (p=>p.Type == ItemType.Reference)) { + parameters.ReferencedAssemblies.Add (pi.Path); + } + + parameters.GenerateInMemory = true; + // True - exe file generation, false - dll file generation + parameters.GenerateExecutable = true; + + string[] files = Items.Where (p => p.Type == ItemType.Compile).Select (p => p.AbsolutePath).ToArray(); + + CompilerResults results = cp.CompileAssemblyFromFile(parameters, files); + } } } diff --git a/CrowIDE/src/ProjectNodes.cs b/CrowIDE/src/ProjectNodes.cs new file mode 100644 index 00000000..5be419ab --- /dev/null +++ b/CrowIDE/src/ProjectNodes.cs @@ -0,0 +1,158 @@ +// +// ProjectNodes.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2013-2017 Jean-Philippe Bruyère +// +// 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.Collections.Generic; +using System.Linq; +using System.Xml; +using System.IO; +using Crow; + +namespace CrowIDE +{ + public enum ItemType { + ReferenceGroup, + Reference, + ProjectReference, + VirtualGroup, + Folder, + None, + Compile, + EmbeddedResource, + } + + public class ProjectNode : IValueChange + { + #region IValueChange implementation + public event EventHandler ValueChanged; + public virtual void NotifyValueChanged(string MemberName, object _value) + { + ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value)); + } + #endregion + + #region CTOR + public ProjectNode (Project project, ItemType _type, string _name) : this(project){ + type = _type; + name = _name; + } + public ProjectNode (Project project){ + Project = project; + } + #endregion + + ItemType type; + string name; + List childNodes = new List(); + + public Project Project; + + public virtual ItemType Type { + get { return type; } + } + public virtual string DisplayName { + get { return name; } + } + public List ChildNodes { + get { return childNodes; } + } + + public void SortChilds () { + foreach (ProjectNode pn in childNodes) + pn.SortChilds (); + childNodes = childNodes.OrderBy(c=>c.Type).ThenBy(cn=>cn.DisplayName).ToList(); + } + + } + public class ProjectItem : ProjectNode { + #region CTOR + public ProjectItem (Project project, XmlNode _node) : base (project){ + node = _node; + } + #endregion + + public XmlNode node; + object selectedItem; + + + + public string Extension { + get { return System.IO.Path.GetExtension (Path); } + } + public string Path { + get { + return node.Attributes["Include"]?.Value.Replace('\\','/'); + } + } + public string AbsolutePath { + get { + return System.IO.Path.Combine (Project.RootDir, Path); + } + } + public override ItemType Type { + get { + return (ItemType)Enum.Parse (typeof(ItemType), node.Name, true); + } + } + public override string DisplayName { + get { + return Type == ItemType.Reference ? + Path : + Path.Split ('/').LastOrDefault(); + } + } + public string Source { + get { + using (StreamReader sr = new StreamReader (AbsolutePath)) { + return sr.ReadToEnd (); + } + } + } + public object SelectedItem { + get { return selectedItem; } + set { + if (selectedItem == value) + return; + selectedItem= value; + Project.solution.SelectedItemElement = value; + NotifyValueChanged ("SelectedItem", selectedItem); + } + } + + public void OnQueryClose (object sender, EventArgs e){ + Project.solution.CloseItem (this); + } + } + public class ImlProjectItem : ProjectItem + { + #region CTOR + public ImlProjectItem (Project project, XmlNode _node) : base (project, _node){ + node = _node; + } + #endregion + + } +} + diff --git a/CrowIDE/src/Solution.cs b/CrowIDE/src/Solution.cs index 888bf684..aba707e4 100644 --- a/CrowIDE/src/Solution.cs +++ b/CrowIDE/src/Solution.cs @@ -19,8 +19,9 @@ using System.Reflection; using System.Text; using System.Text.RegularExpressions; using System.Xml.Serialization; +using Crow; -namespace CrowIDE{ +namespace CrowIDE{ public class SolutionProject { public string ProjectHostGuid; public string ProjectName; @@ -30,8 +31,64 @@ namespace CrowIDE{ /// /// .sln loaded into class. /// - public class Solution + public class Solution: IValueChange { + #region IValueChange implementation + public event EventHandler ValueChanged; + public virtual void NotifyValueChanged(string MemberName, object _value) + { + ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value)); + } + #endregion + + ObservableList openedItems = new ObservableList(); + public ObservableList OpenedItems { + get { return openedItems; } + set { + if (openedItems == value) + return; + openedItems = value; + NotifyValueChanged ("OpenedItems", openedItems); + } + } + ProjectItem selectedItem = null; + object selectedItemElement = null; + + public ProjectItem SelectedItem { + get { return selectedItem; } + set { + if (selectedItem == value) + return; + selectedItem = value; + NotifyValueChanged ("SelectedItem", selectedItem); + } + } + public object SelectedItemElement { + get { return selectedItemElement; } + set { + if (selectedItemElement == value) + return; + selectedItemElement = value; + NotifyValueChanged ("SelectedItemElement", selectedItemElement); + } + } + + void onSelectedItemChanged (object sender, SelectionChangeEventArgs e){ + ProjectItem pi = e.NewValue as ProjectItem; + if (pi == null) + return; + if (openedItems.Contains (pi)) + return; + openedItems.AddElement (pi); + } + public void OnCloseTab (object sender, MouseButtonEventArgs e){ + + openedItems.RemoveElement ((sender as GraphicObject).DataSource as ProjectItem); + } + public void CloseItem (ProjectItem pi) { + openedItems.RemoveElement (pi); + } + /// /// Solution name /// @@ -53,7 +110,7 @@ namespace CrowIDE{ [ExcludeFromCodeCoverage] public override string ToString() { - return "Solution, name = " + name; + return "Solution: " + name; } /// @@ -76,6 +133,7 @@ namespace CrowIDE{ } } + #region Solution properties double slnVer; // 11.00 - vs2010, 12.00 - vs2015 /// @@ -119,13 +177,18 @@ namespace CrowIDE{ { return configurations.Select(x => x.Split('|')[0]).Distinct(); } + #endregion + #region CTOR /// /// Creates new solution. /// public Solution() { } + #endregion + + #region Loading from SLN file /// /// Loads visual studio .sln solution /// @@ -272,7 +335,7 @@ namespace CrowIDE{ String v = m4.Groups[1].Value; new Regex("\\s*?({[A-F0-9-]+}) = ({[A-F0-9-]+})[\r\n]+", RegexOptions.Multiline).Replace(v, new MatchEvaluator(m5 => { - String[] args = m5.Groups.Cast().Skip(1).Select(x => x.Value).ToArray(); + String[] args = m5.Groups.Cast().Skip(1).Select(x => x.Value).ToArray(); SolutionProject child = s.projects.Where(x => args[0] == x.ProjectGuid).FirstOrDefault(); SolutionProject parent = s.projects.Where(x => args[1] == x.ProjectGuid).FirstOrDefault(); // parent.nodes.Add(child); @@ -285,5 +348,6 @@ namespace CrowIDE{ return s; } //LoadSolution - } //class Solution + #endregion + } } diff --git a/CrowIDE/ui/CrowIDE.crow b/CrowIDE/ui/CrowIDE.crow new file mode 100644 index 00000000..d778d9e5 --- /dev/null +++ b/CrowIDE/ui/CrowIDE.crow @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CrowIDE/ui/EditPane.template b/CrowIDE/ui/EditPane.template new file mode 100644 index 00000000..73644d60 --- /dev/null +++ b/CrowIDE/ui/EditPane.template @@ -0,0 +1,2 @@ + + diff --git a/CrowIDE/ui/EditPaneItems.template b/CrowIDE/ui/EditPaneItems.template new file mode 100644 index 00000000..fca1821a --- /dev/null +++ b/CrowIDE/ui/EditPaneItems.template @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/CrowIDE/ui/MembersView.template b/CrowIDE/ui/MembersView.template index 92f132f3..362380e8 100755 --- a/CrowIDE/ui/MembersView.template +++ b/CrowIDE/ui/MembersView.template @@ -2,7 +2,7 @@ - diff --git a/CrowIDE/ui/MenuItem.template b/CrowIDE/ui/MenuItem.template index 94b93459..5752b088 100644 --- a/CrowIDE/ui/MenuItem.template +++ b/CrowIDE/ui/MenuItem.template @@ -1,22 +1,22 @@  + IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}" IsEnabled="{./IsEnabled}"> diff --git a/CrowIDE/ui/TabItem.template b/CrowIDE/ui/TabItem.template new file mode 100644 index 00000000..f82b79c9 --- /dev/null +++ b/CrowIDE/ui/TabItem.template @@ -0,0 +1,20 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/basic_floppydisk.svg b/CrowIDE/ui/icons/basic_floppydisk.svg new file mode 100644 index 00000000..55d901d4 --- /dev/null +++ b/CrowIDE/ui/icons/basic_floppydisk.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff --git a/CrowIDE/ui/icons/blank-file.svg b/CrowIDE/ui/icons/blank-file.svg new file mode 100644 index 00000000..8136979e --- /dev/null +++ b/CrowIDE/ui/icons/blank-file.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/center-align.svg b/CrowIDE/ui/icons/center-align.svg new file mode 100644 index 00000000..92e3fac8 --- /dev/null +++ b/CrowIDE/ui/icons/center-align.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/CrowIDE/ui/icons/cogwheel.svg b/CrowIDE/ui/icons/cogwheel.svg new file mode 100644 index 00000000..c104c470 --- /dev/null +++ b/CrowIDE/ui/icons/cogwheel.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/copy-file.svg b/CrowIDE/ui/icons/copy-file.svg new file mode 100644 index 00000000..63c2dd37 --- /dev/null +++ b/CrowIDE/ui/icons/copy-file.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/edit.svg b/CrowIDE/ui/icons/edit.svg new file mode 100644 index 00000000..73569d8d --- /dev/null +++ b/CrowIDE/ui/icons/edit.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/file-code.svg b/CrowIDE/ui/icons/file-code.svg new file mode 100644 index 00000000..2dc00db0 --- /dev/null +++ b/CrowIDE/ui/icons/file-code.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/CrowIDE/ui/icons/folder.svg b/CrowIDE/ui/icons/folder.svg new file mode 100644 index 00000000..ee1f82ba --- /dev/null +++ b/CrowIDE/ui/icons/folder.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/font-file.svg b/CrowIDE/ui/icons/font-file.svg new file mode 100644 index 00000000..20beac14 --- /dev/null +++ b/CrowIDE/ui/icons/font-file.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/inbox.svg b/CrowIDE/ui/icons/inbox.svg new file mode 100644 index 00000000..6aa6714e --- /dev/null +++ b/CrowIDE/ui/icons/inbox.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/light-bulb.svg b/CrowIDE/ui/icons/light-bulb.svg new file mode 100644 index 00000000..4193a750 --- /dev/null +++ b/CrowIDE/ui/icons/light-bulb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/outbox.svg b/CrowIDE/ui/icons/outbox.svg new file mode 100644 index 00000000..bd8d7d9b --- /dev/null +++ b/CrowIDE/ui/icons/outbox.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/paragraph.svg b/CrowIDE/ui/icons/paragraph.svg new file mode 100644 index 00000000..826aa63f --- /dev/null +++ b/CrowIDE/ui/icons/paragraph.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/paste-on-document.svg b/CrowIDE/ui/icons/paste-on-document.svg new file mode 100644 index 00000000..b0a705ee --- /dev/null +++ b/CrowIDE/ui/icons/paste-on-document.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/previous.svg b/CrowIDE/ui/icons/previous.svg new file mode 100644 index 00000000..566c8a3e --- /dev/null +++ b/CrowIDE/ui/icons/previous.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/question.svg b/CrowIDE/ui/icons/question.svg new file mode 100644 index 00000000..fb8e3d3f --- /dev/null +++ b/CrowIDE/ui/icons/question.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/reply.svg b/CrowIDE/ui/icons/reply.svg new file mode 100644 index 00000000..d008cb34 --- /dev/null +++ b/CrowIDE/ui/icons/reply.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/scissors.svg b/CrowIDE/ui/icons/scissors.svg new file mode 100644 index 00000000..4b5a2255 --- /dev/null +++ b/CrowIDE/ui/icons/scissors.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/search.svg b/CrowIDE/ui/icons/search.svg new file mode 100644 index 00000000..4a931b35 --- /dev/null +++ b/CrowIDE/ui/icons/search.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/share-arrow.svg b/CrowIDE/ui/icons/share-arrow.svg new file mode 100644 index 00000000..e0eb2462 --- /dev/null +++ b/CrowIDE/ui/icons/share-arrow.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/CrowIDE/ui/icons/sign-out.svg b/CrowIDE/ui/icons/sign-out.svg new file mode 100644 index 00000000..c5951fc0 --- /dev/null +++ b/CrowIDE/ui/icons/sign-out.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/text-file.svg b/CrowIDE/ui/icons/text-file.svg new file mode 100644 index 00000000..eafca90c --- /dev/null +++ b/CrowIDE/ui/icons/text-file.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/CrowIDE/ui/icons/text-label.svg b/CrowIDE/ui/icons/text-label.svg new file mode 100644 index 00000000..8fa91967 --- /dev/null +++ b/CrowIDE/ui/icons/text-label.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/tools.svg b/CrowIDE/ui/icons/tools.svg new file mode 100644 index 00000000..5326f199 --- /dev/null +++ b/CrowIDE/ui/icons/tools.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/CrowIDE/ui/icons/zoom-in.svg b/CrowIDE/ui/icons/zoom-in.svg new file mode 100644 index 00000000..60c41d14 --- /dev/null +++ b/CrowIDE/ui/icons/zoom-in.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/icons/zoom-out.svg b/CrowIDE/ui/icons/zoom-out.svg new file mode 100644 index 00000000..bd4eec3a --- /dev/null +++ b/CrowIDE/ui/icons/zoom-out.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CrowIDE/ui/imlEditor.crow b/CrowIDE/ui/imlEditor.crow deleted file mode 100644 index 2b2fc8ec..00000000 --- a/CrowIDE/ui/imlEditor.crow +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Default.style b/Default.style index c5c04ea7..9a0f3f54 100644 --- a/Default.style +++ b/Default.style @@ -157,7 +157,7 @@ ArrowBut { Focusable=true; Foreground=Jet; Background=hgradient|0:Gray|1:Jet; - MouseDown={Background=hgradient|0:White|0.2:BlueCrayola|1:Jet}; + MouseDown={Background=hgradient|0:White|0.4:BlueCrayola|1:Jet}; MouseUp={Background=hgradient|0:Gray|1:Jet}; MouseEnter={Foreground=Black}; MouseLeave={Foreground=Jet}; diff --git a/Templates/ColorPicker.template b/Templates/ColorPicker.template index d6bda346..f626bfea 100755 --- a/Templates/ColorPicker.template +++ b/Templates/ColorPicker.template @@ -8,7 +8,7 @@ Width="128" Height="128"/> - +