Commit Graph

163 Commits

Author SHA1 Message Date
Jérôme Duval 2c558054fe supports double clicking column title separator to preferred column size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-29 22:50:52 +00:00
Axel Dörfler 89b1afd16c * Added a new window feel kPasswordWindowFeel that is above all other feels.
* Changed the password window to use this feel.
* Later, the screen saver itself should use this feel whenever the password
  mode is enabled. The password window should then use a modal-app feel, but
  this doesn't work yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-22 11:51:23 +00:00
Stephan Aßmus ed3215ee21 Save one check in certain situations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 13:16:44 +00:00
Stefano Ceccherini 4e0c2a797d Menus can be scrolled also using the mouse wheel
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 06:03:27 +00:00
Rene Gollent 90b7764dc3 Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:47:16 +00:00
Stephan Aßmus a682d9819f Quite a cleanup action to avoid polluting the global namespace with private
BTextView classes:

* Declared the directly used BTextView helper classes as private BTextView
  classes and changed all affected files.
* Realized that Tracker's BPoseView was (accidentally?) using what used to
  be _BWidthBuffer_. It had declared it's own class with the same name and
  same members/size in headers/private/tracker/TextViewSupport.h, but the
  implementation was nowhere to be found. I can only explain this that
  the BTextView implementation was then actually linked and used. But the big
  problem was that it was used without locking (unlike in BTextView)! When
  many Tracker windows opened during system startup or later and they happened
  to each request characters not yet in the cache, I imagine things could have
  gone bad and corrupted memory. Anyways, since I can see the usefulness of
  the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved
  the locking inside BTextView::WidthBuffer::StringWidth().
* Adjusted InterfaceDefs.cpp accordingly.
* TODO: Move subsequent classes into BTextView namespace as well, ie derived
  classes that BTextView doesn't directly know about. All stuff in src/kits/
   inteface/textview_support/
* Added preliminary and not yet implemented layout friendly BTextView
  constructors.
* I will try to handle the insets imposed by BTextView::fTextRect a bit
  differently when used inside the new layout management framework. For this,
  I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do
  anything yet.

So far, everything seems to work still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:08:40 +00:00
Axel Dörfler ae0606be74 * Added two more private InterfaceDefs functions: get_application_order(), and
get_window_order() will retrieve the application respectively window order
  on the selected workspace.
* Moved private BeOS compatible functions (as used by the Deskbar) into the
  private WindowInfo.h header.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 17:39:42 +00:00
Axel Dörfler 44cd4a02c7 * Deskbar's Switcher had an explanation what the window_info::layer field is
about. ServerWindow::GetInfo() now fills in that value following this logic
  as well as further testing.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 13:44:17 +00:00
Karsten Heimrich 12fd6cc2e7 * move libprint sources into libs, as it is a 3rdparty lib
* move libprint headers into libs headers folder accordingly
* merge all shared folders sources into kits print, we might build later on a
  real print kit, propably also to access cups from an nicely API, atm static
* move all shared headers into private print, also pr_server.h from interface
* adjust build to work with the changed folder layout



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 20:30:14 +00:00
Karsten Heimrich f56301c9e8 * maintain our own rect while printing, this makes it possible to print all pages e.g. syslog from StyledEdit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 19:10:39 +00:00
Stephan Aßmus 896d01df1e Removed trailing white space.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-07 12:38:28 +00:00
Stefano Ceccherini 150ddd17b1 added missing header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:29:54 +00:00
Stefano Ceccherini 10f4d0679a Added a class MenuPrivate to handle access to private BMenu methods.
BMenuItem and BWindow are no longer friends of BMenu, but use this class 
instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-11 08:22:09 +00:00
Axel Dörfler cfc3fa87da * Cleaned up InterfaceDefs.h, added TODO about getting rid of declaring
_init_interface_kit_() in there.
* Moved private get_mode_parameter() into the BPrivate namespace.
* Renamed interface_misc.h to InterfacePrivate.h.
* Minor other cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 10:07:35 +00:00
Axel Dörfler 58c42ec9de No need for the kWorkspacesWindow flag anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-14 11:19:57 +00:00
Michael Lotz 87df690150 * Replaced the UTF8ToCharCode function with one that handles invalid chars
correctly (or at all...)
* Use the common 0xfffd character as a substitute for invalid characters
* Corrected comment

