libyui
 
Loading...
Searching...
No Matches
YImage.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YImage.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YImage_h
26#define YImage_h
27
28#include "YWidget.h"
29#include <string>
30
31
32class YImagePrivate;
33
37class YImage : public YWidget
38{
39public:
47 const std::string & imageFileName,
48 bool animated = false );
49
53 virtual ~YImage();
54
59 virtual const char * widgetClass() const { return "YImage"; }
60
64 std::string imageFileName() const;
65
70 bool animated() const;
71
78 virtual void setImage( const std::string & imageFileName, bool animated = false );
79
83 void setMovie( const std::string & movieFileName )
84 { setImage( movieFileName, true ); }
85
92 bool hasZeroSize( YUIDimension dim ) const;
93
103 void setZeroSize( YUIDimension dim, bool zeroSize = true );
104
109 bool autoScale() const;
110
117 virtual void setAutoScale( bool autoScale = true );
118
119
120private:
121
123};
124
125
126#endif // YImage_h
Definition ImplPtr.h:43
YImage(YWidget *parent, const std::string &imageFileName, bool animated=false)
Definition YImage.cc:56
std::string imageFileName() const
Definition YImage.cc:72
void setMovie(const std::string &movieFileName)
Definition YImage.h:83
bool animated() const
Definition YImage.cc:78
virtual const char * widgetClass() const
Definition YImage.h:59
virtual void setAutoScale(bool autoScale=true)
Definition YImage.cc:110
virtual void setImage(const std::string &imageFileName, bool animated=false)
Definition YImage.cc:84
void setZeroSize(YUIDimension dim, bool zeroSize=true)
Definition YImage.cc:97
bool hasZeroSize(YUIDimension dim) const
Definition YImage.cc:91
bool autoScale() const
Definition YImage.cc:104
virtual ~YImage()
Definition YImage.cc:66
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YImage.cc:33