aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/TemplatedControl.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
commitb56c22ad826a49b7ea0013c1ca78cf64169fc326 (patch)
tree588a3bc9ae0ed826012096a072b138a94ded4e61 /src/GraphicObjects/TemplatedControl.cs
parent999f18b6daf7db54879a85f0f8b5c7b22f740ce7 (diff)
TemplatedControls, Picture objects for pixmap and svg raw data sharing
among controls
Diffstat (limited to 'src/GraphicObjects/TemplatedControl.cs')
-rw-r--r--src/GraphicObjects/TemplatedControl.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs
new file mode 100644
index 00000000..7b9db047
--- /dev/null
+++ b/src/GraphicObjects/TemplatedControl.cs
@@ -0,0 +1,57 @@
+//
+// TemplatedControl.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 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.Xml.Serialization;
+using System.ComponentModel;
+
+namespace go
+{
+ public abstract class TemplatedControl : Container
+ {
+ public TemplatedControl () : base()
+ {
+ }
+
+// string _templatePath;
+// [XmlAttributeAttribute()]
+// public virtual string Template {
+// get { return _templatePath; }
+// set { _templatePath = value; }
+// }
+
+
+ protected abstract void loadTemplate();
+
+ protected override void loadDefaultValues ()
+ {
+ loadTemplate ();
+ base.loadDefaultValues ();
+ this.Focusable = true;
+ }
+
+ public override GraphicObject FindByName (string nameToFind)
+ {
+ //prevent name searching in template
+ return nameToFind == this.Name ? this : null;
+ }
+ }
+}
+