Commit Graph

163 Commits

Author SHA1 Message Date
Marcus Overhagen 0b0ecfab90 Added "const" to many parameters.
Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates.
Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized.
Removed some function call overhead.
Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter,


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 23:17:40 +00:00
Marcus Overhagen a20cecff60 removed unnecessary use of const_cast<> and (global) do_playback() function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 18:37:55 +00:00
Axel Dörfler cf2aeb201f * Implemented BDragger::{Show|Hide}AllDraggers() and its backend in the app_server.
This fixes bug #242. The value is currently stored in a separate file.
* Removed some unused codes from ServerProtocol.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-21 07:57:21 +00:00
Stefano Ceccherini c733893846 Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse() 
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-29 07:01:08 +00:00
Michael Lotz f3001f6a1d Corrected comments. It's a 0 byte, not a NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 22:02:01 +00:00
Michael Lotz 3379428150 * Made UTF8 functions overflow safe
* Unified UTF8CountChars and UTF8ToLength and removed the latter
* Rewrote UTF8CountBytes to use the more safe algorithm from UTF8CountChars
* Removed the unsafe count_utf8_bytes() function

This should fix bug #839. Marcus can you please review?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 21:58:00 +00:00
Stefano Ceccherini 0c48fc7c74 Enable state synching for ServerPictures. Fixes bug 520
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-28 14:52:51 +00:00
Axel Dörfler 2628e60cbc Moved BMenuWindow, BMenuFrame, and BMenuScroller into the BPrivate namespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-22 11:52:18 +00:00
Stefano Ceccherini 27cc25083e First try at menu scrolling, courthesy of Łukasz Zemczak. Works more or less, although a bit buggy
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-20 20:19:55 +00:00
Stefano Ceccherini 7022e7903a added license
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-13 07:28:19 +00:00
Jérôme Duval 94acebc5d2 fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-12 23:25:40 +00:00
Stefano Ceccherini 420fe80e5c Moved picture data writing to its own class, thus simplifying code in
various places. Implemented SetLineMode op for BPicture, fixed shape 
drawing (I accidentally broke it in the previous commit).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-12 20:00:36 +00:00
Stefano Ceccherini ab757c7a3a our BPicture stream format wasn't compatible with R5 one.
Hopefully fixed all the problems. Reported by 
Marc Flerackers. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-09 21:53:45 +00:00
Stefano Ceccherini 938519a667 oops forgot to commit this
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 21:34:59 +00:00
Stefano Ceccherini 2f9eca855a moved Shape related defines to their own header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 21:20:38 +00:00
Stefano Ceccherini e372c1ba81 renaming...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-23 09:28:44 +00:00
Michael Pfeiffer 5c3281f91b Write print job to spool file. Not tested under Haiku. Seems to work fine with a simple R5 test application.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-08 18:08:12 +00:00
Axel Dörfler e04ec8626e * UTF8ToCharCode() only skipped 3 bytes for a 4 byte character.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 22:20:18 +00:00
Ithamar R. Adema d3eab0eb78 * Fix typo in declaration of BStringColumn.
(Args were declared: width,maxWidth,minWidth while the last 2 ones were the other way around)




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-09 22:04:16 +00:00
Ithamar R. Adema f9d5f90ecc Added missing ColumnTypes.cpp/.h to sourcetree, and added it to the build.
This should make our BColumnListView completely usable.
(ColumnTypes files were taken from imkit SVN)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-09 17:09:25 +00:00
Stefano Ceccherini 931aebe962 Deleting replicants now works
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-07 19:16:50 +00:00
Jérôme Duval 58ad2aba29 added BColumnListView to libbe.so
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-26 15:53:41 +00:00
Stefano Ceccherini cd39decc44 Added a filter to MenuField, so that mousedown messages caught by the inner menubar are redirected to the BMenuField's MouseDown() like happens on beos. That way we can track and invalidate correctly. Implemented Show/HidePopUpMarker
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-28 07:48:53 +00:00
Stefano Ceccherini c8773f97a0 Invalidate less in BMenuBar::FrameResized() and a bit more in _BMCMenuBar_::FrameResized(), removed unused _BMCItem_
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-10 19:29:35 +00:00
Stefano Ceccherini 7dce0c352e Removed unused stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-28 20:22:28 +00:00
Axel Dörfler 93820f1ea7 Renamed moreUTF8.h to utf8_functions.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 10:16:19 +00:00
Axel Dörfler 6d5488e18a * There is now a server_read_only_memory structure that is placed in a (surprise!)
read-only area shared between the Desktop and all applications.
* Right now, this area only contains the desktop colors, ie. B_PANEL_BACKGROUND_COLOR
  etc.; ui_color() no longer needs to ask the server for these colors.
