LgiClasses.h File Reference

Gui class definitions Copyright (C) 1997-2004, Matthew Allen. More...

#include "GSemaphore.h"
#include "GLibrary.h"
#include "LgiOsClasses.h"
#include "GArray.h"
#include "LgiCommon.h"
#include "GXmlTree.h"
#include "GDragAndDrop.h"
#include "GMenu.h"
#include "LgiWidgets.h"
#include "Progress.h"
#include "GProgress.h"
#include "GFileSelect.h"
#include "GFindReplaceDlg.h"
#include "GToolBar.h"
#include "GThread.h"
#include "GClipBoard.h"
#include "GInput.h"
#include "GPrinter.h"

Go to the source code of this file.

Classes

class  GTarget
 Virtual base class for receiving events. More...
class  GViewFill
 Fill colour definition. More...
struct  GAppArguments
 Optional arguments to the GApp object. More...
class  GApp
 Singleton class for handling application wide settings and methods. More...
class  GView
 The base class for all windows in the GUI. More...
class  GLayout
 A GView with scroll bars. More...
class  GWindow
 A top level window. More...
class  GToolTip
 Puts a tool tip on screen when the mouse wanders over a region. More...
class  GSplitter
 Displays 2 views side by side. More...
class  GTrayIcon
 Put an icon in the system tray. More...
class  GAlert
 A BeOS style alert window, kinda like a Win32 MessageBox. More...
class  DoEvery
 Timer class to help do something every so often. More...
class  GViewFactory
 Factory for creating view's by name. More...
struct  GDisplayInfo

Defines

#define LgiProcessId()   (LgiApp->GetProcessId())
 Returns the current process ID.
#define LgiApp   (GApp::ObjInstance())
#define SysFont   (LgiApp->SystemNormal)
#define SysBold   (LgiApp->SystemBold)
#define LgiCloseApp()   LgiApp->Exit(false)
#define GV_EDGE_TOP   0x0001
#define GV_EDGE_RIGHT   0x0002
#define GV_EDGE_BOTTOM   0x0004
#define GV_EDGE_LEFT   0x0008
#define IDC_VSCROLL   14000
 Id of the vertical scroll bar in a GLayout control.
#define IDC_HSCROLL   14001
 Id of the horizontal scroll bar in a GLayout control.
#define GIC_OWNER_DRAW   0x01
 Client draws the content.
#define GIC_ASK_TEXT   0x02
 Column header is text.
#define GIC_ASK_IMAGE   0x04
 Column header is an image.
#define GIC_OWN_LIST   0x08
 Not used.
#define GIC_IN_DRAG_OP   0x10
 Drag is over the control.
#define GMouseEvents   0x01
#define GKeyEvents   0x02

Enumerations

enum  GWindowZoom { GZoomMin, GZoomNormal, GZoomMax }
 The available states for a top level window. More...

Functions

LgiFunc void LgiExitApp ()
LgiFunc COLOUR LgiColour (int Colour)
 Returns a 24bit representation of a system colour.
LgiFunc int LgiMsg (GViewI *Parent, char *Msg, char *Title=0, int Type=MB_OK,...)
 Displays a message box.
bool LgiGetDisplays (GArray< GDisplayInfo * > &Displays, GRect *AllDisplays=0)


Detailed Description

Gui class definitions Copyright (C) 1997-2004, Matthew Allen.

Author:
Matthew Allen
Date:
19/12/1997

Define Documentation

#define GKeyEvents   0x02

#define GMouseEvents   0x01

#define GV_EDGE_BOTTOM   0x0004

FindLargestEdge parameter

See also:
GView::FindLargest(GRegion &, int)

Referenced by GView::FindLargestEdge().

#define GV_EDGE_LEFT   0x0008

FindLargestEdge parameter

See also:
GView::FindLargest(GRegion &, int)

Referenced by GView::FindLargestEdge().