This function is used by the app_server to convert the UTF8 strings to char
codes to feed FreeType. Using a non space substitute character at least for
now, as it makes it more obvious where invalid characters are present.
I tested this change with some UTF8 test files and it seems to work well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 23:04:47 +00:00
Axel Dörfler d273d00822 * Fixed previous version of UTF8CountBytes() and put it in again: it was
breaking out of the loop too early, and would therefore miss the last
  character.
* Replaced UTF8CountChars() with a short and safe version as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 19:17:33 +00:00
Stephan Aßmus ccf6ad1d8b Reverted to the previous version. Axel, your change completely broke all kinds
of stuff. I think the trouble is that you keep decrementing charCount while
still inside the same UTF8 glyph. I cannot really tell, I am hoping you don't
mind me reverting to the old version, since the new one is only three lines,
so it should be easy to correct and re-commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 15:56:31 +00:00
Axel Dörfler 326dce3ae0 * Simplified UTF8CountBytes() a bit, made it faster, and less error-prone
against malformed UTF-8.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 10:45:57 +00:00
Axel Dörfler f9bbab8848 * First steps towards a more flexible workspaces view handling: the
workspaces view can now be any view in the hierarchy.
* Added private view flag kWorkspacesViewFlag that identifies such a
  view - note though, that you must not remove a view before closing or
  hiding its window for now (and that you still need to set the 
  kWorkspacesWindowFlag, too).
* Fixed Workspaces check for valid screen coordinates; after a crash, it
  managed to open its window offscreen for me.
* Added a ViewLayer method FindView() that finds a view with the 
  specified flags set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-24 11:18:52 +00:00
