Commit Graph

423 Commits

Author SHA1 Message Date
Stephan Aßmus 2222864eed * complete overhaul of the font/glyph caching
* the previous AGG implementation is superfluous
* the new implementation is based on that one, but in a way that allows
  read/write locking to the list of cache entries (fonts) as well as
  read/write locking to the cached glyphs per individual font cache entry
* new GlyphLayoutEngine.h, which is to be the central place for layouting
  glyphs along the baseline.
  It handles the locking for getting the font cache entries.
  It works by giving it a template class GlyphConsumer which does the
  actual work.
* changed AGGTextRenderer to use the new font cache
* changed ServerFont::StringWidth(), and the bounding box stuff to use it
* changed DrawingEngine, it doesn't need the global font lock anymore
* our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString
  is the same, which of course it isn't, hence the two separate functions...
  AsGlyphs just gets the bounding box of each glyph in a string, not treating
  the string as an actual word
  AsString adds the offset of the glyph in the word to the bounding box
* changed ServerProtocol.h accordingly for the different bounding box meaning


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 19:10:38 +00:00
Stefano Ceccherini 60be800755 Added a wrapper method to instantiate_object(), where we catch any
possible exception thrown from the constructor called by the function 
itself, for safety. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-30 14:21:41 +00:00
Stephan Aßmus ed2254308b * just realized a bug already when reading over the commit log...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:16:54 +00:00
Stephan Aßmus 582da17386 * complete reimplementation of BRegion and it's backend
I "ported" the region implementation from XOrg to work on BRegion data.

This resulted in pretty much the same code structure as before, with 
RegionSupport.cpp containing the messy details. Only now it _is_ really messy
from a code beauty point of view. I didn't exactly feel like cleaning it
up right now... but I guess I will have to.

So what does this mean - our BRegion implementation was very slow (no offense!),
and on top of that it scaled very badly with more and more rects. The new
implementation seems to be on par with the very fast R5 implementation and
the data looks exactly the same too. BRegion is very performance critical
for the app_server, and I cannot wait to try this on my slow computer...

Some changes are noteworthy: The right and bottom coordinates of
BRegion internal data are now exclusive! I inherited that from the
XOrg implementation and didn't feel like changing the code, seeing it
is probably tested quite well. The conversion is handled transparently.

Secondly, constructing a BRegion with just one rect is not invoking
malloc anymore for the member data, this makes it much more efficient
to use temporary BRegions with just one rect, both externally and internally
in the BRegion implementation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:06:28 +00:00
Axel Dörfler 70fa61adbb * Removed the _IMPEXP* stuff from the headers Ingo clearly identified as ours.
* Removed storage/Alias.h as that stuff isn't even available on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-06 10:35:17 +00:00
Stefano Ceccherini 99584ef9a2 Added _Show/_HideCaret() and used them in place of more bug-prone code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 20:20:09 +00:00
Ingo Weinhold b321303cf9 * Implemented Min/Max/PreferredSize().
* Reworked the internal layout. _ValidateLayoutData() computes and caches the
  layout related data and all other methods just use those values. Now, in
  layout-aware mode the class should properly work not only when using the
  layout items. And when using layout items, the class does actually do
  internal layout; it was basically good luck that it worked in the tests,
  before. Vertical resizing is supported, too. 
* We do a few mean tricks to get the probably mostly preferred layout behavior:
  By default our own explicit max width and that of the menu bar layout item is
  set to unlimited and the horizontal menu bar alignment to left aligned. This
  allows to horizontally resize a BMenuField beyond its preferred size,
  although both label and menu bar have a limited max width. The user can, of
  course, override those explicit sizes/alignments to get a different behavior,
  if desired.
* Fixed invalidation in SetDivider(). When having the focus, the left and top
  border of the blue frame were not invalidated.
* The label is no longer drawn at vertical position font ascent + descent
  + leading + 2 (not sure how this calculation was supposed to work), but
  vertically centers the label around the ascent. With big fonts the label is
  shown a bit too far to the bottom. Not sure how to fix this in a generic way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:38:00 +00:00
Ingo Weinhold 23b9a91178 Also override MinSize() and PreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:02:34 +00:00
Ingo Weinhold 8000c5e973 * Added layout-friendly constructor.
* Fixed invalidation in FrameResized().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:17:49 +00:00
Ingo Weinhold 4fa167e12d * Added layout-related methods (Min/Max/PreferredSize(), InvalidateLayout(),
DoLayout()).
* Don't resize the view and the window anymore, when fResizeToFit is not
  set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:15:05 +00:00
