basePlugin.py :  » Business-Application » Gimini » gimini » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Business Application » Gimini 
Gimini » gimini » basePlugin.py
################################################################################
# Name      : basePlugin
# Author    : C.Dutoit - dutoitc@hotmail.com - http://www.dutoitc.fr.st
# Goal      : the base for all plugins
# Date      : September 2001
################################################################################
from wxPython.wx import *
from gPluginsDialogs import *
from utils import assignID

pluginID="basePlugin"
[ID_MENU_ABOUT]=assignID(1)

#>--------------------------------------------------------------------------
class GiminiPlugin:
    "A gimini plugin"
    def __init__(self, wxParent, pluginsAPI):
        "Plugin initialisation"


    #>--------------------------------------------------------------------------
    def getNodeData(self):
        "Get a node data for this plugin"
        return NodeData()



class Mindmap_NodeDatas:
    "Standard node data"
    #>----------------------------------------------------------------------
    def __init__(self):
        self._fontSize=8        # Default font size
        pass

    #>----------------------------------------------------------------------
    def setFontSize(self, fontSize):
        self._fontSize=fontSize

        
    #>----------------------------------------------------------------------
    def getFontSize(self):
        return self._fontSize
    

    #>----------------------------------------------------------------------
    def saveToString(self):
        "Save the node data to a string"
        return "Empty_Node"


    #>----------------------------------------------------------------------
    def loadFromString(self, txt):
        "Load the node data from a string"
        pass
        
    #>----------------------------------------------------------------------
    def saveToList(self):
        "Save the datas to a list"
        return [""]

    #>----------------------------------------------------------------------
    def loadFromList(self, text):
        "Load the node data from a list"
        print "Error : can't load node from list !"

    #>----------------------------------------------------------------------
    def getSmallName(self):
        "Get a small name wich will represent the node"
        return "Empty_Node"


    #>----------------------------------------------------------------------
    def getNodeSize(self, dc):
        "Get the node size"
        return (0, 0)


    #>----------------------------------------------------------------------
    def getNodeRootSize(self, dc):
        "Get the node size when drawed as root"
        return (0, 0)


    #>----------------------------------------------------------------------
    def getRootLatexCode(self, dc, x, y):
        "Return the LaTeX code of the root, drawed as root"
        return ""

    #>----------------------------------------------------------------------
    def getLatexCode(self, dc, x, y):
        "Return the node LaTeX code"
        return ""

    #>----------------------------------------------------------------------
    def drawRootNode(self, dc, x, y):
        "Draw as root node"
        pass

    #>----------------------------------------------------------------------
    def drawNodeDatas(self, dc, x, y):
        "Draw the node data; org is bottom-left"
        pass

    #>----------------------------------------------------------------------
    def getNodeEditionPanel(self, parent):
        """Return a canvas to integrate to the node edition dialog box wich
         will permit to edit the node datas"""
        return nodeEditionPanel(parent)

    #>------------------------------------------------------------------
    def getPluginID(self):
        "Return the plugin ID"
        return pluginID

    #>------------------------------------------------------------------
    def saveToXML(self):
        "Save the datas to xml"
        from xml.dom.minidom import Element
        return Element("Data")

    #>------------------------------------------------------------------
    def loadFromXML(self, xml):
        "Load the datas from xml"
        pass

    #>------------------------------------------------------------------
#    def onDblClick(self):
#        "Handle double-click"
#        pass


#>----------------------------------------------------------------------
class nodeEditionPanel(wxPanel):
    "Panel to edit node datas"
    #>------------------------------------------------------------------
    def __init__(self, parent):
        wxPanel.__init__(self, parent, -1)

    #>------------------------------------------------------------------
    def saveDatas(self):
        pass


www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.