YMacroRecorder.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YMacroRecorder.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 #ifndef YMacroRecorder_h
00020 #define YMacroRecorder_h
00021 
00022 #include <stdio.h>
00023 #include <string>
00024 #include <ycp/YCPSymbol.h>
00025 #include <ycp/YCPTerm.h>
00026 
00027 class YWidget;
00028 
00029 class YMacroRecorder
00030 {
00031 public:
00032 
00036     YMacroRecorder( const string & macroFileName );
00037 
00038 
00042     virtual ~YMacroRecorder();
00043 
00044 
00048     void recordUserInput( const YCPValue & input );
00049 
00050 
00054     void recordWidgetProperty( YWidget *        widget,
00055                                const char *     propertyName );
00056 
00064     void recordMakeScreenShot( bool enabled=false, const char * filename=0 );
00065 
00069     void recordComment( string comment_text );
00070     
00074     void beginBlock();
00075 
00079     void endBlock();
00080 
00081 protected:
00082 
00090     void openMacroFile( const string & macroFileName );
00091 
00095     void closeMacroFile();
00096 
00100     void writeMacroFileHeader();
00101 
00105     void writeMacroFileFooter();
00106 
00110     void recordYcpCodeLocation();
00111 
00115     void recordTimeStamp();
00116 
00120     void recordDialogDebugLabel();
00121 
00125     FILE * _macroFile;
00126 
00130     int _screenShotCount;
00131 };
00132 
00133 #endif // YMacroRecorder_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6