# CompanyWindow Struct Reference

Window with general information about a company. More...

Inheritance diagram for CompanyWindow:

## Public Member Functions

| CompanyWindow (const WindowDesc *desc, WindowNumber window_number)
virtual void | OnPaint ()
| This window is currently being repainted.
virtual void | OnClick (Point pt, int widget)
| A click with the left mouse button has been made on the window.
virtual void | OnHundredthTick ()
| Called once every 100 (game) ticks.
virtual void | OnPlaceObject (Point pt, TileIndex tile)
| The user clicked some place on the map when a tile highlight mode has been set.
virtual void | OnPlaceObjectAbort ()
| The user cancelled a tile highlight mode that has been set.
virtual void | OnQueryTextFinished (char *str)
| The query window opened from this window has closed.

## Data Fields

CompanyWindowWidgets | query_widget

## Detailed Description

Window with general information about a company.

Definition at line 1245 of file company_gui.cpp.

## Member Function Documentation

virtual void CompanyWindow::OnClick | ( | Point | pt,
|  | int | widget |
| ) |  |  | `[inline, virtual]`

A click with the left mouse button has been made on the window.

Parameters:

  | pt | the point inside the window that has been clicked.
  | widget | the clicked widget.

Reimplemented from Window.

Definition at line 1331 of file company_gui.cpp.

References _ctrl_pressed, BringWindowToFrontById(), CMD_BUY_SHARE_IN_COMPANY, CMD_MSG, CMD_SELL_SHARE_IN_COMPANY, CS_ALPHANUMERAL, DoCommandP(), DoSelectCompanyManagerFace(), INVALID_TILE, Window::InvalidateWidget(), Window::LowerWidget(), MarkWholeScreenDirty(), MAX_LENGTH_COMPANY_NAME_BYTES, MAX_LENGTH_COMPANY_NAME_PIXELS, MAX_LENGTH_PRESIDENT_NAME_BYTES, MAX_LENGTH_PRESIDENT_NAME_PIXELS, QSF_ENABLE_DEFAULT, ShowQueryString(), and VHM_RECT.

virtual void CompanyWindow::OnPlaceObject | ( | Point | pt,
|  | TileIndex | tile |
| ) |  |  | `[inline, virtual]`

The user clicked some place on the map when a tile highlight mode has been set.

Parameters:

  | pt | the exact point on the map that has been clicked.
  | tile | the tile on the map that has been clicked.

Reimplemented from Window.

Definition at line 1416 of file company_gui.cpp.

References CMD_BUILD_COMPANY_HQ, CMD_MSG, DoCommandP(), and Window::RaiseButtons().

virtual void CompanyWindow::OnQueryTextFinished | ( | char * | str | ) | `[inline, virtual]`

The query window opened from this window has closed.

Parameters:

  | str | the new value of the string or NULL if the window was cancelled.

Reimplemented from Window.

Definition at line 1429 of file company_gui.cpp.

References CMD_MSG, CMD_RENAME_COMPANY, CMD_RENAME_PRESIDENT, and DoCommandP().

The documentation for this struct was generated from the following file:

- src/company_gui.cpp