dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

bullet.cc
Go to the documentation of this file.
1 /*
2  * Dillo Widget
3  *
4  * Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 
22 #include "bullet.hh"
23 
24 #include <stdio.h>
25 
26 namespace dw {
27 
29 {
30 }
31 
33 {
34  requisition->width = lout::misc::max (getStyle()->font->xHeight * 4 / 5, 1);
35  requisition->ascent = lout::misc::max (getStyle()->font->xHeight, 1);
36  requisition->descent = 0;
37 }
38 
40 {
41  int x, y, l;
42  bool filled = true;
43 
45  x = allocation.x;
47 
48  switch (getStyle()->listStyleType) {
50  view->drawRectangle (getStyle()->color,
52  false, x, y, l, l);
53  break;
55  filled = false;
56  // Fall Through
58  default:
60  filled, x + l/2, y + l/2, l, l, 0, 360);
61  }
62 }
63 
65 {
66  //return new core::TextIterator (this, mask, atEnd, "*");
68  return new core::EmptyIterator (this, mask, atEnd);
69 }
70 
71 } // namespace dw
dw::core::Allocation::y
int y
Definition: types.hh:166
dw::core::style::LIST_STYLE_TYPE_DISC
Definition: style.hh:301
dw::core::Allocation::x
int x
Definition: types.hh:165
dw::core::Requisition
Definition: types.hh:172
dw::core::Requisition::descent
int descent
Definition: types.hh:176
dw::core::Content::Type
Type
Definition: types.hh:187
dw::core::Iterator
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
dw::core::EmptyIterator
This implementation of dw::core::Iterator can be used by widgets with no contents.
Definition: iterator.hh:95
dw::core::style::LIST_STYLE_TYPE_CIRCLE
Definition: style.hh:302
dw::Bullet::sizeRequestImpl
void sizeRequestImpl(core::Requisition *requisition)
See Sizes of Dillo Widgets.
Definition: bullet.cc:32
dw::core::Widget::getStyle
style::Style * getStyle()
Definition: widget.hh:268
dw::core::View::drawRectangle
virtual void drawRectangle(style::Color *color, style::Color::Shading shading, bool filled, int x, int y, int width, int height)=0
dw::core::style::LIST_STYLE_TYPE_SQUARE
Definition: style.hh:303
lout::misc::max
T max(T a, T b)
Definition: misc.hh:20
lout::misc::min
T min(T a, T b)
Definition: misc.hh:19
dw::Bullet::iterator
core::Iterator * iterator(core::Content::Type mask, bool atEnd)
Return an iterator for this widget.
Definition: bullet.cc:64
dw::core::style::Color::SHADING_NORMAL
Definition: style.hh:725
dw::Bullet::Bullet
Bullet()
Definition: bullet.cc:28
dw::core::Widget::requisition
Requisition requisition
Size_request() stores the result of the last call of size_request_impl().
Definition: widget.hh:114
dw::core::Requisition::ascent
int ascent
Definition: types.hh:175
dw::core::View::drawArc
virtual void drawArc(style::Color *color, style::Color::Shading shading, bool filled, int centerX, int centerY, int width, int height, int angle1, int angle2)=0
dw::Bullet::draw
void draw(core::View *view, core::Rectangle *area)
Definition: bullet.cc:39
dw::core::Requisition::width
int width
Definition: types.hh:174
dw::core::Rectangle
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
dw::core::View
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
dw::core::style::Font::xHeight
int xHeight
Definition: style.hh:675
dw::core::style::StyleAttrs::font
Font * font
Definition: style.hh:492
dw::core::Allocation::ascent
int ascent
Definition: types.hh:168
dw::core::Widget::allocation
Allocation allocation
The current allocation: size and position, always relative to the canvas.
Definition: widget.hh:151
dw
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtextblock.cc:26
bullet.hh
dw::core::Allocation::width
int width
Definition: types.hh:167