Commit Graph

46478 Commits

Author SHA1 Message Date
Stephan Aßmus
df10644048 HaikuDepot: MarkupParser: Fixed off-by-one error...
... when finishing a paragraph to include the last character.
2013-09-07 00:14:29 +02:00
Stephan Aßmus
59b52a1163 HaikuDepot: Added very simplistic markup parser.
* Follows MediaWiki or TracWiki style.
 * Supports only level 2 headings, bold, italic and top-level
   bullet paragraphs.
 * Line break handling would need to be changed.
 * Outputs a TextDocument.
2013-09-07 00:12:01 +02:00
Stephan Aßmus
c6a0782a8f HaikuDepot: Paragraph: Added IsEmpty(). 2013-09-07 00:12:00 +02:00
Stephan Aßmus
720f7fdf54 HaikuDepot: ParagraphLayout: Fix work around
* Bail early if the TextSpan length is 0.
 * When the span starts with a space, the work
   around for the app_server bug, which I should fix,
   needs to offset by the other delta.
2013-09-07 00:11:59 +02:00
Jérôme Duval
8a1f303840 ffmpeg: release the reader context on destruction.
* avformat_open_input() is to be balanced with a avformat_close_input().
* should help with #9945.
2013-09-06 23:36:58 +02:00
Jérôme Duval
ba654b1b91 virtio_pci: try at fixing build on Haiku x86_64
see #9912.
2013-09-06 17:16:07 +02:00
Stephan Aßmus
d94326b1c6 HaikuDepot: CharacterStyle: SetBold() and SetItalic()
* Added convenience methods to derive the bold and italic
   font face from the currently set font. May not yield
   results depending on wether a specific face is available
   for the font.
 Ü * Changed test accordinly.
2013-09-06 10:49:37 +02:00
Stephan Aßmus
e75fda0202 HaikuDepot: List.h: Coding style fix 2013-09-06 10:10:39 +02:00
Stephan Aßmus
00861147be HaikuDepot: Removed first iteration of text layout classes. 2013-09-06 10:04:04 +02:00
Stephan Aßmus
8d0c791d5f HaikuDepot: Switched TextView to use new ParagraphLayout
* The ParagraphStyle can be set as well.
2013-09-06 10:04:03 +02:00
Stephan Aßmus
822872d6c3 Paragraph: Added Clear() method to remove all TextChunks. 2013-09-06 10:04:02 +02:00
Evgeniy Abdraimov
fcc745e0e7 Reopening FreeBSD's compat devices was broken due to a missing flag
clear. Patch part of #7040. Thanks.
2013-09-06 01:11:31 +02:00
Stephan Aßmus
6576e6c774 HaikuDepot: Text stuff: Support for simple bullet lists.
Also:
 * Fixed off-by-one bug when extracting wrapped TextSpans until the
   line's end text offset.
 * ParagraphStyle::FirstLineInset() is now additional to LineInset().
 * Potential Bullet::Spacing() is added to all lines as inset.
2013-09-05 22:07:44 +02:00
Stephan Aßmus
ccfedbc4fa HaikuDepot: text stuff: Layout all document paragraphs.
* Use TextDocumentLayout in TextDocumentView.
 * Extend test case demonstrating paragraphs with
   different alignments, something unsupported in
   BTextView.
2013-09-05 18:07:14 +02:00
Stephan Aßmus
8e8d1b55d3 ParagraphLayout: Don't ignore the given drawing offset. 2013-09-05 18:06:39 +02:00
Stephan Aßmus
f1a08c0848 HaikuDepot: ParagraphLayout: Alignment and justify support. 2013-09-05 16:54:28 +02:00
Stephan Aßmus
169de499b5 HaikuDepot: Removed no longer needed info from GlyphInfo. 2013-09-05 15:52:55 +02:00
Stephan Aßmus
68dfaf0f9d HaikuDepot: New TextDocumentView and test app.
* TextDocumentView still only shows the first paragraph
   of a TextDocument, but this time using the new
   ParagraphLayout. A class for layouting all paragraphs
   of a TextDocument is up next.
 * A simple test app shows that TextSpans with different
   CharacterStyles already work in one Paragraph. The test
   is nowhere extensive and does not test for bugs in
   corner cases.
2013-09-05 13:26:15 +02:00
Stephan Aßmus
24523b867b HaikuDepot: ParagraphLayout: Debugged and now working.
* The biggest problem was that adding the wrapped
   sub-TextSpan to the LineInfos was missing. Other
   problems included missing handling of ascent and
   descent per CharacterStyle.