Ingo Weinhold cb968676d9 Defined B_SIZE_UNSET to -2. -1 is actually a valid size, meaning 0 pixels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 01:10:12 +00:00
Stefano Ceccherini 37ddfd14ab Shortcut characters are aligned even if there's a submenu, like
discussed in the thread in haiku-development. I added a fSubmenus member 
to BMenu, to be able to tell from BMenuItem if there are other items 
with a submenu (maintained in BMenuItem::SetSuper()). If you don't like 
this solution, let's just revert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 12:28:06 +00:00
Stefano Ceccherini fbe2f227ca Some work on menu layouts:
- Menus are generally a bit wider (BeIDE ones didn't look nice)
- The modifiers bitmap are drawn more centered vertically
- Splitted BMenu::ComputeLayout() into three methods
- Various minor changes.
The menuitems still don't look nice with bigger font sizes, but we'll 
try to fix this...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 09:10:08 +00:00
Ingo Weinhold 9eae7400a4 Implemented layout-friendly constructors. Also added MaxSize(), though it
only invokes the BView version. Didn't know what to do with MinSize() and
PreferredSize(). ATM they return fixed, hard-coded values. It might make
sense to compute something depending on the font size, for instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-10 16:52:42 +00:00
Ingo Weinhold c594b2f5f2 Added layout-friendly constructors and implemented Min/Max/PreferredSize().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:52:36 +00:00
Ingo Weinhold 6bef4a07d6 * Added default value for message in two arguments constructor.
* Removed resizing to minimum height in layout-friendly constructors.
* Cache preferred size.
* Implemented all of Min/Max/PreferredSize().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:51:15 +00:00
Ingo Weinhold a2c9eeee87 Added layout-friendly constructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-09 10:47:05 +00:00
Ingo Weinhold caf8aba2c9 * Added layout-friendly constructors and implemented Min/Max/PreferredSize(),
and DoLayout(). When the B_SUPPORTS_LAYOUT view flag is set (as is by
  default when using one of the new constructors) the BBox completely manages
  one true child (the first child that is not the label view).
* Centralized the layout related computation in new method
  _ValidateLayoutData(). The computed infos are cached in a new private
  LayoutData structure.
* GetPreferredSize() was broken in several respects. It does now return the
  same result as PreferredSize(). If B_SUPPORTS_LAYOUT is not set, these are
  the sums of the insets induces by the frame and the label. I.e. those values
  can for instance be added to the child's preferred size to compute the
  preferred size of the compound.

Not sure, if the Haiku-only TopBorderOffset() and InnerFrame() functions still
make sense. With layout management they're actually superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:40:16 +00:00
Ingo Weinhold d432839022 * Set the _RESIZE_MASK_ macro to 0xffff. It was the bitwise inverse of the
disjunction of all view flags before, and the new layout related flags were
  missing. I suppose there was not striking reason for previous method.
* Made InvalidateLayout() virtual. When implementing layout management
  directly in a derived class instead of a separate BLayout, one needs to
  override it to know when to discard cashed layout infos.
* Added a ResizeTo(BSize) method.
* Avoided ugly multi-line strings in PrintToStream().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:24:38 +00:00
Ingo Weinhold ea2dcf71dc Added BSize::Set(). BPoint and BRect feature a similar method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:16:20 +00:00
Ingo Weinhold dd5ac13b5f * Added FixSizeConstraints() functions, which adjust the elements of a (min,
max, preferred) size triple so that they are compatible with each other.
* Implemented AlignInFrame(BView*, BRect).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-08 23:14:48 +00:00
Axel Dörfler 288e17885a Implemented B_CLOSE_ON_ESCAPE as mentioned on the mailing list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-03 19:23:03 +00:00
Ingo Weinhold 476d4befd7 Added IsLayoutValid().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-15 15:38:26 +00:00
Ingo Weinhold c53b934329 Fixed indentation of the layout related methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-15 15:37:48 +00:00
Ingo Weinhold e6d2c1f310 BButton needs B_FULL_UPDATE_ON_RESIZE despite the fact that it isn't
resizable by default.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 17:01:41 +00:00
Ingo Weinhold a19a660a78 Removed the BSize(const BRect&) constructor and added BRect::Size()
instead. Also added a BRect(BPoint, BSize) constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 16:50:16 +00:00
Ingo Weinhold 7f4c0ffe9c Some more spacing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 16:24:18 +00:00
Ingo Weinhold 253599a20b Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 16:19:24 +00:00
Ingo Weinhold f2d34b2994 Added unary - operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 16:15:20 +00:00
Ingo Weinhold 0473808ce2 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 15:49:01 +00:00
Stefano Ceccherini f96bec013d small cleanups. Moved some code into a _DrawLine() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 19:49:43 +00:00
Ingo Weinhold 2c97a8d164 Use -I instead of -isystem for system header directories when building
with gcc 4. Fixed resulting build errors (gcc is more lenient for
headers in -isystem directories).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-14 20:36:42 +00:00
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
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
Axel Dörfler 815c38625d Applied patch by Vasilis Kaoutsis:
* replaced new[] with malloc()/realloc() where appropriate - since we're messing with
  the bits anyway, this makes the code slightly faster.
* however, we might want to throw some std::bad_alloc exceptions to deal correctly with
  low memory situations.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-04 13:32:36 +00:00
Ryan Leavengood e3e76a3af9 Added convenience methods to allow a group or grid layout's insets to be set
while it is being built.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-31 20:30:20 +00:00
Axel Dörfler 2a720453e1 One step closer to the Switcher - still doesn't work, though, but at least the
BWindow code looks okay now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-17 19:38:58 +00:00
Stefano Ceccherini 68fb266820 get rid of the now useless trackTime parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-16 15:22:31 +00:00
Axel Dörfler fb29f5b0fb Changes to let updates happen less frequently:
* _ContrainPoint() was broken as it could never change the point it was supposed
  to contrain.
* MouseDown() no longer sends a notification message automatically (only if it
  changed something)
* MouseMoved() and synchronous MouseDown() will now only send modification messages
  if something actually changed (not for every mouse update).
* After key presses, the invokation message is only sent when the value changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-04 14:25:13 +00:00
Stefano Ceccherini 25df172b72 Implemented auto horizontal scrolling (by fixed steps for now), moved
auto scrolling to its own method, introduced a new private 
StyledWidthUTF8Safe method.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-04 10:44:29 +00:00
Stephan Aßmus 10f6ed940b * implemented "false bold" for text rendering. It is a new property
of BFont. You can BFont::SetFalseBoldWidth(float) a width on a
  BFont object, and it will cause the glyph shapes to be run through
  an AGG "contour converter" so that they become thicker or thinner.
  IIRC, this is commonly referred to as "false bold". The "width" value
  is the distance in pixels that the new glyph outline will be offset
  from the original outline.

It would be nice if someone could look at my change to View.h with
regards to the B_FONT_ALL flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-18 05:22:13 +00:00
Stefano Ceccherini 8b91b40ae6 Try to split the tracking function into smaller ones. Please bear with
me for the absolutely UGLY names. Also, if someone can suggest better 
ones...
I seem not to have introduced any new bug. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-12 16:05:16 +00:00
Stefano Ceccherini cd1cef8aab moved synchronous waiting to _WaitMenu(). Renamed private methods to our
style guidelines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-12 14:49:32 +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
Axel Dörfler 7f721ea14d Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-14 18:08:53 +00:00
Axel Dörfler fdd0f4ce10 * Made copy constructor and assign public and implemented them.
* Added BBitmap(const BBitmap&, uint32 flags) constructor as found in Dano/Zeta.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-13 18:56:44 +00:00
Stefano Ceccherini 34633cab94 patch by Lucasz Zemczak which adds BShape drawing support to BPicture. Actually we should use a ShapeIterator subclass (like Lucasz did here) in Painter too instead of having duplicating code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 20:42:54 +00:00
DarkWyrm 59463a9aa1 Added set_ui_color to act as counterpart to ui_color.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-30 01:50:37 +00:00
Axel Dörfler e2db304337 * Added new Haiku method IsRunning().
* Rewrote header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-29 16:45:16 +00:00
Axel Dörfler fe23fb6699 * Renamed private BMenu::SelectItem() to _SelectItem(), and made its arguments a bit more sane.
* Fixed two GCC 4 warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-29 11:22:14 +00:00
Ingo Weinhold 9ecf9d1c1d Merge from layout management branch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 16:21:15 +00:00
Axel Dörfler fa407130aa Now this should nail down bug #762 pretty well: BView::GetMouse() no calls the
private BWindow::_StealMouseMessage() which makes sure only messages for the
preferred handler are stolen, and also, that nothing gets lost that shouldn't
get lost.
Also updates the fLastMouseMoved view in case the message is actually removed
due to GetMouse().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 09:52:12 +00:00
Axel Dörfler 6e0e4ca6b2 * Fixed bug that let the dragger not hide in the Deskbar (was in ListManage(), now
in _AddToList()).
* Cleaned up BDragger and BShelf a bit, moved private classes into the BPrivate
  namespace, renamed private methods to have the '_' prefix.
* Rewrote Dragger.h.
* Is that static dragger list needed at all? And if so, for what?`


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-11 19:26:37 +00:00
Axel Dörfler 2ee47d3ff9 * Made B_V_SCROLL_BAR_WIDTH & B_H_SCROLL_BAR_HEIGHT float constants.
* Added a TODO to some stuff that probably shouldn't be in a public header.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-17 19:18:38 +00:00
Jérôme Duval 860cab293d added the utf8 bullet character
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-07-13 07:38:15 +00:00
Axel Dörfler 9a3c8b14fd Rewrote BAlert button layout routine. Made it much simpler, and it's now
also font sensitive (really, it wasn't before).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-16 16:22:53 +00:00
Axel Dörfler 075e65c78c * Rewrote StatusBar.h. This fixes bug #419 due to a missing "virtual" declaration.
* More or less rewrote BStatusBar, too:
  - Draw() now only redraws something when it's part of the updateRect.
  - no more flickering (uses B_TRANSPARENT_COLOR now), this fixes bug #530.
  - added Dano/Zeta-style SetTo() method.
  - big cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-16 12:40:15 +00:00
Axel Dörfler b66c623116 * AddItem() versions did not work correctly at all: maximum insertion index
was limited by the visible list count, it did not care if the insertion
  failed, it didn't maintain the BListItem::fHasSubitems field, neither
  fVisible, and it didn't invalidate the latch of the parent, if needed.
* The "add item at end" also did not care if the item should be added to the
  visible list, too, it always did.
* AddUnder() would have crashed with a NULL superitem.
* _RemoveItem() now updates the fHasSubitems field as well.
* _SuperitemForIndex() can now return the index of the superitem as well.
* SortItemsUnder() did not check if the "underItem" if the items should be
  added to the visible list or not, it also just did.
* SortItemsUnder() now invalidates the part of the visible list that may
  have been changed.
* This fixed bug #662, and possibly #663, too (at least I could never
  reproduce it).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-13 10:11:11 +00:00
Stefano Ceccherini e061d1bae5 an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug 
594 for real and another bug in BMenuBar.  BMenuBar tracking will also 
be simplified a bit because of this. Install items to a NULL window on 
Show() as does R5 (although I don't know why yet). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-27 09:57:14 +00:00
Stephan Aßmus a502e8cd6e sorry, forgot about this change... fixes build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-27 09:28:59 +00:00
Stephan Aßmus b30e90211e added a way for BWindow to store and restore arbitrary decor settings,
currently those include only the tab location


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-25 12:01:28 +00:00
Stephan Aßmus a2a6a329e8 a bunch of ListView fixes:
* removed weird stuff that seemed to have no purpose in life
* added more comments where I had to figure things out
* fWidth is now adjusted in FrameResized()
* ListView scrolls up when items are removed at the end and
  there would be empty room
* fixed SwapItems(), MoveItem() and ReplaceItem() by making
  DoMiscellaneous() use the private implementations instead
  of calling the public ones again resulting in an endless
  loop
* renamed private methods with underscore
* removed more unused/empty private methods
* some slight performance increases here and there
* more correct tracking of fFirstSelected and fLastSelected,
  at least I cannot reproduce one crash in the WonderBrush
  Layer list anymore

even more cleanup and testing would not hurt though...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 00:12:14 +00:00
Stefano Ceccherini 925479d7b3 Added a new method RelayoutIfNeeded(), which does the real Layout invalidation, it's called by menubar and menu. This fixes the menufields not being resized. Note that a problem still remains, will be fixed shortly (hopefully)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 21:48:51 +00:00
Axel Dörfler 23ae77aa56 * Removed ColorSet, it's no longer needed or used.
* The Decorator are temporarily using ui_color() - this needs to be changed
  to use the DesktopSettings (when the decorator stuff gets refactored); right
  now, the colors are fixed.
* Added B_WINDOW_TEXT_COLOR, B_WINDOW_INACTIVE_TAB_COLOR, and
  B_WINDOW_INACTIVE_TEXT_COLOR to the UI colors, B_WINDOW_TAB_COLOR is no
  longer deprecated. Note, however, that not every decorator may use these
  colors.
* Removed unused and wrong (ie. hard-coded paths) stuff from ServerConfig.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-26 09:03:28 +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 cd0ea6ff0f * Added some of the rgb_color methods from Dano/Zeta.
* The private general_info structure is now setup - that fixes a part of bug #502;
  NetPositive's bar remains black, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-18 12:14:59 +00:00
Axel Dörfler e762848ab2 * Now draws the UpdateText() label as well (was obviously forgotten before).
To reduce the number of calls to UpdateText(), the value returned is now
  buffered. This fixes bug #443.
* SetValue() now calls UpdateText() and also invalidates the region where
  that label is drawn.
* In asynchronous mode, B_NO_POINTER_HISTORY is set now for tracking.
* Increased minimum snooze time in synchronous mode.
* Minor cleanup, renamed fMinLimitStr to fMinLimitLabel, etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-16 20:45:22 +00:00
Stephan Aßmus b57f2b537e * added handy BBitmap::Flags() method
* added NOTE to BBitmap::LockBits(), has anybody some insight into this?
  Otherwise we need to write a test app to discover its secrets... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-13 13:15:00 +00:00
Stefano Ceccherini 2191a09a93 big improvements for menus. The tracking is in many ways on par with r5, except for a few things, like diagonal movement and that grandparent bug
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 20:20:41 +00:00
Axel Dörfler 0f11085c6c * Rewrote MenuItem.h (we're no longer using Be's header).
* Renamed private SetSysTrigger() to SetAutomaticTrigger().
* Added the '_' prefix to private methods that aren't called by anything outside
  BMenuItem (ie. no friend classes either).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 13:02:52 +00:00
Axel Dörfler bd780d9935 Implemented _DrawControlChar() - for some reason, though, they get still not
drawn (glyph cache returns character 0 for them), even though FontInspector
under Dano shows those arrows in the fonts used... need to check under R5
as well. This fixes the BMenuItem part of bug #158.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 11:34:25 +00:00
Stephan Aßmus 600fbd78e4 * BView::FillRegion() sends the BRegion data instead of decomposing
it and rebuilding it on the server side (that causes a huge speed
  up for regions containing many rects)
* There is a method in ServerLink that could have been used, but I
  actually needed to add the direct BRegion support to LinkReceiver
* added LinkReceiver as a friend to BRegion class
* ServerApp and ServerWindow keep the CursorManager locked after they
  have retrieved a cursor until they have called Acquire() on the
  cursor. (Axel: what good is using atomic* stuff in Acquire() and
  Release() if we have to protect this by a lock anyways?)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-01 16:56:10 +00:00
Stephan Aßmus 306e92084c * small cleanup of Draw (less usage of ui_color() which currently
takes a trip to the server!)
* changed look of mark and submenu symbol to better fit the rest
  of the already changed controls
* the actual background color is passed to DrawMarkSymbol() and
  DrawSubmenuSymbol()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 18:20:06 +00:00
Stefano Ceccherini 65b4fb8ab1 Check if alt is the command key on BMenu::AttachedToWindow instead of doing it for every BMenuItem::Draw()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16847 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-20 20:20:29 +00:00
Axel Dörfler d3b71f5562 Who said I couldn't break the build?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-18 14:43:29 +00:00
Axel Dörfler 49fe96777b * Removed ColorUtils.cc from libbe.so - I can't think of a reason why
these should be public (they don't match any basic Be naming style
  anyway :-).
* Put the code that's used by the app_server where it's needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-15 00:22:01 +00:00
Stephan Aßmus ecf9f94800 * cleaned up fPulseRunner stuff, I have no idea why fPulseEnabled was
useful... so I removed it
* fixed memory leak with SetPulseRate(0), fPulseRunner is now
  properly freed in the Window destructor
* fTitle is now freed as well
* fix some potential leaks in BView destructor as well

I wrote a stress test app, which I'm soon going to commit as well...
it shows that not all memory leaks are fixed by this patch, I could
use some help with this...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-11 19:32:53 +00:00
Axel Dörfler f8f104b2e1 Fixed build, thanks Jerome!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-08 16:36:04 +00:00
Michael Lotz 404ccd1a92 Added extended ImportBits() to BBitmap to allow the use of BPoint offsets.
Is this too much feature creep?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 01:05:47 +00:00
Stefano Ceccherini 1a9e66f8e1 Renamed class members to fit our style guidelines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-17 10:37:04 +00:00
Axel Dörfler 35e74831d4 * Shortcut messages now add a boolean "shutdown" field to the message - this
prevents Tracker from being quit by Command+Q.
* Also, it's now possible (as on R5) to remove the Command+Q shortcut.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-15 17:21:46 +00:00
Axel Dörfler 79c35b3912 SetEnabled() didn't set the text view's colors correctly anymore; _UpdateTextViewColors()
asked for IsEnabled() before it was set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-12 01:23:30 +00:00
Axel Dörfler 7c74b12b2a * Implemented BOutlineListView::FullListSortItems() and SortItemsUnder() - dunno
what Be's implementation did wrong but instead of taking almost 30 seconds to
  sort the MIME type database (roughly 1100 entries, and yes, that's why the
  original FileTypes is that slow when it has to show the internal types), this
  one needs only 4 ms for the same task (that's an amply 7500x speedup).
* Implemented some more missing functions - it's by no means complete yet, though.
* Rewrote OutlineListView.h, ListItem.h, and StringItem.h.
* Fixed some minor bugs, but there are probably a lot more.
* Major cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-11 15:23:23 +00:00
Axel Dörfler ef4aa90f49 Added public InnerFrame() and TopBorderOffset() methods. If you don't like the
naming, please shout :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 17:07:38 +00:00
Axel Dörfler 3a3f6c1ee9 BTextControl::AttachedToWindow() set wrong colors in case the control was
disabled (unlike SetEnabled()). They are now both using the correctly working
_UpdateTextViewColors() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 15:28:49 +00:00
Axel Dörfler ffe72abd85 * Fixed BTextControl resizing (did not invalidate the border area before).
* Rewrote TextControl.h
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 14:22:33 +00:00
Stephan Aßmus c81d2e7a59 * fixed window zooming/unzooming behaviour
* fixed FrameResized() and FrameMoved() not
  being called anymore in response to ResizeTo()
  and MoveTo() since I introduced a check in
  DispatchMessage() (fixes bug #123)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 16:39:46 +00:00
Michael Lotz ec56c2c1dc Fixed and cleaned up BShape and BShapeIterator. They should now work and behave like the R5 version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 22:11:57 +00:00
Stefano Ceccherini e333843348 Added Alloc/Copy/FreeRunArray() as Axel's suggestion, and used it internally in TextView. Also fixed small memory leak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 21:22:00 +00:00
Stefano Ceccherini ccee0bb56d renamed fToken to fAreaOffset and use it instead of fArea for the area offset. Less hacky.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 20:30:31 +00:00
Stephan Aßmus 55f6067fcd * I thought it was a good idea to Flush() the server link
in all drawing methods in case the parent window was
  not in a "transaction" (fInTransaction). For ordinary
  updates, nothing has changed, but if you call drawing
  methods outside of an update, they will happen "immediately"
  rather than when the link is sporadically full and auto
  flushes. The effect is that the cursor in Terminal blinks
  reliably, the selection in BTextViews follows the mouse
  right on the spot (and so on). BWindow::BeginViewTransaction()
  and EndViewTransaction() now have a meaning in Haiku too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-12 12:22:34 +00:00
Axel Dörfler fc62f08d8a * Fixed BView::_SetShelf(), it did not remove a previous shelf.
* Fixed BShelf::_AddReplicant(), at least a bit. I managed to add the "ScreenChanger"
  icon to the tray, although the icon was not drawn, and it was on the wrong
  position.
* _AddReplicant() also did not reply to the waiting message source in case
  of failure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 21:56:26 +00:00
Axel Dörfler f17cfabc82 * Fixed BBox resizing when not attached.
* Less flickering when drawing the label: the area of the label is now
  clipped, so there is no need to fill the background again.
* Consumed the last reserved member for the bounding box of the label.
* More or less rewrote the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 18:23:48 +00:00
Axel Dörfler e351ecb78d Renamed BView::_SetViewImage() to _SetViewBitmap(), and AS_LAYER_SET_VIEW_IMAGE
to AS_LAYER_SET_VIEW_BITMAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 14:52:43 +00:00
Axel Dörfler 463e791c29 Added new window flag B_SAME_POSITION_IN_ALL_WORKSPACES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:07:47 +00:00
Axel Dörfler aa110a00e0 AttachedToWindow() could be called twice in case new views were added during
AttachedToWindow().
This fixes the double team entries in the Deskbar.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 18:04:43 +00:00
Axel Dörfler 715476b7ef The resize code now works correctly, finally - it temporarily did harm ;)
The BViews must be resized directly after every change in the window size - we
cannot wait until B_WINDOW_RESIZED, since subsequent calls have wrong view
sizes, then.
B_WINDOW_RESIZED is only really useful for app_server caused window resizing.
Added TODO to SetLook(): it may change the window size as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15385 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 23:15:48 +00:00
Axel Dörfler ac4fe990c9 * The client views are now automatically resized on B_WINDOW_RESIZED as they are in the
server.
  This saves overhead on both sides, the server doesn't need to build the update message
  for the client, and the client doesn't have to unflatten and parse another message.
* This code is actually needed for the new clipping code in the app_server, but shouldn't
  do much harm for the old app_server, either.
* Also disabled getting the bounds from the server, as that is just never needed (and would
  also break the code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-06 01:22:02 +00:00
Axel Dörfler f97761575a * GetPreferredSize() now accepts NULL arguments for "width" and "height"
* use GetFontHeight() instead of: BFont font; GetFont(&font); font.GetHeight(...)
* fixed odd unarchiving of the alignment.
* cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 17:28:18 +00:00
Axel Dörfler 6450b76dd4 Next big step in the event handling:
* RootLayer's mouse event processing is now at its minimum - the
  EventDispatcher handles them now. As a result, a window will now
  get only one message per event.
* RootLayer adds "_view_token" to mouse moved messages that specify
  the view currently under the cursor.
* There is now a mouse event layer in RootLayer that gets preferred
  when it's set - this is now used for the window moving instead of
  the previous mechanism.
* changed the previous DistributeMessage() to an UnpackMessage()
  method following Adi's suggestion.
* caveat: some things might be functionally broken in RootLayer now
  because of removing the mouse notification stuff.
* "be:transit" handling is now done completely client side by
  BWindow::_SanitizeMessage(() (similar to what the input_server does).
  This should also make the mechanism pretty robust, since every
  B_MOUSE_MOVED message can now trigger the view transit (in case a
  message is lost). B_WINDOW_ACTIVATED messages should be generated
  client side as well.
* renamed AS_LAYER_GET_MOUSE_COORDS to AS_GET_MOUSE as it's not a
  layer specific command, and also gets the mouse buttons.
* B_MOUSE_* messages from the up server now contain only a "screen_where"
  field; "where" (in window's coordinates) and "be:view_where" are
  added in BMessage::_SanitizeMessage().
* messages that don't have a valid target in the looper are now
  dropped instead of being sent to the looper - this should be done
  in BLooper as well, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-23 15:17:58 +00:00
Axel Dörfler b095201503 * changed the way a message is forwarded to the focus view (instead of adding
a suspend focus field to the message, there is now a "feed focus" field in
  case the message should be forwarded).
* added a comment to the BPoint version of _FindView() (since it's broken)
* _DistributeMessage() is now called after _DetermineTarget() - so that it
  can prevent sending the message twice to the focus view.
* removed BWindow::DoUpdate() as it's no longer used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-22 12:49:35 +00:00
Axel Dörfler 14d02d22f6 Huge cleanup and fixes:
* attachView() is now called _CreateSelf() and creates the app_server
  view counterpart for itself, and no longer for a child view.
* removed superfluous deleteView().
* moved drawing from BWindow::DoUpdate() to BView::_Draw().
* made the recursive hook call functions consistent.
* fixed BWindow::DispatchMessage() to send public messages to the intended
  target (instead of always handling them itself directly).
* DispatchMessage() no longer eats unmapped key events that were targeted
  at the window directly.
* B_KEY_DOWN and B_KEY_UP events are now send to the target view as well
  (this couldn't work before as BMessages were broken with B_PREFERRED_TOKEN).
* the default button is now correctly targeted by BWindow::_DetermineTarget()
  (previously, the enter key was hacked to get through via _HandleKeyDown()).
* removing a view now also makes sure it won't have focus any longer.
* also, the DetachedFromWindow() hooks are now called first, so that any
  changes made there cannot mess up our window anymore.
* removed BView::SetPattern(); _UpdatePattern() now does its job.
* renamend private methods to match our preferred style.
* removed unused methods and variables.
* more consistent naming overall.
* removed _PR3_COMPATIBLE_ stuff - there is definitely no need for us to be
  compatible to that one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-21 16:58:36 +00:00
Axel Dörfler 4ceb1e519c * reverted Adi's premature changes to BWindow and restored _DetermineTarget() and
task_looper() again.
* removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately,
  you don't have to do that anymore - use B_PREFERRED_TOKEN instead.
* fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument
  in case of failure.
* Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher
  counterpart to the app_server (the other will be _DetermineTarget()).
* Made it easier to use Michael's Message4 implementation: just add the following line
  to your UserBuildConfig:
	AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ;
* Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will
  target the client handler, while the other will target the preferred handler of the
  client looper (usually the view having focus).
* Fixed dano message unflattening in the Message4 code.
* Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation.
* I hope that's all - it's a huge change, but it's all connected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-20 16:24:23 +00:00
Adi Oanca ace01f864b Removed BWindow::_DetermineTarget(). BWindow's task_looper() just calls BLooper's one. Took Message4 stuff from BWindow's task_looper() and put it in BLooper::task_looper() - guess this is wanted...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-19 21:44:51 +00:00
Stephan Aßmus f4cee9d5f5 fix the FBC problem, as Ingo pointed out, derived classes contain slots for all virtuals defined in the base class, therefor, it is ok to just define WindowActivated for BScrollBar. The only problem is that BScrollBar::WindowActivated() cannot be called from apps having overridden WindowActivated() in a BScrollBar subclass of their own.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 23:46:02 +00:00
Axel Dörfler 44534147b1 "#ifdef __HAIKU__" is no longer needed with the new build system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 13:47:48 +00:00
Axel Dörfler 9a1d68e4aa * rewrote ColorControl.h
* removed unused stuff.
* shuffled methods around in the source, so that you don't have to jump so far
  when working at a specific thing (ie. all draw functions are grouped together, ...)
* ResizeToPreferred() should now work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 02:45:19 +00:00
Stephan Aßmus 034104bc0f * fix invalidation of changed items
* fix deselecting items
* fix selection with the mouse and also holding down modifiers
* fix some more stuff I have already forgotten
* applied coding style in most places
* renamed private functions to be consistent

needs more work though, some stuff can definitely be
removed, some needs to be added


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 01:36:10 +00:00
Stephan Aßmus db3c2e1e8e * drawing is on the road to perfection
* uses another virtual to implement WindowActivated() and draw itself in
  disabled look just like in R5
* fixed _ButtonRectFor() off by one errors
* tiny problems remain when clicking on the ScrollBar (it is shifted)
* the _ValueFor() might not be perfect


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-15 00:23:03 +00:00
Axel Dörfler d9525baaf5 * Forgot to update Screen.h with the last commit...
* Introduced and implemented AS_GET_SCREEN_ID_FROM_WINDOW - it only returns B_MAIN_SCREEN_ID,
  though.
* renamed ServerWindow::fHandlerToken to fClientToken.
* The BScreen(BWindow *) constructor now really asks the server for the screen ID.
* ServerApp::fWindowList is now a BObjectList.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 12:08:21 +00:00
Ingo Weinhold 758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +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 42b5ae7db9 BFont::_GetExtraFlags() no longer returns a status value, but fills in default
values in case the server communication failed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 11:08:27 +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
Stephan Aßmus 4f34cedfba also contains code and ideas from Stefano
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:33:09 +00:00
Stephan Aßmus 5083a8d56d stunning improvements to drawing, completely removed flickering, only minor visual problems remain, maybe needs testing with regard to targeted views being removed or the scrollbar being removed etc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-07 01:26:13 +00:00
Stephan Aßmus 5ac57aebfb improved look and applied style guide, fixed redrawing in BWindows with synchronous controls, it wouldn't have mattered if Haiku didn't have anti-aliasing, override B_RETURN on keydown to disallow turning the control off
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-05 16:46:36 +00:00
Axel Dörfler 297cd250fa Followed Marcus' suggestion and made fHeight mutable - not nice, but cleaner
than casting away the const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 13:19:00 +00:00
Adi Oanca 412586888e cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 11:38:38 +00:00
Axel Dörfler ef5ab08df3 Fixed keyboard navigation; it should now behave pretty much like R5 AFAICT:
- moved standard keyboard navigation into the BView::KeyDown() hook
- the window now only handles tab+option/command key
- B_COMMAND_KEY triggers group jumping, not B_CONTROL_KEY (that activates the switcher,
  but directly in the app_server)
- fixed broken group navigation: (modifiers & B_COMMAND_KEY & B_SHIFT_KEY) is different
  to (modifiers & (B_COMMAND_KEY | B_SHIFT_KEY)) and is just never true with these
  constants.
That allows the tab key completion to be used again in Terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-21 14:44:53 +00:00
Stefano Ceccherini 16046321cc Implemented BPrivateScreen::ReadBitmap(), but the guts are still missing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 22:33:52 +00:00
Stephan Aßmus 7dc436d8dd usability improvements to scrollbar, sorry had no time to include all of Stefanos drawing code yet, other visual improvements
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-07 14:33:19 +00:00
Axel Dörfler 508d8a847f Big cleanup, rewrote Shelf.h.
Fixed bug in BShelf::ReplicantAt() - it is supposed to test if any of
the variables passed in is NULL before writing to them.
Got rid of the _PR3_COMPATIBLE_ stuff - we definitely don't need that :)
Refactored the code a bit - moved the identical parts of the three
DeleteReplicant() variants into a separate method _DeleteReplicant(),
moved _rep_data_ code out of the class definition, replaced names like
"fView2" and "aBool" with something more meaningful.
Prefixed private methods with '_'.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-06 00:43:52 +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
Stefano Ceccherini 96f6ef632c The bar and knob frame are now calculated. That way we god rid of some billions fPrivateData->fThumbFrame.OffsetBy() calls
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 07:42:24 +00:00
Stefano Ceccherini 0ee76eaf12 More work on scrollbars. Some refactoring.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-02 14:08:33 +00:00
Stefano Ceccherini 267b721430 Started integration of new drawing code. Still so much work to do. Simplified some parts of the code. Scrollbars are broken in many ways, need refactoring
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 22:13:10 +00:00
Stefano Ceccherini bb2ee4164b Forgot to commit the changed header too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 09:14:08 +00:00
Axel Dörfler a00fcbcdf8 Improved BSlider class:
- rewrote GetPreferredSize(), it now actually works correctly
- BSlider is certainly not supposed to resize itself on creation
- fixed BarFrame() and ThumbFrame() to support a different view frame
  than the ideal one
- added SetBarThickness() support
- refactored constraining the mouse point to _ConstrainPoint() - it's
  now used by MouseDown() and MouseMoved() - because of that, tracking
  now works with vertical sliders as well
- still has some drawing problems, but less
- _ReservedSlider4() was defined public for the R5 build
Cleanup, more or less rewrote the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 02:12:42 +00:00
Axel Dörfler bb1336b44f Some refactoring and cleanup:
- renamed some members and methods to fit our style guide
- moved removeSelf() to RemoveSelf() (as those two are essentially
  the same), and fixed it on the way: the state of the child views
  is now also updated by the new _UpdateStateForRemove() method
- Moved BWindow::sendPulse() and activateView() to BView::_Pulse()
  and BView::_Activate()
- some minor stuff

This also fixes the broken previous commit - I forgot to update
View.h; this update contains the previous changes as well. Sorry
for the inconvenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 23:02:44 +00:00
Axel Dörfler 85bd83a710 AS_CREATE_WINDOW now also gets the actual frame width and size limits of
the window on server side - ie. if the app_server could not create a
window of the size requested, BWindow::fFrame will still be correct
(and the size limits will mirror actual decorator limits).
Renamed fMinWindHeight and friends to fMinHeight and so on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 01:14:39 +00:00
Axel Dörfler 9793d44045 Removed superfluous BView::findView() and moved its functionality to BView::FindView().
Fixed it on the way - it's a bad idea to pass NULL pointers to strcmp().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-27 01:54:12 +00:00
Axel Dörfler 62bb447ee0 In order to be binary compatible, one should not change the location
of private members if the class has friends (and BWindow has a lot of
them...), stupid Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 22:04:29 +00:00
Axel Dörfler dd10337fd0 Renamed BAppServerLink to AppServerLink, BPortLink to PortLink, LinkMsgReader
to LinkReceiver, LinkMsgSender to LinkSender, and put everything into the
BPrivate namespace.
Made AppServerLink a cheap object - it will use the applications receiver/sender
and not create its own buffers.
Fixed broken communication stuff here and there (mostly Font.cpp).
Put the newly introduced set|get_system_colors() into the BPrivate namespace -
please don't introduce private functions into the public namespace!!!
Also fixed their broken communication use, as Darkwyrm obviously forgot about
it again: the sequence Flush(); GetNextMessage() without error checking is
purely wrong and can make the app hang and/or crash! :-)
Other minor cleanup.
The input_server used some test mode with the haiku build target which is
probably wrong.
Hopefully I did not forget anything this time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 21:28:56 +00:00
Stefano Ceccherini 8f9d0f685d Removed unused stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-12 14:48:49 +00:00
Axel Dörfler e17b33e56b The window was removing the app_server connection too early, and thus hang in Quit().
Removed the stopConnection() method.
Cleaned up header a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-05 18:57:55 +00:00
Axel Dörfler a01d14b2db Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-04 15:15:42 +00:00
Stephan Aßmus c10a3393e2 huge BSlider cleanup, it doesn't use an offscreen bitmap anymore by default (compile time switch), updated drawing for Haiku features and disabled look, work in progress
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:57:34 +00:00
Stephan Aßmus 0c3344f4a1 no Invalidate in BControl::SetValue, I figure more controls need to be updated for this change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 19:55:49 +00:00
Stefano Ceccherini 1d95a5ff3a Renamed the private BScrollBarPrivateData class to be an internal BScrollBar's class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-31 12:58:08 +00:00
Stephan Aßmus 85b226041a Added B_BITMAP_NO_SERVER_LINK to the BBitmap flags. It constructs a BBitmap without a server link, which consequently cannot be drawn by the app_server, but which is nevertheless very useful. It essentially does the same thing as RUN_WITHOUT_APP_SERVER. I also added a CleanUp() function and moved the cleanup code from InitObject() there. CleanUp() is now called in the destructor, which means that the app_server now knows when to free the server side bitmap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 18:10:20 +00:00
Michael Lotz c2da902f2e Implemented BPortLink::AttachShape and BPortLink::ReadShape and used them for passing the shapes in AS_GET_GLYPH_SHAPES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-01 07:29:04 +00:00
Stefano Ceccherini 370ca4b97c Corrected forward declaration
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 15:21:34 +00:00
Stephan Aßmus 0985210969 added this very useful compare function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-29 16:30:46 +00:00
Adi Oanca a1ce489220 added a method for properly calling 'Attached' hooks
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-22 20:05:47 +00:00
Adi Oanca 239fc54e70 changed one private method's prototype
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-03 22:44:06 +00:00
Ingo Weinhold 102267997c Vertical() can be const and should be, when invoked on a const instance.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 13:33:34 +00:00
Stefano Ceccherini 422c07914d Applied our style guide as someone (cough! *** Axel *** cough!) bugged me (correctly) about it :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-01 14:29:06 +00:00
Adi Oanca 2a8a80a764 Added BPortLink class as friend
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 09:34:59 +00:00
DarkWyrm 04ab15f96d Gave _font_control() friend status so we can init the system fonts
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 22:07:32 +00:00
Axel Dörfler 7f34794009 Reserved private virtuals don't really have to return a status code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 04:36:47 +00:00
Axel Dörfler a4023b87c1 Reserved private virtuals don't really need to return a value.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 04:27:57 +00:00
Axel Dörfler 9551dd1cd3 Added rgb_color == and != operators - inline only.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10742 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 02:38:52 +00:00
Stefano Ceccherini 860ec9a8ac Moved BSeparatorItem's interface to its own file. Everything still builds, amazing :P
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-30 10:11:38 +00:00
DarkWyrm 01e4e91366 Stupidman strikes again. :D
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 23:51:28 +00:00
DarkWyrm 6c41be783c FBC fix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 23:40:20 +00:00
shatty d601f6e882 rename RecalLineBreaks to RecalculateLineBreaks ; use ceil() when computing the origins for lines
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-11 10:07:40 +00:00
Jérôme Duval 739131e728 clean up
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-25 08:31:38 +00:00
DarkWyrm da0209e2e4 Some fixes and tweaks by Kevin Field
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-08 22:36:54 +00:00
Jérôme Duval 2ba29ed514 R5 needs a 3 buttons map only
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-07 15:14:29 +00:00
DarkWyrm 3713534518 Tweak to FindClosestColor
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 00:46:37 +00:00
DarkWyrm 5a9fed59c3 I hate forgetting to check in files. :(
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-12 12:43:36 +00:00
Jérôme Duval f7128f5688 clean up
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-29 12:43:30 +00:00
Adi Oanca 9839e74132 modified one method's name
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-05 20:42:03 +00:00
Axel Dörfler d73fcb0e62 Removed deprecated BShape API as it broke the build.
If we intend to keep compatibility to this R4.5 API, we should complete
what I started in interface/Shape.cpp.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-27 22:55:28 +00:00
Adi Oanca 66c852a764 Forgot about this one. Removed ReadMessageFromPort() 'cause there is no need for it. BLooper does already a great job, we will not complicate things. As you may have seen I also removed some code from Window.cpp because it really was not needed, for the same reason.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 22:03:11 +00:00
Axel Dörfler 28632c48ce Added a private static BorderSize() method. I wonder why those functions
are exposed at all...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-20 18:43:34 +00:00
Axel Dörfler a76953d909 Renamed ModFlags() to ModifyFlags() and made it static (it's private anyway,
so this is no problem).
On second thought, I like "archive" better than "data" for the Archive message
name.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-20 15:01:04 +00:00
Axel Dörfler 50a4d43e91 Removed the private InitObject() method - it's not even exported in R5.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-19 17:46:37 +00:00
Axel Dörfler 26021c2c52 Fixed two bugs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-19 02:50:31 +00:00
Axel Dörfler dfa1093a41 Rewrote the BScrollView header from scratch.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-19 02:06:12 +00:00
DarkWyrm e0c894a088 Added a member PortLink for non-streamed communications with the server
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-07 22:37:40 +00:00
DarkWyrm dcb1e9166d Replaced _view_attr with comparable ViewAttr class and removed a crash
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-07 22:09:58 +00:00
DarkWyrm f9f5f26473 Added OBOS header. I don't think there was anything else. :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 20:48:22 +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
shadow303 37c324a741 Distinguish between 15bit and 16bit color routines
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-10 20:34:45 +00:00
Adi Oanca 98b01e2f16 removed ReadRawFromPort(...)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4797 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-25 12:07:41 +00:00
Adi Oanca 36845b1281 * added PrintToStream() method for debugging BView.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-15 18:56:48 +00:00
Adi Oanca 6f274814d1 use diff. I don't remembr now the differences
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 21:02:31 +00:00
Adi Oanca a3c09a41f6 changed something... I do not remember now... check with diff
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 21:23:25 +00:00
Adi Oanca f62402a785 added const to void Scale(); uncommented one method...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 21:22:24 +00:00
beveloper c188392c20 removed misplaced file, this belongs into headers/private/interface
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-02 22:33:55 +00:00
shatty 3f34315d52 fixed improper padding removal. the addition of Scale() required one non-virtual function to be removed. apparently the private function "removeFromList" was removed. however, _ReservedView2() was also incorrectly commented out. this caused obos stylededit to fail to work, which is how I found this. I have now tested it with this version and it works
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-02 05:57:31 +00:00
Adi Oanca b95458fd6c modified some methods names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-31 17:18:20 +00:00
Marc Flerackers 12c3dcc26d This is the full header of BTextControl
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-20 10:09:19 +00:00
haydentech f5bf638f01 gcc3-related fixes and general clean-up
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-03 18:32:47 +00:00
haydentech 30fd51473f Minor header-related changes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-14 17:21:46 +00:00
DarkWyrm 1b7390044f Checkin for Adrian Oanca
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-17 20:41:54 +00:00
shatty fe5cc7b493 add newline to end of file
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-04-14 01:56:41 +00:00
DarkWyrm 0f434a0aad The mother of all commits. :P
Unremoved zlib and added libpng to public libs (C'mon DW, make up your mind... ;^)
Added screenshot support to app_server
Added full keyboard message support to app_server
Added UseLibraryHeaders and LibraryHeaders rules to jamrules
Updated ColorUtils to convert uint32 colors to rgb_colors
BAppServerLink now autolocks client-server communications on the client side (as it should)
app_server now also juliennes and makes french fries. Yum.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-30 00:17:50 +00:00
DarkWyrm 2465c76947 Imported Marc Flerackers' header for BPicture
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-18 22:04:04 +00:00
DarkWyrm d230489402 Check-in for Adrian Oanca
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-15 00:04:55 +00:00
DarkWyrm 6e4a70109a Swapped unused _BSession_ pointer for a PortLink pointer
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-12 01:21:08 +00:00
DarkWyrm 8ec5fd245a Finally got around to removing the BFont memory leak
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-01 01:12:26 +00:00
Ingo Weinhold e037bfe8cf The introduction of the new virtual SetLimits() is nice in principle, but files compiled with this header implementing a BSlider subclass fail to link against libbe. Introduced a macro that apps can define that need to run under R5 for now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-16 23:51:20 +00:00
DarkWyrm c8563e149f Added newline to end of file
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-02-07 17:27:15 +00:00
ejakowatz f971378f16 Reworked color_which declaration to match Dano's.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-31 00:17:18 +00:00
Marc Flerackers f81711e0de Added the virtual function BSlider::SetLimits
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-23 15:35:12 +00:00
DarkWyrm d2eaf9ca3c Expanded color_which definitions for R1
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 21:23:59 +00:00
DarkWyrm 3a5a99606b Color utilities for app_server and general use
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-18 19:47:06 +00:00
DarkWyrm c1a8250fd3 Checkin to accomodate client-based BScrollBar
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-30 23:35:10 +00:00
beveloper 5f511927a9 removed /* within comment
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-10 20:00:36 +00:00
Ingo Weinhold bc1aaab684 AutoResize() parameter was missing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-03 17:20:12 +00:00
beveloper 63db78ca7d fix header guards to fix app server build problems
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-11-07 00:42:03 +00:00
beveloper cd6ec71536 to stay compatible, ListItem.h now also declares BStringItem
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 19:52:00 +00:00
Axel Dörfler 3275af4352 Uncomment fClean variable to get the header binary compatible with R5.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:50:06 +00:00
Axel Dörfler d3ed67d76c Removed BStringItem class from ListItem.h.
Fixed the StringItem.h header to be compatible with BeOS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:41:51 +00:00
Axel Dörfler 1c1ff60b97 Copied over the ListItem.h header with the original one for now (the old
one wasn't compatible and written in a strange style).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:38:31 +00:00
Axel Dörfler b2d5d0de15 Completely replaced the ListView.h header - the old one wasn't compatible
with Be's and in a strange style.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-29 18:36:30 +00:00
Axel Dörfler a691828008 A slight collision of StringItem.h with our coding style guidelines...
(and fixed newline at the end of the file).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-28 01:38:57 +00:00
beveloper 3bb5ee98f7 BFont doesn't have a destructor
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 20:08:17 +00:00
beveloper d734a8ce5a some header files to be R5 compatible
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 13:54:44 +00:00
beveloper d7e489f80a modified to provider better R5 compatibility
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 13:45:47 +00:00
jrand be1c65218b Adding implementation provided by Marc Flerackers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-16 04:29:31 +00:00
DarkWyrm 04b6869176 Initial checkin
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-12 19:02:55 +00:00
Michael Phipps 571e21095f Per Jason
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-30 17:53:51 +00:00
Marc Flerackers 4eb5e0d516 Initial Checkin
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-26 14:53:19 +00:00
jrand 0af8a6afe0 Add the header for the BDeskbar class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-24 04:11:55 +00:00
Marc Flerackers 6f3c97ca49 Initial Checkin
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-13 12:51:10 +00:00
Ingo Weinhold fa232b80a6 Added ImportBits() methods to the API, which should be used instead of the queer and also broken SetBits().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-01 23:19:42 +00:00
ejakowatz ac52c3780f New addition, with required modification to build file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-28 03:41:58 +00:00
Ingo Weinhold bffaf34afe Initial version of provisional BBitmap implementation. Save SetBits() all functions of current interest are implemented. A helper class for palatte <-> true color conversion is in place. Nothing is tested. Currently not included in the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-28 00:42:18 +00:00
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00