|
From: <cur...@us...> - 2009-08-08 16:38:05
|
Revision: 50
http://wxdevcenter.svn.sourceforge.net/wxdevcenter/?rev=50&view=rev
Author: cursorstar
Date: 2009-08-08 16:37:56 +0000 (Sat, 08 Aug 2009)
Log Message:
-----------
Add bookmark notion (1st step - collision with text bookmark)
Added Paths:
-----------
trunk/wxdevcenter/src/sys/bookmark.cpp
trunk/wxdevcenter/src/sys/bookmark.hpp
Added: trunk/wxdevcenter/src/sys/bookmark.cpp
===================================================================
--- trunk/wxdevcenter/src/sys/bookmark.cpp (rev 0)
+++ trunk/wxdevcenter/src/sys/bookmark.cpp 2009-08-08 16:37:56 UTC (rev 50)
@@ -0,0 +1,68 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * wxdevcenter
+ * Copyright (C) Emilien KIA 2009 <emi...@fr...>
+ *
+ * wxdevcenter 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.
+ *
+ * wxdevcenter 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/>.
+ */
+
+#include "../wxdevcenter.hpp"
+#include "bookmark.hpp"
+
+dcBookmark::dcBookmark(const wxString& location, const wxString& description):
+uri(location),
+descript(description)
+{
+}
+
+dcBookmark::dcBookmark(const wxURI& uri, const wxString& description):
+uri(uri),
+descript(description)
+{
+}
+
+wxURI dcBookmark::getURI()const
+{
+ return uri;
+}
+
+wxURI& dcBookmark::getURI()
+{
+ return uri;
+}
+
+wxString dcBookmark::getLocation()const
+{
+ return uri.BuildUnescapedURI();
+}
+
+wxString dcBookmark::getDescription()const
+{
+ return descript;
+}
+
+void dcBookmark::setURI(const wxURI& uri)
+{
+ this->uri = uri;
+}
+
+void dcBookmark::setLocation(const wxString& location)
+{
+ uri.Create(location);
+}
+
+void dcBookmark::setDescription(const wxString& description)
+{
+ descript = description;
+}
Added: trunk/wxdevcenter/src/sys/bookmark.hpp
===================================================================
--- trunk/wxdevcenter/src/sys/bookmark.hpp (rev 0)
+++ trunk/wxdevcenter/src/sys/bookmark.hpp 2009-08-08 16:37:56 UTC (rev 50)
@@ -0,0 +1,43 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * wxdevcenter
+ * Copyright (C) Emilien KIA 2009 <emi...@fr...>
+ *
+ * wxdevcenter 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.
+ *
+ * wxdevcenter 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/>.
+ */
+
+#ifndef _BOOKMARK_HPP_
+#define _BOOKMARK_HPP_
+
+class dcBookmark
+{
+public:
+ dcBookmark(const wxString& location=wxEmptyString, const wxString& description=wxEmptyString);
+ dcBookmark(const wxURI& uri, const wxString& description=wxEmptyString);
+
+ virtual wxURI getURI()const;
+ virtual wxURI& getURI();
+ virtual wxString getLocation()const;
+ virtual wxString getDescription()const;
+
+ virtual void setURI(const wxURI& uri);
+ virtual void setLocation(const wxString& location);
+ virtual void setDescription(const wxString& description);
+
+private:
+ wxURI uri;
+ wxString descript;
+};
+
+#endif // _BOOKMARK_HPP_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|