2013-09-05 13:24:31 +02:00
Stephan Aßmus
4b810a1e92 HaikuDepot: TextDocument: Added Paragraph access by index. 2013-09-05 13:24:01 +02:00
Stephan Aßmus
d922357fa1 HaikuDepot: CharacterStyle: Added convenience methods 2013-09-05 13:21:32 +02:00
Stephan Aßmus
15990b01a2 HaikuDepot: Text stuff: ParagraphLayout compiles and maybe works 2013-09-05 10:59:39 +02:00
Stephan Aßmus
f668e7dd19 HaikuDepot: Text stuff: Switched from TextStyle to CharacterStyle 2013-09-05 10:59:03 +02:00
Stephan Aßmus
036fabe903 HaikuDepot: List: Changed parameter order for Replace()
(index first)
2013-09-05 10:58:16 +02:00
Stephan Aßmus
a452d51705 HaikuDepot: Text stuff: Added line spacing to ParagraphStyle 2013-09-05 10:57:19 +02:00
Stephan Aßmus
2b7ea89d14 HaikuDepot: Give access to glyph spacing
* The implementation for the get-accessors was missing
   from CharacterStyle.
2013-09-05 10:23:11 +02:00
John Scipione
9fc9619079 ScreenSaver: Set target for turn off display checkbox
I noticed while testing the nightly on vmware which, unlike vbox, includes
a video driver with DPMS support that this checkbox wasn't working.
This should fix it.
2013-09-04 11:14:07 -04:00
John Scipione
9bf1ba7dcf ScreenSaver: Just for good measure allow 4 lines of text here.
... just in case a long translation needs an extra line to fit
(in English 3 is enough) and because we've got enough room next
to the screen image to fit another line of text anyway.
2013-09-04 11:10:02 -04:00
John Scipione
28a2faa30a ScreenSaver: use ceilf instead of ceil
... to restrict to single float precision. This is a little pedantic and silly
but bare with me for the sake of consistency.
2013-09-04 11:06:30 -04:00
Stephan Aßmus
bc61e26366 USB HID: Restore previous handler sorting.
* Since additional handlers put themself in the front the
   handler list, asking the tablet handler last actually puts
   its handler in the first position, as before my changes.
2013-09-04 09:53:41 +02:00
Stephan Aßmus
72c029ea37 USB HID: Changed/removed wrong comment.
* The HID driver publishes devices for all handlers that claim
   to know how to work with a device. I see how that is good for
   a combo device like keyboard with built-in touch pad or a single
   USB receiver for a keyboard and mouse. But I wonder about devices
   that publish multiple alternative HID configurations. I think
   my Wacom Tablet has a configuration for a regular mouse and the
   configuration for the actual tablet. And the driver should publish
   a device for one, but not the other. I also don't see in the code
   how a specific configuration is made the active one before the
   protocol is used.
2013-09-04 09:53:07 +02:00
Siarzhuk Zharski
42cb481fe4 StyledEdit:supress unlock if the file is on RO volume
Show the "Read-only" status for documents that are living on read-only
volumes and do not show unlock menu for such files.

* The enhancement pointed out by Sergei Reznikov (Diver). Thanks!
2013-09-03 20:41:16 +02:00
Stephan Aßmus
6e47dfbeaf USB HID: Split out tablet support into TabletProtocolHandler
* The previous approach of combining tablet and mouse support
   in MouseProtocolHandler was unintuitive and had the potential
   problem that if a device has multiple HID descriptors, one
   simulating a simple mouse, that one may be found first and
   there is no mechanism of choosing the best handler for a device.
   Now we can look for tablets before looking for mice.
 * Implement pressure, eraser and tilt support. Untested. This
   mostly comes from the patch in #7354, but eraser support should
   work more like intended by the Be API.
 * It appears that my Wacom Intuos 2 cannot be accessed via the
   HID framework, except as regular mouse. So I couldn't actually
   test these changes. I believe what worked before, i.e. QEMU
   absolute mouse position support, should work as good as before.
   Please shout if not!
 * If more recent Wacom tablets /could/ work with these changes,
   they will not, because the HID driver still explicitely ignores
   Wacom devices and the dedicated Wacom driver will not pick up
   newer devices, with its hard-coded and un-generic device support.
