# Bakery::View< T_Document > Class Template Reference

This is a base class which should be multiple-inherited with gtkmm widgets. More...

`#include <View.h>`

Inheritance diagram for Bakery::View< T_Document >:

[legend]

List of all members.

## Public Types

typedef View< T_Document > | type_self

## Public Member Functions

| View ()
virtual | ~View ()
virtual T_Document * | get_document ()
virtual const T_Document * | get_document () const
virtual void | set_document (T_Document *pDocument)
virtual void | set_modified (bool val=true)
| Just a convenience, instead of get_docuement()->set_modified().

## Protected Member Functions

void | on_document_forget ()

## Protected Attributes

T_Document * | m_pDocument

## Detailed Description

### template<class T_Document>
class Bakery::View< T_Document >

This is a base class which should be multiple-inherited with gtkmm widgets.

You should override save_to_document() and load_from_document().

## Member Typedef Documentation

template<class T_Document>

typedef View<T_Document> Bakery::View< T_Document >::type_self

## Constructor & Destructor Documentation

template<class T_Document>

Bakery::View< T_Document >::View | ( |  | ) | `[inline]`

template<class T_Document>

virtual Bakery::View< T_Document >::~View | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

template<class T_Document>

virtual T_Document* Bakery::View< T_Document >::get_document | ( |  | ) | `[inline, virtual]`

References Bakery::View< T_Document >::m_pDocument.

template<class T_Document>

virtual const T_Document* Bakery::View< T_Document >::get_document | ( |  | ) | const`[inline, virtual]`

References Bakery::View< T_Document >::m_pDocument.

template<class T_Document>

virtual void Bakery::View< T_Document >::set_document | ( | T_Document * | pDocument | ) | `[inline, virtual]`

Reimplemented in Bakery::View_Composite< T_Document >.

References Bakery::View< T_Document >::m_pDocument, and Bakery::View< T_Document >::on_document_forget().

Referenced by Bakery::View_Composite< T_Document >::add_view(), and Bakery::View_Composite< T_Document >::set_document().

template<class T_Document>

virtual void Bakery::View< T_Document >::set_modified | ( | bool | val = `true` | ) | `[inline, virtual]`

Just a convenience, instead of get_docuement()->set_modified().

References Bakery::View< T_Document >::m_pDocument.

template<class T_Document>

void Bakery::View< T_Document >::on_document_forget | ( |  | ) | `[inline, protected]`

References Bakery::View< T_Document >::m_pDocument.

Referenced by Bakery::View< T_Document >::set_document().

## Member Data Documentation

template<class T_Document>

T_Document* Bakery::View< T_Document >::m_pDocument`[protected]`

Referenced by Bakery::View< T_Document >::get_document(), Bakery::View< T_Document >::on_document_forget(), Bakery::View< T_Document >::set_document(), and Bakery::View< T_Document >::set_modified().

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

- View.h