Stefano Ceccherini 9e64a7ed1b Fixed problem with some popup menus (check ticket #1679)
Moved GetMouse() calls near the check for exit conditions.
Reorganized a bit the code, and hopefully simplified it in some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 07:30:05 +00:00
François Revol 7579aad575 Fix extra token at end of #endif
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-21 22:57:33 +00:00
Stefano Ceccherini 37b83b1a2d The system palette was defined in two files. Moved to a private header,
included by the two.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 13:44:37 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Stefano Ceccherini 65e63b987d PaletteConverter now exports a static InitializeDefault() method, which
can be used (and is, by _init_interface_kit()) to initialize the ... 
er... default instance of 
PaletteConverter using the system color map, thus avoid building the 
list of colors, which takes some time. Fixes bug #505.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-11 13:30:56 +00:00
Stefano Ceccherini b1af0a7a24 Setting the font shear in a BPicture didn't work, because the value was
treated as uint32 in some places, when it's a float.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-10 10:20:26 +00:00
Stephan Aßmus 3a38a48561 * fixed size layout of BMenuBar on BMenuField in fixed size mode
(needs to account for the parts that the BMenuField draws, ie the shadow
  on the right)
* fixed follow mode of BMenuBar in fixed size mode (B_FOLLOW_LEFT_RIGHT)
* don't resize the BMenuField in fixed size mode (endless loop), this should
  be more robust anyways, since this endless loop would be triggered if an
  application tried to manually resize menuField->MenuBar() in auto resizing
  mode
* fixed calculation of the parts that need to be redrawn on resize


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 22:36:14 +00:00
Stephan Aßmus f591e3a0f2 * fix weird Shape op/point allocation
* handle out of memory situations
* don't try to copy (and assign op!) in SetData if opCount/ptCount is 0
-> FontDemo doesn't crash anymore eventually when cycling fonts in outline
mode


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-17 11:17:29 +00:00
Stefano Ceccherini 422fadc829 Moved the dummy table local to the PicturePlayer::Play() function since,
as Marcus pointed out, having it outside wasn't thread safe. Moved 
PicturePlayer into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 14:40:03 +00:00
Stefano Ceccherini 46b4e48998 Added some debug output to PicturePlayer. Since checking the table size for every op is very slow, now we do that only at the beginning, and use a custom op table if needed. The best case (which is the one used when drawing a picture with BView::DrawPicture()) is very fast since it only requires one check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-16 09:14:03 +00:00
Stefano Ceccherini 253d42a602 Implemented SetClipping op, but it's not working yet (looks like it's
never written into the data stream)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 15:21:15 +00:00
Stefano Ceccherini feb557a6d1 Implemented WriteSetFontFamily() and WriteSetFontStyle(). Only the
server side functions are missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 09:17:21 +00:00
Stefano Ceccherini 37033892c5 Implemented SetPattern op. Reduced the buffer size to 4096 again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 06:39:37 +00:00
Stefano Ceccherini 690c7474a4 Implemented BPicture's SetPenLocation() op, also nested
AppendToPicture() (but still doesn't work :( ). Moved some functions 
around in PictureDataWriter.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 14:07:12 +00:00
Stefano Ceccherini ed5de868df Implemented the following BPicture ops: fill region, stroke/fill arc,
stroke/fill polygon, stroke/fill bezier. some work towards drawing of 
nested pictures.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-13 07:20:43 +00:00
Michael Pfeiffer 3f4090c83d * open 'Add printer dialog' when 'addp' message is sent to Printers preflet
* style changes


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-08 20:32:46 +00:00
Stephan Aßmus 93a30169f3 * fix the build, forgot to commit this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 17:22:53 +00:00
Ingo Weinhold ec592aa9e5 Implement _BMCMenuBar_::MaxSize() to override BMenuBar::MaxSize() and limit
the maximum width. The latter supports unlimited maximum width. The
_BMCMenuBar_ draws fine when resized wider than its min/preferred width, but
not the complete "button" area will cause the menu to open when being pressed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-19 23:09:01 +00:00
Stefano Ceccherini ffcd67bc82 moved duplicate code to a common location.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 14:30:56 +00:00
Stefano Ceccherini 7f0898e76f bye bye ClientFontList.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:45:33 +00:00
Stefano Ceccherini ac2284ed8b Moved ZombieReplicantView.h to src/kits/interface
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:38:14 +00:00
Stefano Ceccherini 7c42f05d49 moved kZombieColor to ZombieReplicantView.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:37:42 +00:00
Stefano Ceccherini fab61b6237 Moved TextInput.h to src/kits/interface as it's only used there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-18 13:31:46 +00:00
Ryan Leavengood 5a1210fbef Moved the BAboutWindow implementation to the shared source directory, which
despite being talked about repeatedly, does not currently exist.

Adding this required adding some new Jam rules to deal with this shared source
directory and headers. I had some fun figuring this out. Despite writing
articles about Jam in the Haiku newsletter a few years ago I still find Jam to
be a PITA at times.

But my solution seems to work pretty well. Basically you just call the rule
UseSharedSource and pass the name of the shared source file you want to use.
This rule sets up the header directories and the right Jam variables for the
source file. You then add the source file to the source list in the Application
rule like any other source file.

I also made the authors list sent to the about window constructor null
terminated instead of passing the size of the array, as suggested by Hugo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-12 03:54:07 +00:00
Ryan Leavengood a8a83855b0 Initial implementation of the common BAboutWindow class. Of course I just
realized that calling it a window may not be strictly correct since it isn't a
decendent of BWindow, but just uses a BAlert. Oh well, it can be changed if
need be.

I'm also checking in the first use of it, in ShowImage. Since ShowImage can
still be compiled for R5 I've added a #ifdef around the new BAboutWindow
related code.

I'm open for suggestions for the interface for this class, well mostly the
constructor. I'm not a big fan of having to specify the number of authors.

For now I'm making the header private, but I don't think it would be a big deal
to expose it publically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-11 00:14:32 +00:00
Stefano Ceccherini 3616859a05 Changed the interaction between BMenuFrame, BMenuScroller and
BMenuWindow. BMenuScroller now is just the scroller button, and it's a 
child of BMenuWindow. This simplifies attaching/detaching the 
scrollers, and it's also a bit cleaner. 
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some 
spurious lines are drawn over the menu. I wonder if this is an 
app_server bug or what.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-05 10:20:06 +00:00
Stefano Ceccherini 140334f858 Added error checking using exceptions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 08:46:56 +00:00
Stefano Ceccherini 4bfa8f22df completes previous commit. Sorry for breaking the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-03 16:34:31 +00:00
Jérôme Duval c25f230cb6 added _get_key_map() to get the character map size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 10:07:34 +00:00
Stefano Ceccherini a3d758e369 Added support for font settings in PictureDataWriter. Not used yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-13 11:14:47 +00:00