FbWindow is a FbDrawable
This commit is contained in:
parent
e76c16bc15
commit
d9467066a9
2 changed files with 9 additions and 73 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbWindow.cc,v 1.11 2003/04/25 17:32:21 fluxgen Exp $
|
||||
// $Id: FbWindow.cc,v 1.12 2003/04/29 08:51:59 fluxgen Exp $
|
||||
|
||||
#include "FbWindow.hh"
|
||||
#include "EventManager.hh"
|
||||
|
@ -163,59 +163,6 @@ void FbWindow::raise() {
|
|||
XRaiseWindow(s_display, m_window);
|
||||
}
|
||||
|
||||
void FbWindow::copyArea(Drawable src, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
unsigned int width, unsigned int height) {
|
||||
if (window() == 0 || src == 0 || gc == 0)
|
||||
return;
|
||||
XCopyArea(s_display,
|
||||
src, window(), gc,
|
||||
src_x, src_y,
|
||||
dest_x, dest_y,
|
||||
width, height);
|
||||
}
|
||||
|
||||
void FbWindow::fillRectangle(GC gc, int x, int y,
|
||||
unsigned int width, unsigned int height) {
|
||||
if (window() == 0 || gc == 0)
|
||||
return;
|
||||
XFillRectangle(s_display,
|
||||
window(), gc,
|
||||
x, y,
|
||||
width, height);
|
||||
}
|
||||
|
||||
void FbWindow::drawRectangle(GC gc, int x, int y,
|
||||
unsigned int width, unsigned int height) {
|
||||
if (window() == 0 || gc == 0)
|
||||
return;
|
||||
XDrawRectangle(s_display,
|
||||
window(), gc,
|
||||
x, y,
|
||||
width, height);
|
||||
}
|
||||
|
||||
void FbWindow::fillPolygon(GC gc, XPoint *points, int npoints,
|
||||
int shape, int mode) {
|
||||
if (window() == 0 || gc == 0 || points == 0 || npoints == 0)
|
||||
return;
|
||||
XFillPolygon(s_display,
|
||||
window(), gc, points, npoints,
|
||||
shape, mode);
|
||||
}
|
||||
|
||||
void FbWindow::drawLine(GC gc, int start_x, int start_y,
|
||||
int end_x, int end_y) {
|
||||
if (window() == 0 || gc == 0)
|
||||
return;
|
||||
XDrawLine(s_display,
|
||||
window(),
|
||||
gc,
|
||||
start_x, start_y,
|
||||
end_x, end_y);
|
||||
}
|
||||
|
||||
int FbWindow::screenNumber() const {
|
||||
return m_screen_num;
|
||||
}
|
||||
|
|
|
@ -19,21 +19,21 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbWindow.hh,v 1.11 2003/04/25 17:31:38 fluxgen Exp $
|
||||
// $Id: FbWindow.hh,v 1.12 2003/04/29 08:51:27 fluxgen Exp $
|
||||
|
||||
#ifndef FBTK_FBWINDOW_HH
|
||||
#define FBTK_FBWINDOW_HH
|
||||
|
||||
#include "FbDrawable.hh"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
namespace FbTk {
|
||||
|
||||
class Color;
|
||||
|
||||
/**
|
||||
Wrapper for X window
|
||||
*/
|
||||
class FbWindow {
|
||||
/// Wrapper for X window
|
||||
class FbWindow: public FbDrawable {
|
||||
public:
|
||||
FbWindow();
|
||||
FbWindow(const FbWindow &win_copy);
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
void setName(const char *name);
|
||||
void setEventMask(long mask);
|
||||
/// clear window with background pixmap or color
|
||||
void clear();
|
||||
virtual void clear();
|
||||
/// assign a new X window to this
|
||||
virtual FbWindow &operator = (Window win);
|
||||
virtual void hide();
|
||||
|
@ -72,21 +72,10 @@ public:
|
|||
virtual void lower();
|
||||
virtual void raise();
|
||||
|
||||
void copyArea(Drawable src, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
unsigned int width, unsigned int height);
|
||||
void fillRectangle(GC gc, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
void drawRectangle(GC gc, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
void fillPolygon(GC gc, XPoint *points, int npoints,
|
||||
int shape, int mode);
|
||||
void drawLine(GC gc, int start_x, int start_y,
|
||||
int end_x, int end_y);
|
||||
|
||||
const FbWindow *parent() const { return m_parent; }
|
||||
Window window() const { return m_window; }
|
||||
inline Window window() const { return m_window; }
|
||||
inline Drawable drawable() const { return window(); }
|
||||
int x() const { return m_x; }
|
||||
int y() const { return m_y; }
|
||||
unsigned int width() const { return m_width; }
|
||||
|
|
Loading…
Reference in a new issue