fs::rap::ConWin_t Class Reference

#include <fsConWin.h>

Collaboration diagram for fs::rap::ConWin_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Console window.

The class represents a console window. It consists of a text output area and a command-line. Text can be passed to the console using Push or a user can type text directly to the command-line. The console then notifies registered text receivers (see RegTxtRcvr) of such an activity. Each instance of the class represents a single console window.

fs_rap_ConWin_t_01.gif

Currently, Windows platform is the only supported. Console window requires a message pump to work properly. GUI applications typically have such a message pump so that's not the issue. In the case of non-GUI applications (e.g. DLLs) the pump has to be provided by the user e.g. in a separated thread. See a pump below for the basic idea.

    MSG msg;
    while(::GetMessage(&msg, 0, 0, 0))
    {
        ::TranslateMessage(&msg);
        ::DispatchMessage(&msg);
    }
Examples:

_tests/fsConWin/main.cpp.

Definition at line 49 of file fsConWin.h.

Public Member Functions

 ConWin_t (const char *pszTitle="FipS' Console")
 Creates a new console window, which is by default invisible.
 ~ConWin_t ()
 Destroys the console window.
bool IsValid () const
 Checks the internal state / correct construction.
void Show (bool bShow=true)
 Shows / hides the console window.
void SetPos (int nX, int nY, int nW, int nH)
 Sets the position and dimensions of the console window.
void Push (const char *pszText)
 Sends a text line to the console output.
void RegTxtRcvr (TxtRcvr_i *pRcvr)
 Registers a new text receiver.

Private Member Functions

 ConWin_t (const ConWin_t &)
 No copy.
ConWin_toperator= (const ConWin_t &)
 No assignment.

Private Attributes

void * m_pImpl
 The PIPML idiom is used.

Classes

struct  TxtRcvr_i
 Text receiver interface. More...


Constructor & Destructor Documentation

ConWin_t::ConWin_t ( const char *  pszTitle = "FipS' Console"  )  [explicit]

Creates a new console window, which is by default invisible.

Definition at line 524 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

ConWin_t::~ConWin_t (  ) 

Destroys the console window.

Definition at line 530 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

fs::rap::ConWin_t::ConWin_t ( const ConWin_t  )  [private]

No copy.


Member Function Documentation

bool ConWin_t::IsValid (  )  const

Checks the internal state / correct construction.

Definition at line 536 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

ConWin_t& fs::rap::ConWin_t::operator= ( const ConWin_t  )  [private]

No assignment.

void ConWin_t::Push ( const char *  pszText  ) 

Sends a text line to the console output.

Definition at line 554 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

void ConWin_t::RegTxtRcvr ( TxtRcvr_i pRcvr  ) 

Registers a new text receiver.

Definition at line 560 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

void ConWin_t::SetPos ( int  nX,
int  nY,
int  nW,
int  nH 
)

Sets the position and dimensions of the console window.

Definition at line 548 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.

void ConWin_t::Show ( bool  bShow = true  ) 

Shows / hides the console window.

Definition at line 542 of file fsConWin.cpp.

References FS_ASSERT_MSG, and m_pImpl.


Member Data Documentation

void* fs::rap::ConWin_t::m_pImpl [private]

The PIPML idiom is used.

Definition at line 77 of file fsConWin.h.


The documentation for this class was generated from the following files:

FipS' Code (Thu Feb 15 22:43:49 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]