* The ui_colors are now maintained by DesktopSettings, though ColorSet is still there.
* The default colors are now hardcoded once and for everyone in InterfaceDefs.h, ie.
  the app_server uses them as well.
* Desktop::Init() can now also return an error (but that is not yet accounted for).
* Cleaned up InterfaceDefs.h.
* Fixed wrong include in moreUTF8.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-25 20:12:06 +00:00
Axel Dörfler 621a832488 * Renamed ViewAux.h header to ViewPrivate.h.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-23 15:55:15 +00:00
Stefano Ceccherini 05e515d56c hopefully improved menu tracking. Among other things, this fixes bug 461
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 17:56:21 +00:00
Axel Dörfler 21c8c925d8 * With Rudolf's information about relocating overlays, I changed the way memory
is managed for those bitmaps:
  - the shared client memory mechanism is used to allocate a small overlay_client_data
    structure that contains the actual buffer and a semaphore that you have acquire in
    order to access it.
  - LockBits()/UnlockBits() now have a function: you need to call them before accessing
    the overlay buffer, and you need to keep that lock until you're done with it.
* The overlay cookie is now an extra member of the ServerBitmap class.
* Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated
  with the bitmap.
* ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay
  color instead of any contents (this is currently in ugly pink, but will become some
  dark color later on).
* All what's missing from actually being able to use overlays now is to configure
  them so that they are shown on screen. VLC will now show an empty pink window when
  overlay video is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 16:41:12 +00:00
Stefano Ceccherini ce1efe4ce6 forgot to commit this changed header, sorry
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-15 12:55:39 +00:00
Stefano Ceccherini 4185bd8b34 Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 13:06:47 +00:00
Stephan Aßmus af3ac4e80f replaced usage of floor() and ceil() to convert from
BRect to clipping_rect with simple C casts. I think this
is more adequate, since clipping_rects are used for
pixel indices. This change fixes some graphics problems too,
it appears that cursor coords are fractional on Haiku, even
with a normal mouse. In Playground, this resulted in the
hit points being rendered wrongly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-19 22:26:17 +00:00
Stephan Aßmus 8e89843efc * when the client constrained the clipping on a view, the server used to
take an empty region as an indication to remove the clipping, but on R5,
  this is actually valid... this patch fixes the problem
* the ViewState::clipping_region is now consistently used to memorize
  the user defined clipping of the view state instead of being sometimes
  used to cache the current view clipping


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 18:57:44 +00:00
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
beveloper 65f8356f78 added missing newline
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 19:57:20 +00:00
Stefano Ceccherini ac41b0f103 Added license
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-09 11:07:35 +00:00
Stefano Ceccherini 64e8448a05 Removed some fields, simplified the header. Added the license
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-09 07:59:42 +00:00
Stefano Ceccherini e064995715 Removed an unneeded dependency
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-18 07:37:38 +00:00
Stefano Ceccherini f1569dbb9e Moved some headers here so they can be included by Globals.cpp in the interface kit folder
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-15 07:15:37 +00:00
DarkWyrm 89c2c01ab5 Replaced _view_attr with ViewAttr class to remove a crash
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-07 22:10:52 +00:00
DarkWyrm 8ed6b7e48b Tweaked a def to remove a conflict with Accelerant.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-22 00:43:16 +00:00
Stefano Ceccherini d8a7172a91 simplified rects_intersect(). Now it's very similar to BRect::Intersects()
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 10:50:41 +00:00
Stefano Ceccherini 4be90e7fc1 Fixed a possible buffer overflow in r_or() and r_sub() (thanks to Ingo Weinhold for his advices), stripped BRegion of all his friends, and moved them into a single class (BRegion::Support()). Removed "find_small_bottom()", as we didn't use it at all. Added some debugging output to BRegion::Support (that will help fixing bugs)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-24 07:33:41 +00:00
Ingo Weinhold b8bd561224 Needs to include the R5_Session.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-19 19:42:52 +00:00
Stefano Ceccherini cafaa5aa29 Added a BDirectWindow implementation which works with BeOS R5 (at least, with the Chart demo app)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-18 13:39:39 +00:00
Stefano Ceccherini 8d1a0ee7c1 Fixed a bug in BRegion copy constructor. If one constructed a BRegion with
BRegion region(region), the region would have been put into an unitialized state. Took the chance to cleanup a bit the code, using some methods of clipping.h. Changed the way offset_rect works, and changed its name too. Added a note to Region.cpp


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-05 10:16:34 +00:00
DarkWyrm 6a746063c9 Added app-side font list support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-01 17:06:11 +00:00
Adi Oanca 6bcec3643b Helper definitions for BWindow class
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 17:23:10 +00:00
Adi Oanca d061757a51 Helper definitions for BView class
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 17:22:46 +00:00
Stefano Ceccherini e6404469ad added offsect_rect, fixed a spelling error
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-22 09:12:56 +00:00