• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

  • interfaces
  • khexedit
byteseditinterface.h
1 /***************************************************************************
2  byteseditinterface.h - description
3  -------------------
4  begin : Fri Sep 12 2003
5  copyright : (C) 2003 by Friedrich W. H. Kossebau
6  email : Friedrich.W.H@Kossebau.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Library General Public *
13  * License version 2 as published by the Free Software Foundation. *
14  * *
15  ***************************************************************************/
16 
17 
18 #ifndef BYTESEDITINTERFACE_H
19 #define BYTESEDITINTERFACE_H
20 
21 // kde specific
22 #include <tdeparts/componentfactory.h>
23 
24 #include <tqwidget.h>
25 
32 namespace KHE
33 {
34 
76 class BytesEditInterface
77 {
78  public:
79  //static const char Name[] = "KHE::BytesEditInterface";
80 
81  public: // set methods
89  virtual void setData( char *D, int S, int RS = -1, bool KM = true ) = 0;
91  virtual void setReadOnly( bool RO = true ) = 0;
100  virtual void setMaxDataSize( int MS ) = 0;
104  virtual void setAutoDelete( bool AD = true ) = 0;
106 // virtual void resetData( char *D, int S, bool Repaint ) = 0;
114  virtual void setKeepsMemory( bool KM = true ) = 0;
115  //
117  virtual void setOverwriteOnly( bool b ) = 0;
119  virtual void setOverwriteMode( bool b ) = 0;
121  virtual void setModified( bool b ) = 0;
122 
123 
124  public: // get methods
126  virtual char *data() const = 0;
128  virtual int dataSize() const = 0;
130  virtual int maxDataSize () const = 0;
132  virtual bool isAutoDelete() const = 0;
134  virtual bool keepsMemory() const = 0;
135 
137  virtual bool isOverwriteMode() const = 0;
139  virtual bool isOverwriteOnly() const = 0;
141  virtual bool isReadOnly() const = 0;
143  virtual bool isModified() const = 0;
144 
145  public: // call for action
147  virtual void repaintRange( int i1, int i2 ) = 0;
148 };
149 
150 
156 template<class T>
157 inline BytesEditInterface *bytesEditInterface( T *t )
158 {
159  if( !t )
160  return 0;
161 
162  return static_cast<KHE::BytesEditInterface*>( t->tqt_cast("KHE::BytesEditInterface") );
163 }
164 
221 inline TQWidget *createBytesEditWidget( TQWidget *Parent = 0, const char *Name = 0 )
222 {
223  return KParts::ComponentFactory::createInstanceFromQuery<TQWidget>
224  ( TQString::fromLatin1("KHexEdit/KBytesEdit"), TQString::null, Parent, Name );
225 }
226 
227 }
228 
229 #endif
KHE::BytesEditInterface
An interface for a hex edit editor/viewer for arrays of byte.
Definition: byteseditinterface.h:77
KHE::BytesEditInterface::dataSize
virtual int dataSize() const =0
KHE::BytesEditInterface::setModified
virtual void setModified(bool b)=0
sets whether the data should be treated modified or not
KHE::BytesEditInterface::setOverwriteOnly
virtual void setOverwriteOnly(bool b)=0
sets whether the widget is overwriteonly or not.
KHE::BytesEditInterface::setKeepsMemory
virtual void setKeepsMemory(bool KM=true)=0
switches the array
KHE::BytesEditInterface::isAutoDelete
virtual bool isAutoDelete() const =0
KHE::BytesEditInterface::repaintRange
virtual void repaintRange(int i1, int i2)=0
repaint the indizes from i1 to i2
KHE::BytesEditInterface::setOverwriteMode
virtual void setOverwriteMode(bool b)=0
sets whether the widget is in overwrite mode or not.
KHE::BytesEditInterface::keepsMemory
virtual bool keepsMemory() const =0
KHE::BytesEditInterface::isModified
virtual bool isModified() const =0
KHE::BytesEditInterface::setReadOnly
virtual void setReadOnly(bool RO=true)=0
sets whether the given array should be handled read only or not.
KHE::BytesEditInterface::setMaxDataSize
virtual void setMaxDataSize(int MS)=0
sets the maximal size of the actual byte array.
KHE::BytesEditInterface::setData
virtual void setData(char *D, int S, int RS=-1, bool KM=true)=0
hands over to the editor a new byte array.
KHE::BytesEditInterface::isReadOnly
virtual bool isReadOnly() const =0
KHE::BytesEditInterface::data
virtual char * data() const =0
KHE::BytesEditInterface::isOverwriteMode
virtual bool isOverwriteMode() const =0
KHE::BytesEditInterface::maxDataSize
virtual int maxDataSize() const =0
KHE::BytesEditInterface::setAutoDelete
virtual void setAutoDelete(bool AD=true)=0
sets whether the array should be deleted on the widget's end or if a new array is set.
KHE::BytesEditInterface::isOverwriteOnly
virtual bool isOverwriteOnly() const =0
KHE
KHE (short for KHexEdit) is KDE's namespace for all things related to the viewing/editing of bytes.
Definition: byteseditinterface.h:33
KHE::bytesEditInterface
BytesEditInterface * bytesEditInterface(T *t)
tries to get the bytesedit interface of t
Definition: byteseditinterface.h:157
KHE::createBytesEditWidget
TQWidget * createBytesEditWidget(TQWidget *Parent=0, const char *Name=0)
tries to create an instance of a hexedit widget for arrays of chars (char[])
Definition: byteseditinterface.h:221

interfaces

Skip menu "interfaces"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.1
This website is maintained by Timothy Pearson.