---
name: "CL_GWidget"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_GWidget"
---

# CL\_GWidget(3)

## NAME

CL\_GWidget

## DESCRIPTION

/

Inherited from public CL\_GObject, public CL\_GRect

## CLASS MEMBERS

- **CL\_GWidget**()

  - **CL\_GWidget**(

  ```
  CL_GWidget* parent,
  int x,
  int y,
  int w,
  int h)
  ```

- virtual **~CL\_GWidget**()

  - void **setBackground**(

  ```
  const CL_Surface* backgrnd,
  bool tileIt = true)
  ```

- void **setColor**(

  ```
  float r,
  float g,
  float b,
  float a)
  ```

- void **setAlpha**(

  ```
  unsigned char)
  ```

- virtual void **update**()

  - void **show**()

  - void **hide**()

  - void **close**()

  - void **enable**()

  - void **disable**()

  - virtual void **resize**(

  ```
  int w,
  int h)
  ```

- **DEF\_SLOT\_1**(

  ```
  forceUpdate,
  int)
  ```

- **DEF\_SLOT\_1**(

  ```
  close,
  int)
  ```

- **DEF\_SLOT\_1**(

  ```
  hide,
  int)
  ```

- **DEF\_SLOT\_1**(

  ```
  show,
  int)
  ```

- void **blit**()

  - bool **handleEvent**(

  ```
  const CL_GEvent*)
  ```

- virtual bool **processEvent**(

  ```
  const CL_GEvent*)
  ```

- bool **needsUpdate**()

  - bool **isHidden**()

  - bool **isClosed**()

  - bool **isEnabled**()

  - CL\_Surface\* **insertChild**(

  ```
  CL_GWidget* child)
  ```

- void **removeChild**(

  ```
  CL_GWidget* child)
  ```

- CL\_GRect **getRect**()

  - CL\_GRect **globalCoord**(

  ```
  CL_GRect)
  ```

- CL\_GRect **localCoord**(

  ```
  CL_GRect)
  ```

- void **addUpdateRects**(

  ```
  std::list<CL_GRect> &updateRects)
  ```

## MEMBERS WITH DESCRIPTIONS

- **CL\_GWidget**()

  ```
  Description:
  ```

  /

- **CL\_GWidget**(

  ```
  CL_GWidget* parent,
  int x,
  int y,
  int w,
  int h)
  ```

  ```
  Description:
  ```

  /

- virtual **~CL\_GWidget**()

  ```
  Description:
  ```

  /

- void **setBackground**(

  ```
  const CL_Surface* backgrnd,
  bool tileIt = true)
  ```

  ```
  Description:
  ```

  /setting background color. void setColor(const UColor &color);

- void **setColor**(

  ```
  float r,
  float g,
  float b,
  float a)
  ```

  ```
  Description:
  ```

  /

- void **setAlpha**(

  ```
  unsigned char)
  ```

  ```
  Description:
  ```

  /screen update

- virtual void **update**()

  ```
  Description:
  ```

  /show up this widget and it´s childs.

- void **show**()

  ```
  Description:
  ```

  /hide this widget and it´s childs.

- void **hide**()

  ```
  Description:
  ```

  /close this widget and it´s childs.

- void **close**()

  ```
  Description:
  ```

  /enable this widget tree

- void **enable**()

  ```
  Description:
  ```

- void **disable**()

  ```
  Description:
  ```

- virtual void **resize**(

  ```
  int w,
  int h)
  ```

  ```
  Description:
  ```

  /

- **DEF\_SLOT\_1**(

  ```
  forceUpdate,
  int)
  ```

  ```
  Description:
  ```

  /

- **DEF\_SLOT\_1**(

  ```
  close,
  int)
  ```

  ```
  Description:
  ```

  /

- **DEF\_SLOT\_1**(

  ```
  hide,
  int)
  ```

  ```
  Description:
  ```

  /

- **DEF\_SLOT\_1**(

  ```
  show,
  int)
  ```

  ```
  Description:
  ```

- void **blit**()

  ```
  Description:
  ```

  /

- bool **handleEvent**(

  ```
  const CL_GEvent*)
  ```

  ```
  Description:
  ```

  /

- virtual bool **processEvent**(

  ```
  const CL_GEvent*)
  ```

  ```
  Description:
  ```

- bool **needsUpdate**()

  ```
  Description:
  ```

  /

- bool **isHidden**()

  ```
  Description:
  ```

  /

- bool **isClosed**()

  ```
  Description:
  ```

  /

- bool **isEnabled**()

  ```
  Description:
  ```

- CL\_Surface\* **insertChild**(

  ```
  CL_GWidget* child)
  ```

  ```
  Description:
  ```

  /

- void **removeChild**(

  ```
  CL_GWidget* child)
  ```

  ```
  Description:
  ```

- CL\_GRect **getRect**()

  ```
  Description:
  ```

- CL\_GRect **globalCoord**(

  ```
  CL_GRect)
  ```

  ```
  Description:
  ```

- CL\_GRect **localCoord**(

  ```
  CL_GRect)
  ```

  ```
  Description:
  ```

  /

- void **addUpdateRects**(

  ```
  std::list<CL_GRect> &updateRects)
  ```

  ```
  Description:
  ```

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
