Commit Graph

79 Commits

Author SHA1 Message Date
Michael Lotz bdc6f9e7ef * Fixed a swapping bug for 16 bit colorspaces
* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 23:53:33 +00:00
Michael Lotz b09e53fae0 Wrote a new color conversion engine. It's 2-5 times faster than the old one (depending on colorspaces) and about half in size.
I've put it into ColorConversion.cpp and moved PaletteConverter there too, cleaning up Bitmap.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 05:01:15 +00:00
Stefano Ceccherini 2c11ec31c8 BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:31:09 +00:00
Stefano Ceccherini da2e259d76 added a constant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:10:33 +00:00
Michael Lotz 20a4e7265c * Changed the AGGTextRenderer to use the new UTF8 handling
* Added more char codes to is_white_space(), should be all I think

Sorry if I stepped on your toes Stephan, but I wanted these changes flushed before I leave for holidays :-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-23 09:04:26 +00:00
Stefano Ceccherini 38690d41b0 Renamed TPicture class to PicturePlayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 21:38:53 +00:00
Michael Lotz 9e7948f45e * Fixed locking of the FT_Face by moving it into Get/PutTransformedFace()
* Removed the FaceGetter as it was only needed for locking
* Cleaned up TruncateString()
* Fixed a typo in moreUTF8.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 17:42:18 +00:00
Michael Lotz db5734a452 More work on the BFont special functions.
* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

In other words, ServerFont is now cleaned and handles UTF8 pretty efficiently. Some ToDo's are still left though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 23:36:59 +00:00
Stefano Ceccherini 61ba5a32c1 Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at 
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 22:27:46 +00:00
Stefano Ceccherini 9e8d2dd28b Removed PicturePlayer, it only contains code duplicated from TPicture. Some cleanups for BPicture. This commit also completes previous commit for BMenu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:39:07 +00:00
Stefano Ceccherini f9f970d98c Yesterday's commit triggered some other visual bugs: hopefully fixed them all. A disabled menufield now doesn't open its associated menu anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 09:31:27 +00:00
Stefano Ceccherini d69c048704 No longer needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:13:31 +00:00
Axel Dörfler 71b550889e Moved dw_sync_data to a private header DirectWindowPrivate.h and renamed it to direct_window_sync_data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:36:38 +00:00
Stefano Ceccherini a410e190a4 Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:12:10 +00:00
Axel Dörfler a817d6ad5a * (tried to) implemented RootLayer::ResizeBy() and activated AS_SET_SCREEN_MODE again;
it works in the test environment, but I haven't yet tested it on real hardware.
* moved PrivateScreen.h to src/kits/interface/ - it's not used outside of that one.
* moved reading the color map from the BPrivateScreen constructor to the ColorMap()
  method.
* improved/cleaned server/client communication for the screen stuff a tiny bit.
* fixed the GetBitmap() method I implemented yesterday.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 11:01:02 +00:00
Axel Dörfler 292d5ced0e * Rewrote shortkey handling - it now actually works as expected.
* Some work on _DetermineTarget(), more to come.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 16:13:06 +00:00
Axel Dörfler b2cc345461 More font work:
* Simplified server communication a bit: instead of separate queries for font
  direction, "is fixed", ... there is now a private extra flags field that is
  filled on demand.
* The server command names now describe what the command does, and are not simply
  named after the BFont method (AS_SET_FAMILY_AND_STYLE vs. AS_GET_FAMILY_AND_STYLE_IDS).
* Replaced B_SET_SYSFONT_{PLAIN|BOLD|FIXED} with a single B_GET_SYSTEM_FONTS.
* Rewrote Font.h and added our license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:02:39 +00:00
Axel Dörfler 34597b9215 Moved WindowInfo.h from private/app to private/interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:33:13 +00:00
Axel Dörfler 34ce0e42d4 As it turns out, window_info::type is really the window's "feel".
Basic support for the desktop window feel: WinBorder will now resize
a window with kDesktopWindowFeel to span over the whole screen.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 20:28:40 +00:00
Stephan Aßmus 2e6a5805ba MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 16:30:53 +00:00
Axel Dörfler ef79db4f7c Doh, two times in a row... forgot to update ViewAux.h.
Changes from BView refactoring.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 00:22:01 +00:00
Axel Dörfler 80a230b10e Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly
- renamed ViewAttr to ViewState and put it into the BPrivate namespace
- some refactoring (moved some private BView methods to ViewState)
- renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore)
- exchanged BView::originX/Y with fParentOffset (BPoint)
- divided AS_LAYER_GET_COLORS into separate ones for high/low/view color
- BView::SetPattern() now actually works as expected (ie. updates
  only if necessary)
