Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Lamp::Keyboard Class Reference

キーボード More...

#include <Keyboard.h>

Inheritance diagram for Lamp::Keyboard:

Lamp::KeyboardKey List of all members.

Public Member Functions

virtual int getKeyCount () const
 キー数の取得

virtual bool pressed (Key key) const
 キーが押されているか

virtual bool down (Key key) const
 キーが下がった

virtual bool up (Key key) const
 キーが上がった

virtual String getName () const
 名前の取得

virtual bool isAttached () const
 アタッチされているか

virtual bool isPolled () const
 ポーリングが必要か

virtual String toString () const
 文字列への変換

virtual void clear ()
 クリア

virtual bool setCooperativeLevel (bool exclusive, bool foreground)
 協調レベルの設定

virtual bool isExclusive () const
 排他モードか

virtual bool isForeground () const
 フォアグラウンドモードか


Protected Member Functions

 Keyboard (KeyboardDevice *device)
 コンストラクタ

virtual ~Keyboard ()
 デストラクタ

virtual void setNextState (const KeyboardState &state)
 次のステート設定

virtual const KeyboardStategetState ()
 ステートの取得


Friends

class LampInput
class BufferedInput

Detailed Description

キーボード

Definition at line 38 of file Keyboard.h.


Member Function Documentation

virtual bool Lamp::Keyboard::down Key  key  )  const [inline, virtual]
 

キーが下がった

Parameters:
key キー
Returns:
キーが下がったならばtrue

Definition at line 61 of file Keyboard.h.

References Lamp::KeyboardState::keyPressed().

Referenced by Lamp::SimpleFramework::frameworkRun(), Lamp::BasicFramework::frameworkRun(), and toString().

virtual int Lamp::Keyboard::getKeyCount  )  const [inline, virtual]
 

キー数の取得

Returns:
キー数

Definition at line 47 of file Keyboard.h.

References Lamp::InputDevice::getButtonCount().

Referenced by toString().

virtual String Lamp::Keyboard::getName  )  const [inline, virtual]
 

名前の取得

Returns:
名前

Definition at line 79 of file Keyboard.h.

References Lamp::InputDevice::getProductName().

Referenced by toString().

virtual const KeyboardState& Lamp::Keyboard::getState  )  [inline, protected, virtual]
 

ステートの取得

Returns:
ステート

Definition at line 151 of file Keyboard.h.

virtual bool Lamp::Keyboard::isAttached  )  const [inline, virtual]
 

アタッチされているか

Returns:
アタッチされていればtrue

Definition at line 85 of file Keyboard.h.

References Lamp::InputDevice::isAttached().

Referenced by toString().

virtual bool Lamp::Keyboard::isExclusive  )  const [inline, virtual]
 

排他モードか

Returns:
排他モードならtrue

Definition at line 121 of file Keyboard.h.

References Lamp::InputDevice::isExclusive().

virtual bool Lamp::Keyboard::isForeground  )  const [inline, virtual]
 

フォアグラウンドモードか

Returns:
フォアグラウンドモードならtrue、バックグラウンドモードならfalse

Definition at line 127 of file Keyboard.h.

References Lamp::InputDevice::isForeground().

virtual bool Lamp::Keyboard::isPolled  )  const [inline, virtual]
 

ポーリングが必要か

Returns:
ポーリングが必要ならtrue

Definition at line 91 of file Keyboard.h.

References Lamp::InputDevice::isPolled().

Referenced by toString().

virtual bool Lamp::Keyboard::pressed Key  key  )  const [inline, virtual]
 

キーが押されているか

Parameters:
key 対象キー
Returns:
キーが押されていればtrue

Definition at line 54 of file Keyboard.h.

References Lamp::KeyboardState::keyPressed().

Referenced by Lamp::BasicFramework::frameworkRun(), and toString().

virtual bool Lamp::Keyboard::setCooperativeLevel bool  exclusive,
bool  foreground
[inline, virtual]
 

協調レベルの設定

Parameters:
exclusive 排他モードならtrue
foreground フォアグラウンドモードならtrue
Returns:
成功すればtrue

Definition at line 113 of file Keyboard.h.

References Lamp::KeyboardDevice::setCooperativeLevel().

void Lamp::Keyboard::setNextState const KeyboardState state  )  [protected, virtual]
 

次のステート設定

Parameters:
state 次のステート

Definition at line 40 of file Keyboard.cpp.

String Lamp::Keyboard::toString  )  const [virtual]
 

文字列への変換

Returns:
文字列

Definition at line 46 of file Keyboard.cpp.

References down(), Lamp::String::format(), getKeyCount(), getName(), isAttached(), isPolled(), Lamp::KeyboardKey::Key, Lamp::KeyboardKey::keyToString(), Lamp::KeyboardKey::maxKeyCount, pressed(), and up().

virtual bool Lamp::Keyboard::up Key  key  )  const [inline, virtual]
 

キーが上がった

Parameters:
key キー
Returns:
キーが上がったならばtrue

Definition at line 70 of file Keyboard.h.

References Lamp::KeyboardState::keyPressed().

Referenced by toString().


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:47 2005 for Lamp by doxygen 1.3.2