2013-09-03 17:55:02 +02:00
Stephan Aßmus
526e95c5cd USB HID: Fixed warnings about unused variables. 2013-09-03 17:54:13 +02:00
John Scipione
2019bf1e17 ScreenSaver: Tweak the text height...
because the bottom of decenders was getting cut off in some locales
on the 3rd line of text.
2013-09-02 21:48:49 -04:00
John Scipione
b75fe9ba8e Screensaver: fix this tricky bit of logic 2013-09-02 20:01:42 -04:00
John Scipione
d9acbaf0dc ScreenSaver: Timeout if window won't lock. Fixes #4260.
If we fail to lock the window in the kInitialTickRate time, quit the thread.
We were deadlocking causing #4260 because you could open several
threads by moving through the screen saver list quickly all trying to lock
the same window at the same time, classic deadlock.
2013-09-02 19:44:45 -04:00
John Scipione
fa3651781a ScreenSaverRunner: Style fixes
Also update copyright info, add myself to authors list alphabetically.
2013-09-02 19:44:42 -04:00
John Scipione
58aaae827b ScreenSaver: Correct typo
Should be Copyright 2013 not 20013
2013-09-02 19:44:41 -04:00
Siarzhuk Zharski
82055c267b Terminal:send resize notify on attaching window to view
During adding the second tab the view in the first one may change its
lines count in case the Terminal window was maximized. Send resize
notification to client rpogram on every reattaching view to window.

Fixes #9809
2013-09-02 20:15:07 +02:00
Siarzhuk Zharski
b0044e4437 Temrinal Prefs: update color control on scheme change
Update the color control state on the scheme change event
Fixes #9864.
2013-09-02 20:15:04 +02:00
John Scipione
709172a02d ScreenSaver: Convert to layout APIs
This allows the ScreenSaver window grow and shrink based on your
font size and translations.

Minimum is 446 px x 325 px so that there is enough space to accommodate
screen savers designed for BeOS.

Should fix #7369 and help #7332 a bit.

Margins go right to the edge now which prevents the tab view from looking
as liney.

Password window has also been converted to use the layout APIs, also,
the window now pops up in the center of the main ScreenSaver window.

The fade translations will have to be redone unfortunately, but it should be
easy as it is the concatenation of the previous strings.
2013-09-02 13:39:41 -04:00
John Scipione
23ca081a2f ScreenSaver: Style fixes
Update Copyright year and fix authors adding myself.
Mostly spacing and indentation fixes.
2013-09-02 13:18:36 -04:00
Stephan Aßmus
15a557e69c HaikuDepot: Re-implemented TextLayout as ParagraphLayout
* Completely unfininished and untested, won't even compile,
   but is not included in the build. The idea being to wrap TextSpan
   objects and split them onto Lines each containing their own
   layouted TextSpan chunks. TextLayout will later be repurposed
   to off-load the layout of individual text paragraphs to
   ParagraphLayouts.
2013-09-02 12:15:18 +02:00
Stephan Aßmus
947ba26bd0 HaikuDepot: Redesign TextStyle as CharacterStyle ...
... following the example set by ParagraphStyle and
 ParagraphStyleData.
2013-09-02 12:15:17 +02:00
Stephan Aßmus
621cb2bf13 HaikuDepot: Fix passing back cloned StyleData objects
* In the methods that create a new style data object
   by cloning the object and changing the respective
   property, returning a Reference to a style data
   object makes it easier on the calling side to deal
   with the same object being returned or a new one.
2013-09-02 12:15:16 +02:00
Stephan Aßmus
6f1dbba164 HaikuDepot: Paragraph: Added Length() method. 2013-09-02 12:15:15 +02:00
Stephan Aßmus
4710193014 HaikuDepot: Work-in-progress on a TextDocument class.
* This is mostly still targeted at the use-case of parsing
   some mark up text and building a static representation
   of the styled document which can be layouted and rendered.
 * Lots of TODOs and almost nothing is tested.
2013-09-02 12:15:15 +02:00
Stephan Aßmus
fcf16d33e4 HaikuDepot: Fixed spelling of ascent and descent nouns 2013-09-02 12:15:14 +02:00
John Scipione
01f623b00f Leaves: Don't save the control, already have value.
I was looking at the Leaves screensaver for reference and I noticed
this peculiarity. It saves a pointer to each slider control
just so that it can later read their values, but, the values are
already provided in the message in the be:value property, so just
use that instead.
2013-09-02 02:53:50 -04:00