#define GV_EDGE_RIGHT   0x0002

FindLargestEdge parameter

See also:
GView::FindLargest(GRegion &, int)

Referenced by GView::FindLargestEdge().

#define GV_EDGE_TOP   0x0001

FindLargestEdge parameter

See also:
GView::FindLargest(GRegion &, int)

Referenced by GView::FindLargestEdge(), and GToolBar::Pour().

#define LgiApp   (GApp::ObjInstance())

 
#define LgiCloseApp (  )     LgiApp->Exit(false)

Closes the application gracefully.

This actually causes GApp::Run() to stop processing message and return.

Referenced by GDocApp< OptionsFmt >::OnCommand(), GWindow::OnRequestClose(), and GDocApp< OptionsFmt >::SetLanguage().

#define SysBold   (LgiApp->SystemBold)

Returns a bold system font pointer.

Warning:
Don't use this before you have created your GApp object. i.e. in a constructor of a global static class which is initialized before the main begins executing.

Referenced by GFilterView::OnPaint().

#define SysFont   (LgiApp->SystemNormal)

Returns a system font pointer.

Warning:
Don't use this before you have created your GApp object. i.e. in a constructor of a global static class which is initialized before the main begins executing.

Referenced by GFont::Create(), GAlert::GAlert(), GFontSystem::GetBestFont(), GListColumn::GetContentSize(), GView::GetFont(), GMenu::GetFont(), GInput::GInput(), GListColumn::Name(), GListItem::OnMeasure(), GRadioButton::OnPaint(), GRadioGroup::OnPaint(), GDropDown::OnPaint(), GFilterView::OnPaint(), GCombo::OnPaint(), GListColumn::OnPaint_Content(), GFilterView::OnPosChange(), and GView::SetFont().


Enumeration Type Documentation

The available states for a top level window.

Enumerator:
GZoomMin  Minimized.
GZoomNormal  Restored/Normal.
GZoomMax  Maximized.


Function Documentation

LgiFunc COLOUR LgiColour ( int  i  ) 

Returns a 24bit representation of a system colour.

You can use the macros R24(), G24() and B24() to extract the colour components

Parameters:
i  The system colour to return.
See also:
The define LC_BLACK and those that follow in LgiDefs.h

LgiFunc void LgiExitApp (  ) 

Exits the application right now!

Warning:
This will cause data loss if you have any unsaved data. Equivilant to exit(0).

bool LgiGetDisplays ( GArray< GDisplayInfo * > &  Displays,
GRect AllDisplays = 0 
)

Returns infomation about the displays attached to the system.

Returns:
non-zero on success.
Parameters:
Displays  [out] The array of display info structures. The caller should free these objects using Displays.DeleteObjects().
AllDisplays  [out] Optional bounding rectangle of all displays. Can be NULL if your don't need that information.

Referenced by GView::MoveOnScreen().

LgiFunc int LgiMsg ( GViewI *  Parent,
char *  Msg,
char *  Title = 0,
int  Type = MB_OK,
  ... 
)

Displays a message box.

Returns:
The button clicked. The return value is one of IDOK, IDCANCEL, IDYES or IDNO.
Parameters:
Parent  The parent view or NULL if none available
Msg  The message's text. This is a printf format string that you can pass arguments to
Title  The title of the message box window
Type  The type of buttons below the message. Can be one of: MB_OK, MB_OKCANCEL, MB_YESNO or MB_YESNOCANCEL.

References List< Type >::First(), IDCANCEL, IDNO, IDOK, IDYES, List< Type >::Insert(), DLinkList::Length(), LGI_MET_DECOR_Y, LGI_OS_WIN9X, LgiApp, MB_OK, MB_OKCANCEL, MB_YESNO, MB_YESNOCANCEL, List< Type >::Next(), GView::X(), and GView::Y().


Generated on Wed Dec 1 15:41:01 2010 for Lgi by  doxygen 1.5.7.1