Jump to content

KrCommonTextOutput: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Description==
'''#include "krcto.hpp"'''


==Description ==
This class contains an ostream object. All output that goes to this object is displayed in an IMultiLineEdit window.
'''#include "krcto.hpp"'''


This class contains a ostream object. All output that goes to this object is displayed in an IMultiLineEdit window.  
You can use this class to redirect output from cout etc. to the screen.


You can use this class to redirect output from cout etc. to the screen.  
==Derivation==
KrCommonTextOutput inherits from IMultiLineEdit.


==Derivation==  
==Constructors==
KrCommonTextOutput inherits from IMultiLineEdit.  
You can construct and destruct objects of this class.


==Constructors ==
'''Overload 1'''
You can construct and destruct objects of this class.
  public:
'''Overload 1'''  
 
  public:  
  KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
  KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
                     const IRectangle& initial = IRectangle (),
                     const IRectangle& initial = IRectangle (),
                     const Style& style = defaultStyle () | readOnly);
                     const Style& style = defaultStyle () | readOnly);
The constructor works exactly like the corresponding constructor of IMultiLineEdit.


The constructor works exactly like the corresponding constructor of IMultiLineEdit.  
==Public Functions==
===Constructors===
====KrCommonTextOutput====
You can construct and destruct objects of this class.


==Public Functions==
'''Overload 1'''
 
  public:
===Constructors===
====KrCommonTextOutput ====
You can construct and destruct objects of this class.
 
'''Overload 1'''  
 
  public:  
  KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
  KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
                     const IRectangle& initial = IRectangle (),
                     const IRectangle& initial = IRectangle (),
                     const Style& style = defaultStyle () | readOnly);
                     const Style& style = defaultStyle () | readOnly);
The constructor works exactly like the corresponding constructor of IMultiLineEdit.


The constructor works exactly like the corresponding constructor of IMultiLineEdit.
===Associated stream===
 
====stream====
===Associated stream===  
Use this function to access the ostream associated to the KrCommonTextOutput object.
====stream====  
  public:
Use this function to access the ostream associated to the KrCommonTextOutput object.  
  ostream &stream ();
 
Usually, you will assign it to some other stream like cout using the operator =.
  public:  
  ostream & stream ();  
 
Usually, you will assign it to some other stream like cout using the operator =.
 
'''Note:'''  The ostream has and needs the property ios::unitbuf. Unfortunately, this is not copied by the operator =. Hence, you must take care of this yourself by calling ios::setf (ios::unitbuf).
 
Do not use this function before the object is properly initialized, i.e. before IApplication::current().run() has been called.  


'''Note:''' The ostream has and needs the property ios::unitbuf. Unfortunately, this is not copied by the operator =. Hence, you must take care of this yourself by calling ios::setf (ios::unitbuf).


Do not use this function before the object is properly initialized, i.e. before IApplication::current().run() has been called.


[[Category:The OS/2 API Project]]
[[Category:Kronis Classes]]

Latest revision as of 21:37, 7 October 2022

Description

#include "krcto.hpp"

This class contains an ostream object. All output that goes to this object is displayed in an IMultiLineEdit window.

You can use this class to redirect output from cout etc. to the screen.

Derivation

KrCommonTextOutput inherits from IMultiLineEdit.

Constructors

You can construct and destruct objects of this class.

Overload 1

public:
KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
                    const IRectangle& initial = IRectangle (),
                    const Style& style = defaultStyle () | readOnly);

The constructor works exactly like the corresponding constructor of IMultiLineEdit.

Public Functions

Constructors

KrCommonTextOutput

You can construct and destruct objects of this class.

Overload 1

public:
KrCommonTextOutput (unsigned long id, IWindow* parent, IWindow* owner,
                    const IRectangle& initial = IRectangle (),
                    const Style& style = defaultStyle () | readOnly);

The constructor works exactly like the corresponding constructor of IMultiLineEdit.

Associated stream

stream

Use this function to access the ostream associated to the KrCommonTextOutput object.

public:
ostream &stream ();

Usually, you will assign it to some other stream like cout using the operator =.

Note: The ostream has and needs the property ios::unitbuf. Unfortunately, this is not copied by the operator =. Hence, you must take care of this yourself by calling ios::setf (ios::unitbuf).

Do not use this function before the object is properly initialized, i.e. before IApplication::current().run() has been called.