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

#include <owl/trayicon.h>

Inheritance diagram for owl::TTrayIcon:

Public Member Functions

 TTrayIcon (TModule *module=&GetGlobalModule())
 
 TTrayIcon (TWindow *parent, TMsgId, const tstring &tip, TIcon &icon, uint id, TModule *module=&GetGlobalModule())
 
 TTrayIcon (TWindow *parent, TMsgId, const tstring &tip, TResId icon, uint id, TModule *module=&GetGlobalModule())
 
virtual void Init (TWindow *parent, TMsgId, const tstring &tip, TIcon *icon=0, uint id=0)
 
virtual ~TTrayIcon ()
 
bool Enabled () const
 
bool Visible () const
 
bool Create ()
 Create the tray icon => must have valid hWnd => call in SetupWindow();.
 
bool SetText (const tstring &text)
 
bool SetText (TResId resId)
 
tstring GetText () const
 
bool SetParent (TWindow *wnd)
 
TWindowGetParent () const
 
bool SetIcon (TIcon &icon, TAutoDelete=NoAutoDelete)
 
bool SetIcon (TResId resId)
 
TIconGetIcon () const
 
void HideIcon ()
 
void ShowIcon ()
 
void RemoveIcon ()
 
void MoveToRight ()
 
TResult EvTrayNotification (TParam1, TParam2)
 Default handler for tray notification message.
 

Protected Attributes

bool bEnabled
 does O/S support tray icon?
 
bool bHidden
 Has the icon been hidden?
 
TWindowParent
 
TModuleModule
 
TIconIcon
 
bool ShouldDelete
 

Detailed Description

Definition at line 32 of file trayicon.h.

Constructor & Destructor Documentation

◆ TTrayIcon() [1/3]

owl::TTrayIcon::TTrayIcon ( TModule * module = &GetGlobalModule())

Definition at line 55 of file trayicon.cpp.

References _T, and Init().

◆ TTrayIcon() [2/3]

owl::TTrayIcon::TTrayIcon ( TWindow * parent,
TMsgId msg,
const tstring & tip,
TIcon & icon,
uint id,
TModule * module = &GetGlobalModule() )

Definition at line 68 of file trayicon.cpp.

References bHidden, and Init().

◆ TTrayIcon() [3/3]

owl::TTrayIcon::TTrayIcon ( TWindow * parent,
TMsgId msg,
const tstring & tip,
TResId icon,
uint id,
TModule * module = &GetGlobalModule() )

Definition at line 79 of file trayicon.cpp.

References bHidden, Init(), Module, and ShouldDelete.

◆ ~TTrayIcon()

owl::TTrayIcon::~TTrayIcon ( )
virtual

Definition at line 156 of file trayicon.cpp.

References Icon, RemoveIcon(), and ShouldDelete.

Member Function Documentation

◆ Create()

bool owl::TTrayIcon::Create ( )

Create the tray icon => must have valid hWnd => call in SetupWindow();.

Definition at line 138 of file trayicon.cpp.

References bEnabled, owl::TWindow::GetHandle(), owl::TWindow::IsWindow(), Parent, and owl::TShell::Shell_NotifyIcon().

◆ Enabled()

bool owl::TTrayIcon::Enabled ( ) const
inline

Definition at line 85 of file trayicon.h.

References bEnabled.

◆ EvTrayNotification()

TResult owl::TTrayIcon::EvTrayNotification ( TParam1 id,
TParam2 event )

Default handler for tray notification message.

Definition at line 287 of file trayicon.cpp.

References owl::TMenu::GetMenuItemID(), owl::TMenu::IsOK(), Module, Parent, and owl::TWindow::SendMessage().

◆ GetIcon()

TIcon * owl::TTrayIcon::GetIcon ( ) const

◆ GetParent()

TWindow * owl::TTrayIcon::GetParent ( ) const
inline

Definition at line 91 of file trayicon.h.

References Parent.

◆ GetText()

tstring owl::TTrayIcon::GetText ( ) const

Definition at line 199 of file trayicon.cpp.

◆ HideIcon()

void owl::TTrayIcon::HideIcon ( )

Definition at line 188 of file trayicon.cpp.

References bEnabled, bHidden, and owl::TShell::Shell_NotifyIcon().

◆ Init()

void owl::TTrayIcon::Init ( TWindow * parent,
TMsgId msg,
const tstring & tip,
TIcon * icon = 0,
uint id = 0 )
virtual

Definition at line 95 of file trayicon.cpp.

References _tcslen, _tcsncpy, bEnabled, bHidden, CHECK, Icon, Parent, PRECONDITION, and ShouldDelete.

◆ MoveToRight()

void owl::TTrayIcon::MoveToRight ( )

Definition at line 166 of file trayicon.cpp.

References HideIcon(), and ShowIcon().

◆ RemoveIcon()

void owl::TTrayIcon::RemoveIcon ( )

Definition at line 175 of file trayicon.cpp.

References bEnabled, and owl::TShell::Shell_NotifyIcon().

◆ SetIcon() [1/2]

bool owl::TTrayIcon::SetIcon ( TIcon & icon,
TAutoDelete shouldDelete = NoAutoDelete )

◆ SetIcon() [2/2]

bool owl::TTrayIcon::SetIcon ( TResId resId)
inline

Definition at line 98 of file trayicon.h.

References owl::AutoDelete, Module, and SetIcon().

◆ SetParent()

bool owl::TTrayIcon::SetParent ( TWindow * wnd)

◆ SetText() [1/2]

bool owl::TTrayIcon::SetText ( const tstring & text)

Definition at line 244 of file trayicon.cpp.

References _tcscmp, _tcscpy, _tcslen, _tcsncpy, bEnabled, and owl::TShell::Shell_NotifyIcon().

◆ SetText() [2/2]

bool owl::TTrayIcon::SetText ( TResId resId)
inline

Definition at line 94 of file trayicon.h.

References owl::TModule::LoadString(), Module, and SetText().

◆ ShowIcon()

void owl::TTrayIcon::ShowIcon ( )

Definition at line 207 of file trayicon.cpp.

References _tcslen, bEnabled, bHidden, Icon, and owl::TShell::Shell_NotifyIcon().

◆ Visible()

bool owl::TTrayIcon::Visible ( ) const
inline

Definition at line 88 of file trayicon.h.

References bHidden.

Member Data Documentation

◆ bEnabled

bool owl::TTrayIcon::bEnabled
protected

does O/S support tray icon?

Definition at line 73 of file trayicon.h.

◆ bHidden

bool owl::TTrayIcon::bHidden
protected

Has the icon been hidden?

Definition at line 74 of file trayicon.h.

◆ Icon

TIcon* owl::TTrayIcon::Icon
protected

Definition at line 77 of file trayicon.h.

◆ Module

TModule* owl::TTrayIcon::Module
protected

Definition at line 76 of file trayicon.h.

◆ Parent

TWindow* owl::TTrayIcon::Parent
protected

Definition at line 75 of file trayicon.h.

◆ ShouldDelete

bool owl::TTrayIcon::ShouldDelete
protected

Definition at line 78 of file trayicon.h.


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