Additions in to gadget system.
Gadgets system now support flat style ala I.E. .
To enable this functionality call static functions TGadgetWindow::EnableFlatStyle(true);
and static function: bool TGadgetWindow::GetFlatStyle()
New TFlatHandleGadget to support handle for docked toolbar.
New predefined gadget Id: IDG_FLATHANDLE
Additions in Docking system
New message EV_WM_OWLWINDOWDOCKED
Additions into TWindow
TWindow now has Tooltip member, this allow simple additions tooltip in every
window(include dialog box)
New members of TWindow:
LPCSTR GetClassName();
- Now it return const _TCHAR*
bool LockWindowUpdate(bool lock=true) - lock/unlock windows update
bool IsWindowVisible()
- now if window not created use WS_VISIBLE flag
Not documented TFixedPoint
I don't found documentation on TFixedPoint class also OWL uses it.
TFixedPoint defined in "fixedpnt.h"
Usage:
TFixedPoint a,b,c;
a = 5;
b = 10;
c = 25;
a = (a *b)/c *25;
b = a -34
int result = b;
Revised TRecentFiles class
Added Registry support and enhanced visual representation recent file in menu.
Changed constructor:
TRecentFiles(LPCTSTR iniOrKeyName, int numSavedFiles = MaxMenuItems, int namelen = 30,
bool useRegistry=false);
Where:
iniOrKeyName - ini file name or Registry
filename:
example:
ini file name:
"some file"
registry name: "Software\\OWL NExt\\MRUTest"
numSavedFiles - number
files shown in menu and saved to registry.
namelen
- maximal
file length as it will be shown if menu
useRegistry - Use
registry if true, for compatibility reasons default false
Get example mru.zip
Additions in TDecoratedFrame and
TFrameWindow
Additions in TFrameWindow => support for Control Bar switching:
This are base do nothing functions
void
SetBarDescr(TBarDescr* barDescr, TAutoDelete = AutoDelete);
const TBarDescr* GetBarDescr() const;
virtual bool MergeBar(const
TBarDescr& childBarDescr);
virtual bool RestoreBar();
Additions in TDecoratedFrame => support for Control Bar switching:
virtual bool MergeBar(const TBarDescr& childBarDescr);
virtual bool RestoreBar();
virtual bool CreateBar();
Actual implementation of ControlBar switching
Additional Functions:
void
SetBarCreator(const TGadgetWndFunctor& funct);
void SetBarInserter(const
TBarInsertFunctor& funct);
TGadgetWndFunctor* GetBarCreator();
TBarInsertFunctor* GetBarInserter();
TGadgetWndFunctor -> function callback property called in CreateBar()
to create ControlBar, default implementation:
static TGadgetWindow* CreateToolBar(TWindow* wnd)
{
return new TControlBar(wnd);
}
To replace it you have to define function like this
TGadgetWindow* CreateToolBar(TWindow* wnd)
{
return new TDockableControlBar(wnd);
}
or
TGadgetWindow* TMyWindow::CreateToolBar(TWindow* wnd)
{
returnnew TDockableControlBar(wnd);
}
And use for function
frame->SetBarCreator(TGadgetWnd_FUNCTOR(CreateToolBar));
or for member function
frame->SetBarCreator(TGadgetWnd_MFUNCTOR(this,&TMyWindow::CreateToolBar))
TBarInsertFunctor -> called in CreateBar() to Insert ControlBar, default
implementation:
bool EvBarInserter(TDecoratedFrame& frame,
TGadgetWindow& destWindow, TAbsLocation loc)
{
// Setup the toolbar ID
destWindow.Attr.Id = IDW_TOOLBAR;
if(frame.GetHandle())
destWindow.Create();
frame.Insert(destWindow, TDecoratedFrame::TLocation(loc));
return true;
}
To replace it, you have to define function like this
bool EvBarInserter(TDecoratedFrame& frame,
TGadgetWindow& destWindow, TAbsLocation loc)
{
return ..;
}
or
bool TMyApplication::EvBarInserter(TDecoratedFrame& frame,
TGadgetWindow& destWindow, TAbsLocation loc)
{
Harbor = new THarbor(frame);
TDockable* dockable = TYPESAFE_DOWNCAST(&destWindow,
TDockable); // not checked, maybe REINTERPRET_CAST
if(!dockable)
return false;
Harbor->Insert(*dockable, loc);
return true;
}
And use for function
frame->SetBarInserter(TBarInsert_FUNCTOR(EvBarInserter));
or for member function
frame->SetBarInserter(TBarInsert_MFUNCTOR(this,&TMyApplication::EvBarInserter));
Additions in TApplication
typedef int (*TMessageBox)(HWND wnd, LPCTSTR text, LPCTSTR caption, uint type);
Global funcitons:
_OWLFUNC(TMessageBox) SetDefMessageBox(TMessageBox);
_OWLFUNC(int) OWLMessageBox(HWND wnd, LPCTSTR text, LPCTSTR caption, uint type);
_OWLFUNC(int) OWLMessageBox(TWindow* wnd, TResId resId, LPCTSTR caption, uint type,
TModule* module = 0);
New functions to change default MessageBox
New member function of TApplication:
int MessageBox(HWND wnd, uint resId, LPCTSTR caption=0, uint type = MB_OK, ...);
Enhanced TAnimateCtrl
bool Open(LPCTSTR fileOrRes, TModule* module=0); - Added TModule where
look for resource, Only for new Commctrl.dll
TCheckListItem and TCheckList
Numerous enhancement, see source and example
TDecoratedFrame
// Virtuals from TFrameWindow
virtual bool MergeBar(const TBarDescr& childBarDescr);
virtual bool RestoreBar();
virtual bool CreateBar();
virtual TGadgetWindow* GetControlBar();
TObjProperty<TGadgetWndFunctor> BarCreator;
TObjProperty<TBarInsertFunctor>
EvBarInsert;
TDialog
Added handler for WM_WINDOWPOSCHANGED.
TView
New functions:
virtual TBarDescr* GetViewBar();
void SetViewBar(TBarDescr* bar);
TEdit
New Functions:
void Scroll(int horizontalUnit, int verticalUnit);
void ScrollCaret(); // EM_SCROLLCARET
int LineDown();
// EM_SCROLL, SB_LINEDOWN Scrolls down one line.
int LineUp(); // EM_SCROLL, SB_LINEUP
Scrolls up one line.
int PageDown(); // EM_SCROLL, SB_PAGEDOWN
Scrolls down one page.
int PageUp(); // EM_SCROLL, SB_PAGEUP
Scrolls up one page.
EvUpDown() - UpDown handler
throw out GetHahdle()/SetHandle(), it now only GetMemHandle()/SetMemHandle()
valid
TRichEdit
New functionality:
Added GetSearchData().Flags |= FR_HIDEUPDOWN, because Search
Up Down isn't suppoted by RichEdit.
Added percistent stream support
Implemented SetOleInterface(), it was but empty
TNoteTab
New functionality:
Added recal/invalidation atc.,
Added Scroller
TPoint, TPointL, TPointF, TRect
New functionality:
Default constructor initialize to 0 all member.
TPalette
New functionality:
Added sdupport for Save/Load for *.pal, *.dib,*.aco,*.act formats.
TSearatorGadget
New functionality:
Aded 3 parameter in constructor show separator, and added Property
ShowSeparator;
TMenuGadget
New functionality:
Added support for flat style
TGlyphButton
New functionality:
Revised All TGlyphButton
Added new predefined styles, atc.
TListWindow
New functionality:
Added new GetItemRect(int index, TRect&, TItemRectType); should replase
GetItemRect(int index, LPRECT, TItemRectType);
Revized some functions look for OWL5_COMPAT
TScroll
New functionality:
void SetWindow(TWindow* win) now virtual
Added: virtual bool
EnableScrollBar(uint flags=SB_BOTH, uint arrow=ESB_ENABLE_BOTH);
Added: virtual void
ShowScrollBar(int code, bool show=true);
TBrush
New functionality:
TBrush::TBrush(const TColor& color, bool useCache=true) -
added parameter to constructor, use caching of brush, if you use TBrush object for all
time of programm run, you can consider do not put HANDLE of brush in cache.
Revised: February 08, 2000.