OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TTabbedBase Class Reference

TTabbedBase implements a tabbed window, designed to be mixed in with TWindow derived. More...

#include <owl/tabbed.h>

Inheritance diagram for owl::TTabbedBase:
owl::TEventHandler owl::TTabbedWindow owl::TTabbedView

Public Types

enum  TTabPosition { tpLeft = alLeft , tpRight = alRight , tpBottom = alBottom , tpTop = alTop }
 
- Public Types inherited from owl::TEventHandler
typedef bool(* TEqualOperator) (const TGenericTableEntry &, const TEventInfo &)
 

Public Member Functions

 TTabbedBase (TWindow *self, int x, int y, int w, int h, TTabPosition=tpBottom, TNoteTab *tab=0)
 
 TTabbedBase (TWindow *self, TTabPosition=tpBottom, TNoteTab *tab=0)
 
int Add (TWindow &wnd, LPCTSTR titles=0)
 Add a new tab page.
 
int Add (TWindow &wnd, const tstring &titles)
 
void SetupPages ()
 
TNoteTabGetTabControl ()
 
TWindowGetPage (int index=-1)
 
void SelectPage (int index, bool shouldFocusPage=true)
 Hides the current page and shows the page at the given index.
 
- Public Member Functions inherited from owl::TEventHandler
virtual bool Find (TEventInfo &info, TEqualOperator op=0)
 Searches the list of response table entries looking for a match.
 
TResult Dispatch (TEventInfo &info, TParam1, TParam2=0)
 Takes the message data from TEventInfo's Msg data member and dispatches it to the correct event-handling function.
 
TResult DispatchMsg (TMsgId, uint id, TParam1, TParam2)
 Search for the event given the message and it and dispatch to the event handler if found.
 

Protected Member Functions

void EvTabControlSelChange (TNotify &tcn)
 
bool EvTabControlSelChanging (TNotify &tcn)
 
virtual void AdjustPage (TWindow &page)
 
 DECLARE_RESPONSE_TABLE (TTabbedBase)
 
- Protected Member Functions inherited from owl::TEventHandler
bool SearchEntries (const TGenericTableEntry *entries, TEventInfo &info, TEqualOperator op)
 Low-level response table search function.
 

Protected Attributes

TNoteTabNoteTab
 
TTabPosition Position
 
 DECLARE_CASTABLE
 

Detailed Description

TTabbedBase implements a tabbed window, designed to be mixed in with TWindow derived.

Example:

class TTabbedDialog : public TDialog, public TTabbedBase{
public:
SetupWindow();
};
TTabbedDialog::TTabbedDialog(...)
{
Add(new TDialog(this, IDD_DLG1));
Add(new TDialog(this, IDD_DLG2));
Add(new TDialog(this, IDD_DLG3));
}
TTabbedDialog::SetupWindow()
{
}
Typically used to obtain information from a user, a dialog box is a window inside of which other cont...
Definition dialog.h:85
void SetupWindow() override
Overrides the virtual function defined in TWindow.
Definition dialog.cpp:825
TTabbedBase implements a tabbed window, designed to be mixed in with TWindow derived.
Definition tabbed.h:66
void SetupPages()
Definition tabbed.cpp:144
int Add(TWindow &wnd, LPCTSTR titles=0)
Add a new tab page.
Definition tabbed.cpp:79
TNoteTab * GetTabControl()
Definition tabbed.h:83
int SetSel(int index)
Selects the tabitem at the specified index.
Definition notetab.cpp:246

Definition at line 65 of file tabbed.h.

Member Enumeration Documentation

◆ TTabPosition

Enumerator
tpLeft 
tpRight 
tpBottom 
tpTop 

Definition at line 69 of file tabbed.h.

Constructor & Destructor Documentation

◆ TTabbedBase() [1/2]

owl::TTabbedBase::TTabbedBase ( TWindow * self,
int x,
int y,
int w,
int h,
TTabPosition pos = tpBottom,
TNoteTab * tab = 0 )

Definition at line 59 of file tabbed.cpp.

◆ TTabbedBase() [2/2]

owl::TTabbedBase::TTabbedBase ( TWindow * self,
TTabPosition pos = tpBottom,
TNoteTab * tab = 0 )

Definition at line 68 of file tabbed.cpp.

References NoteTab.

Member Function Documentation

◆ Add() [1/2]

int owl::TTabbedBase::Add ( TWindow & wnd,
const tstring & titles )
inline

Definition at line 80 of file tabbed.h.

References Add().

◆ Add() [2/2]

int owl::TTabbedBase::Add ( TWindow & wnd,
LPCTSTR titles = 0 )

Add a new tab page.

Note
Use before the Tab window is created!

Definition at line 79 of file tabbed.cpp.

References _T, owl::TNoteTab::Add(), AdjustPage(), owl::TWindow::GetHandle(), NoteTab, Position, and TYPESAFE_DOWNCAST.

◆ AdjustPage()

void owl::TTabbedBase::AdjustPage ( TWindow & page)
protectedvirtual

◆ DECLARE_RESPONSE_TABLE()

owl::TTabbedBase::DECLARE_RESPONSE_TABLE ( TTabbedBase )
protected

◆ EvTabControlSelChange()

void owl::TTabbedBase::EvTabControlSelChange ( TNotify & tcn)
protected

Definition at line 209 of file tabbed.cpp.

References GetPage().

◆ EvTabControlSelChanging()

bool owl::TTabbedBase::EvTabControlSelChanging ( TNotify & tcn)
protected

Definition at line 215 of file tabbed.cpp.

References GetPage().

◆ GetPage()

TWindow * owl::TTabbedBase::GetPage ( int index = -1)

◆ GetTabControl()

TNoteTab * owl::TTabbedBase::GetTabControl ( )
inline

Definition at line 83 of file tabbed.h.

◆ SelectPage()

void owl::TTabbedBase::SelectPage ( int index,
bool shouldFocusPage = true )

Hides the current page and shows the page at the given index.

Does nothing if the page at the given index is already selected. Note that this function does not send any notifications.

Definition at line 195 of file tabbed.cpp.

References GetPage(), owl::TNoteTab::GetSel(), NoteTab, PRECONDITION, and owl::TNoteTab::SetSel().

◆ SetupPages()

Member Data Documentation

◆ DECLARE_CASTABLE

owl::TTabbedBase::DECLARE_CASTABLE
protected

Definition at line 98 of file tabbed.h.

◆ NoteTab

TNoteTab* owl::TTabbedBase::NoteTab
protected

Definition at line 94 of file tabbed.h.

◆ Position

TTabPosition owl::TTabbedBase::Position
protected

Definition at line 95 of file tabbed.h.


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