~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/embedding/browser/powerplant/source/CIconServicesIcon.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
 *
 
3
 * The contents of this file are subject to the Mozilla Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/MPL/
 
7
 * 
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 * 
 
13
 * The Original Code is the Mozilla browser.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is Netscape
 
16
 * Communications, Inc.  Portions created by Netscape are
 
17
 * Copyright (C) 1999, Mozilla.  All Rights Reserved.
 
18
 * 
 
19
 * Contributor(s):
 
20
 *   Conrad Carlen <ccarlen@netscape.com>
 
21
 */
 
22
 
 
23
#ifndef __CIconServicesIcon_h__
 
24
#define __CIconServicesIcon_h__
 
25
 
 
26
#include <LControl.h>
 
27
 
 
28
class CIconServicesIcon : public LControl
 
29
{
 
30
public:
 
31
        enum { class_ID = FOUR_CHAR_CODE('CISC') };
 
32
 
 
33
                           CIconServicesIcon(const SPaneInfo&   inPaneInfo,
 
34
                                                 MessageT                       inValueMessage,
 
35
                                             OSType             inIconType,
 
36
                                             SInt16             inIconResID);
 
37
                                                   CIconServicesIcon(LStream*   inStream);
 
38
 
 
39
        virtual                            ~CIconServicesIcon();
 
40
 
 
41
    // LPane
 
42
    virtual void            DrawSelf();
 
43
    virtual void            EnableSelf();
 
44
    virtual void            DisableSelf();
 
45
    
 
46
    // LControl
 
47
    SInt16                  FindHotSpot(Point   inPoint) const;
 
48
    Boolean                 PointInHotSpot(Point                inPoint,
 
49
                                                                           SInt16           inHotSpot) const;
 
50
    void                    HotSpotAction(SInt16    inHotSpot,
 
51
                                              Boolean   inCurrInside,
 
52
                                              Boolean   inPrevInside);
 
53
    void                            HotSpotResult(SInt16 inHotSpot);    
 
54
        
 
55
        // CIconServicesIcon
 
56
protected:
 
57
    void                    Init();              
 
58
 
 
59
    void                    AdjustIconRect(Rect& ioRect) const;
 
60
 
 
61
        void                    GetIconRef();
 
62
        void                    ReleaseIconRef();
 
63
            
 
64
protected:
 
65
    OSType                  mIconType;
 
66
    SInt16                  mIconResID;
 
67
    IconAlignmentType       mAlignmentType;
 
68
    
 
69
    IconRef                 mIconRef;
 
70
    bool                    mbIsPressed;
 
71
 
 
72
    static OSType           mgAppCreator;
 
73
    static FSSpec           mgIconFileSpec;
 
74
};
 
75
 
 
76
#endif // __CIconServicesIcon_h__