libyui

/data/gitorious.org/libyui/libyui-master/src/YGraph.h

00001 /**************************************************************************
00002 Copyright (C) 2000 - 2010 Novell, Inc.
00003 All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 **************************************************************************/
00020 
00021 
00022 /*---------------------------------------------------------------------\
00023 |                                                                      |
00024 |                      __   __    ____ _____ ____                      |
00025 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00026 |                       \ V / _` \___ \ | |   __) |                    |
00027 |                        | | (_| |___) || |  / __/                     |
00028 |                        |_|\__,_|____/ |_| |_____|                    |
00029 |                                                                      |
00030 |                               core system                            |
00031 |                                                  (c) SuSE Linux GmbH |
00032 \----------------------------------------------------------------------/
00033 
00034   File:         YGraph.h
00035 
00036   Author:       Arvin Schnell <aschnell@suse.de>
00037 
00038 /-*/
00039 
00040 #ifndef YGraph_h
00041 #define YGraph_h
00042 
00043 #include "YWidget.h"
00044 
00045 extern "C"
00046 {
00047     struct Agraph_t;
00048     typedef struct Agraph_t graph_t;
00049 }
00050 
00051 class YGraphPrivate;
00052 
00053 
00054 class YGraph : public YWidget
00055 {
00056 protected:
00057 
00066     YGraph( YWidget * parent, const string & filename, const string & layoutAlgorithm );
00067 
00073     YGraph( YWidget * parent, graph_t * graph );
00074 
00075 public:
00076 
00080     virtual ~YGraph();
00081 
00086     virtual const char * widgetClass() const { return "YGraph"; }
00087 
00098     virtual bool setProperty( const string & propertyName,
00099                               const YPropertyValue & val );
00100 
00107     virtual YPropertyValue getProperty( const string & propertyName );
00108 
00115     virtual const YPropertySet & propertySet();
00116 
00120     string filename() const;
00121 
00128     virtual void setFilename( const string & filename );
00129 
00133     string layoutAlgorithm() const;
00134 
00140     virtual void setLayoutAlgorithm( const string & filename );
00141 
00147     virtual void setGraph( graph_t * graph );
00148 
00153     virtual string activatedNode() const;
00154 
00155 protected:
00156 
00161     virtual void renderGraph( const string & filename, const string & layoutAlgorithm ) = 0;
00162 
00166     virtual void renderGraph( graph_t * graph ) = 0;
00167 
00168 private:
00169 
00170     ImplPtr<YGraphPrivate> priv;
00171 
00172 };
00173 
00174 
00175 #endif // YGraph_h
 All Classes Functions Variables Enumerations Friends