- exchanged the ViewAttr::flags with ViewState::valid_flags which inverses
  the previous logic (which wasn't even used consistently)
- fState was initialized twice (incorrectly by the ViewAttr constructor,
  and then again correctly by initCachedState()) - now the ViewState
  constructor does the job alone, but correctly
- BView::PushState() no longer resets the state (it did so only locally
  anyway...)
- cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 18:56:55 +00:00
Stefano Ceccherini 4b7db694ce RetraceSemaphore() doesn't need to be public
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-25 05:40:59 +00:00
Stephan Aßmus cf5ff0c0d0 fixed memory corruption in the stuff I added to moreUTF8. This fixes GetEscapement crashes. The rest of the file needs reviewing as well, but I wanted to commit this ASAP
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 17:09:00 +00:00
Adi Oanca 15409bba6e added a todo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-10 15:55:49 +00:00
Stefano Ceccherini 88da217a0b Added a header with menu actions defines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-07 13:34:50 +00:00
Stephan Aßmus 442992bf26 fixed some pretty bad bugs that prevented menus from working (they now do): The BMessage* in AddShortcut is taken in responsibility by the BWindow, so we cannot directly use the message from BMenuItem, the be_app was locked in InitData but never unlocked, it fixes BMenus only working once, and who knows what else it fixes. A little cleanup with _BCmdKey usage, also note that it is inefficient to RemoveItem()s from a list in the destructor of any class using a BList as data container! Simply delete the items and be done with it. The BList destructor will take care of the rest and free its storage in one go.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-07 13:19:28 +00:00
DarkWyrm 2e1184a6e4 Undid a change from r12937 to fix building libbe.so
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-05 01:15:26 +00:00
Stephan Aßmus 59345e264f huge cleanup, support for SetSizeLimits, support for truncating strings, numerous decorator bug fixes, Layer does not draw when view color is B_TRANSPARENT_COLOR, cleaner dispatching of mouse events to the WinBorder in RootLayer, commented the char map selection in the font server, as it seems glyph lookup by unicode index works much better with the default map
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:50:30 +00:00
Stefano Ceccherini 59cbc87ad8 RegionSupport accepts, as parameters, references to BRegions (consts when possible) instead of pointers. Note: this is not a functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 08:34:08 +00:00
Stephan Aßmus 7220b138f2 fixed confusion of byteCount and charCount in ServerFont::StringWidth(), just in case anyone really uses it later. Added UTF8CountChars() to moreUTF8.h, but then I didn't need it...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:51:33 +00:00
Stephan Aßmus 1db49f8a7a added a function to count the bytes in a string if the number of UTF8 chars is already known
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-13 17:30:59 +00:00
Jérôme Duval a21ddd6d4e added a dependency on Window.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 16:45:31 +00:00
Jérôme Duval 1b6e740f1e kMenuWindowLook is actually a kMenuWindowFeel
Added private flags


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 13:54:30 +00:00
Jérôme Duval 31d6118e45 Added a private header for window looks, types, feels
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 11:05:21 +00:00
Stefano Ceccherini a3dff518f0 Updated header
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-04 13:00:33 +00:00
Stefano Ceccherini 92044c244d Removed the frame parameter from BMenuWindow
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 16:05:46 +00:00
Stefano Ceccherini 446b8c194e Moved BMenuWindow to its own file
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-27 09:05:16 +00:00
Stefano Ceccherini fd99e7194c Made the (private) 'JAHA' message a constant, and moved it to ViewAux.h. Maybe it doesn't fit much in there, but I didn't want to create a new header just for it. Feel free to move it to a better place.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-23 14:03:28 +00:00
Stefano Ceccherini a2fab5626d Added a debugger call in case the reallocation fails.
We can't handle an allocation failure there (at least for now). Took the chance to stylize the code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-04 08:53:46 +00:00
Jérôme Duval 5c99440e0f Added ColorTools and ColumnListView from Vision cvs repository
(ColorTools.h : 1.2, ColorTools.cpp : 1.4,
ColumnListView.h : 1.13, ColumnListView.cpp : 1.3)
Original code from OpenTracker


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-16 20:42:34 +00:00
Stefano Ceccherini e13bd0e1a8 Reverted to the original comment, as I had worked on an older version of this file.
Took the chance to add the license header.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 07:36:57 +00:00
Stefano Ceccherini 0cc992995e Changed some parameters to be passed through const reference [A change suggested by Christian Packmann]. This gives a nice speed boost.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-24 06:31:36 +00:00
Jérôme Duval 5202ba9d64 added a function signature
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-29 13:33:51 +00:00
Jérôme Duval f04e3de28c extern "C" not needed, don't know why
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-27 10:28:44 +00:00
Jérôme Duval 372a42ffb8 Added a header for our global private input functions. (JBurton again)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-27 10:25:07 +00:00
Stefano Ceccherini 61c93e14bc Researched and removed a TODO item
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-09 07:13:03 +00:00
Stefano Ceccherini edc6e254f3 Fixed the outstanding BRegion bug. It turned out that rects_intersect() returned true in some cases when called with an invalid clipping_rect. Added an ASSERT() call to BRegion::_AddRect(), which would've saved my day.
Added some comments


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-01 06:16:00 +00:00
Stefano Ceccherini a5f7275d76 Adding some more or less complete classes from Marc Flerackers
(BDragger, BShelf and ZombieReplicantView). Not yet added to the build


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 12:20:32 +00:00
beveloper 54c0657bab another build fix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 17:43:32 +00:00