Commit Graph

18 Commits

Author SHA1 Message Date
David Capello
4b7bf5b835 Merge she::Color and ui::Color types in gfx::Color 2014-06-28 16:10:39 -03:00
David Capello
901b2acc06 Remove some references to <allegro.h> 2014-06-28 11:17:22 -03:00
David Capello
5bbff161b9 Now ui::Graphics uses she::Surface instead of Allegro BITMAP 2014-06-26 22:14:39 -03:00
David Capello
dbad153698 Add she::Font class (wrapper of Allegro FONT)
This is an huge refactor to avoid handling Allegro FONT directly. Some
changes:
* Add she::System::defaultDisplay/Font, createRgbaSurface, loadSurface,
  and loadRgbaSurface.
* Rename she::CreateSystem/Instance to she::create_system/instance.
* Remove ui/font.cpp and move ui/fontbmp.cpp to she library.
* ui::IButtonIcon uses she::Surface instead of BITMAP.
* Rename she::LockedSurface::drawAlphaSurface -> drawRgbaSurface
* Rename ui::SetDisplay -> set_display
* Rename _ji_font_text_len -> ui::Graphics::measureUIStringLength
2014-06-22 18:53:14 -03:00
David Capello
af4e714360 More painting code from ji_screen to ui::Graphics
We planned to migrate everything to ui::Graphics to port the program to
other back-end (e.g. SDL or Allegro5). This is one step forward to that
direction.

Changes:
- Delete a lot of deprecated functions from src/ui/draw.h/cpp and SkinTheme
  that used BITMAP/ji_screen.
- Rename ui::ji_move_region to ui::_move_region
- Move ui::jwidget_get_texticon_info to ui::Widget::getTextIconInfo.
  Now the member function returns client coordinate instead of absolute
  ones.
- ui::drawTextBox() now receives a ui::Graphics instead of a BITMAP
- Add ui::Graphics::drawChar/measureChar() member functions.
- Replace ui::jrectexclude() with with ui::Graphics::fillAreaBetweenRects()
2014-04-19 15:18:16 -03:00
David Capello
78ce233756 Fix header of files distributed under the terms of the MIT license 2014-03-29 20:08:05 -03:00
David Capello
04f3c522ba Replace jwidget_get_text_length/height with Widget::getTextWidth/Height
Renamed Widget::getTextSize to Widget::getTextLength as now getTextSize
returns a gfx::Size() (not the strlen() of the text)
2014-03-21 19:45:35 -03:00
David Capello
dbf4d0d490 Replace JRect/jrect struct with gfx::Rect
- Replaced Widget::rc -> Widget::m_bounds private member.
- Added Widget::offsetWidgets() method.
- Removed View::displaceWidgets().
2013-10-26 12:50:55 -03:00
David Capello
5b252c30f5 Add support for Unicode file names on Windows
- Fixed issue #46: open .png files with Unicode chars
- Fixed issue #150: ability to uncompress program in folders w/Unicode chars
- Added base::utf8_iterator
- Added base::FileHandle
- Added base::get_app_path()
- Modified ui::KeyMessage::ascii() -> unicodeChar()
- Removed JI_NOTEXT flag
- Added app::XmlDocumentRef class and app::open_xml() function
- Added support for Unicode text exchange with Win32 clipboard
2013-10-14 19:58:11 -03:00
David Capello
cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -03:00
David Capello
c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00
David Capello
e90f86727b Remove jwidget_get_rect() and jwidget_get_child_rect() functions
+ Added Widget::getClientChildrenBounds()
+ Replaced all member functions in Theme::draw_x() to Theme::paintX()
+ Move code to draw tabs from Tabs::onProcessMessage() to Tabs::onPaint().
2013-05-20 20:40:18 -03:00
David Capello
cb0cdb3197 Rename old _ji_* functions 2013-03-30 13:38:24 -03:00
David Capello
9b8e87da10 Update copyright year to 2013 2013-01-27 12:13:13 -03:00
David Capello
a517deee0d Add ui::Color and ThemeColor, move Color to app::Color
Now colors are customizable from skin.xml file.
2013-01-06 14:45:43 -03:00
David Capello
0496f38ed3 Fix a typo in all files distributed under BSD-like and Allegro licenses
Thanks to Tobias Hansen.
2012-09-23 23:24:43 -03:00
David Capello
c6fe95231d Convert the mouse cursor into an ui::Overlay (now it support alpha channel).
- Added Cursor class and CursorType enum.
2012-08-10 23:14:54 -03:00
David Capello
55aca8567c Move src/gui/ to src/ui/ 2012-06-17 22:49:58 -03:00