1 |
/* |
/* |
2 |
* Copyright (C) 2006-2011 Andreas Persson |
* Copyright (C) 2006-2014 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
20 |
#include "regionchooser.h" |
#include "regionchooser.h" |
21 |
|
|
22 |
#include <algorithm> |
#include <algorithm> |
|
#include <sstream> |
|
23 |
|
|
24 |
#include <cairomm/context.h> |
#include <cairomm/context.h> |
25 |
#include <gdkmm/general.h> |
#include <gdkmm/general.h> |
160 |
{ |
{ |
161 |
} |
} |
162 |
|
|
|
template<class T> inline std::string ToString(T o) { |
|
|
std::stringstream ss; |
|
|
ss << o; |
|
|
return ss.str(); |
|
|
} |
|
|
|
|
163 |
void RegionChooser::invalidate_key(int key) { |
void RegionChooser::invalidate_key(int key) { |
164 |
const int h = KEYBOARD_HEIGHT; |
const int h = KEYBOARD_HEIGHT; |
165 |
const int w = get_width() - 1; |
const int w = get_width() - 1; |
212 |
Gdk::Cairo::set_source_rgba(cr, bg); |
Gdk::Cairo::set_source_rgba(cr, bg); |
213 |
cr->paint(); |
cr->paint(); |
214 |
|
|
|
const int w = get_width() - 1; |
|
|
|
|
215 |
if (clipy2 > h1) { |
if (clipy2 > h1) { |
216 |
draw_keyboard(cr, clipx1, clipx2); |
draw_keyboard(cr, clipx1, clipx2); |
217 |
} |
} |