~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/debugger/gui/TiaZoomWidget.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Mario Iseli
  • Date: 2006-04-08 18:38:25 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060408183825-vu1jk57rk929derx
* New Maintainer (Closes: #361345)
* New upstream release (Closes: #349725)
* Build-Depend now on libslang2-dev (Closes: #325577)
* Complete rebuild of debian/, upgraded to policy-standards
  3.6.2 and compat-level 5.
* Removed stellarc since stella only reads ~/.stellarc and even
  works without a first config.
* New debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//============================================================================
 
2
//
 
3
//   SSSS    tt          lll  lll       
 
4
//  SS  SS   tt           ll   ll        
 
5
//  SS     tttttt  eeee   ll   ll   aaaa 
 
6
//   SSSS    tt   ee  ee  ll   ll      aa
 
7
//      SS   tt   eeeeee  ll   ll   aaaaa  --  "An Atari 2600 VCS Emulator"
 
8
//  SS  SS   tt   ee      ll   ll  aa  aa
 
9
//   SSSS     ttt  eeeee llll llll  aaaaa
 
10
//
 
11
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
 
12
//
 
13
// See the file "license" for information on usage and redistribution of
 
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
 
15
//
 
16
// $Id: TiaZoomWidget.hxx,v 1.4 2006/02/22 17:38:04 stephena Exp $
 
17
//
 
18
//   Based on code from ScummVM - Scumm Interpreter
 
19
//   Copyright (C) 2002-2004 The ScummVM project
 
20
//============================================================================
 
21
 
 
22
#ifndef TIA_ZOOM_WIDGET_HXX
 
23
#define TIA_ZOOM_WIDGET_HXX
 
24
 
 
25
class GuiObject;
 
26
class ContextMenu;
 
27
 
 
28
#include "Widget.hxx"
 
29
#include "Command.hxx"
 
30
 
 
31
 
 
32
class TiaZoomWidget : public Widget, public CommandSender
 
33
{
 
34
  public:
 
35
    TiaZoomWidget(GuiObject *boss, const GUI::Font& font, int x, int y);
 
36
    virtual ~TiaZoomWidget();
 
37
 
 
38
    void loadConfig();
 
39
    void setPos(int x, int y);
 
40
 
 
41
  protected:
 
42
    void handleMouseDown(int x, int y, int button, int clickCount);
 
43
    bool handleKeyDown(int ascii, int keycode, int modifiers);
 
44
    void handleCommand(CommandSender* sender, int cmd, int data, int id);
 
45
 
 
46
    void drawWidget(bool hilite);
 
47
    bool wantsFocus() { return true; }
 
48
 
 
49
  private:
 
50
    void zoom(int level);
 
51
    void recalc();
 
52
 
 
53
  private:
 
54
    ContextMenu* myMenu;
 
55
 
 
56
    int myZoomLevel;
 
57
    int myNumCols, myNumRows;
 
58
    int myXoff, myYoff;
 
59
    int myXCenter, myYCenter;
 
60
};
 
61
 
 
62
#endif