Commit Graph

180 Commits

Author SHA1 Message Date
Ingo Weinhold
85b41b15d9 * Added bool and double BString::operator<<() versions.
* Removed the clashing operator in JobSetupDlg. Automatic whitespace
  cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-07-07 10:17:15 +00:00
Clemens Zeidler
6e1a22610f Add a comment about who is responsible to clean up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-18 01:29:27 +00:00
Clemens Zeidler
ef93b55df4 - Areas with same tabs are put in a column/row automtically. Move preferred size constraint from Area to the column/row. This avoids a "spring" effect of the
quadratic solver if multiple Areas are in the same column/row.
- Replace GetString by ToString.
- some clean up



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-14 00:24:12 +00:00
Stephan Aßmus
4153964a10 Moved IconUtils.h to Interface Kit and therefor made it an "official" header. Since the class has no
virtual but only static methods, it is not so likely that binary compatibility issues may arrise
from using it in new apps. Adjusted all the Jamfiles that included the private libicon headers. Note
that it was never necessary to link against libicon.a, since it's part of libbe anyway. There was one
instance where that was done. Hopefully it does not break the build, but I did this change a while ago,
tested it and then the harddrive began failing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 09:12:38 +00:00
Jérôme Duval
0812493886 merged freetype 2.4.4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-16 17:55:28 +00:00
Clemens Zeidler
8286779101 Make kp_solve interface work again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-08 09:01:11 +00:00
Clemens Zeidler
a0ad88e002 Fix min/ max calculation by removing all soft constraints before doing so. Smaller fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-26 22:06:02 +00:00
Clemens Zeidler
7583db5a1e Add an alternative solver to lp_solve. The solver based on Ingo's active set solver but is able to handle arbitrary hard and soft constraints. The advantage to lp_solve is that the active set solver can optimize variable in respect to a quadratic objective function. This makes it possible to minimise the quadratic derivation to a desired value e.g. \Sum_i(x_i - x_{i,pref})^2 -> min.
The solver part has been refactored in this way that both solver can be used with the same layout specifications. The active set solver is default now; the performance is not as good as lp_solve, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-25 04:59:40 +00:00
Clemens Zeidler
f108cdbfab Merge all linear programming types in one file an rename them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-13 19:23:33 +00:00
Clemens Zeidler
5440f6fee3 Refactor the linear programming class to use a minimal solver interface class and implement the interface for lp_solve. As a result lp_solve is not visible to the outside any more. This interface could be used to use other solvers as well. Rename operator constants to no clash with lp_solve constants.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-13 18:41:58 +00:00
Michael Pfeiffer
b13a0d5d32 * Bug fixed: WriteSpoolData didn't pass data to
transport add-on because ";" was missing after
  "return" statement.
* Removed unused getter methods from class GraphicsDriver.
* Implemented page rotation (closes #6965) in landscape.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 10:47:19 +00:00
Michael Pfeiffer
331c922016 * Renamed method PrinterCap::IsSupport() to Supports().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-10 07:26:14 +00:00
Michael Pfeiffer
4a0c1e139d * Code style changes (missing header files from r39770)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 20:07:22 +00:00
Michael Pfeiffer
fefd3ba588 * Code style changed in class GraphicsDriver and and
child classes
* Removed namespace handling for Metrowerks compiler
* Initialize all fields in constructor


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 10:22:40 +00:00
Clemens Zeidler
510c618b96 gcc2 don't like INFINITY. Fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-30 03:35:15 +00:00
Clemens Zeidler
067f47a3ee Move lp_solve dependency completely into LinearSpec. Clean up and some more memory allocation checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-30 02:08:10 +00:00
Clemens Zeidler
e7de22dcff fUsingSummands was never used so remove it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-29 21:08:26 +00:00
Clemens Zeidler
c97cd0f4da Also update the preferred size constraints correctly when replacing the tabs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-26 04:33:06 +00:00
Clemens Zeidler
8fa4fd37b7 Keep the preferred size ratio into account. This make layout behaviour much more intuitive when resizing a window. Thanks Christof.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-26 04:20:38 +00:00
Jérôme Duval
ee72866293 merged freetype 2.4.3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 21:01:29 +00:00
Jérôme Duval
d8c9110cb6 updated libpng to 1.4.4
avoids warnings for gcc2 (deprecated attribute)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 20:20:05 +00:00
Michael Pfeiffer
f14cab2d36 * Added support for the remaining Gutenprint setting types:
Boolean, Int, Dimension and Double.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-14 10:58:10 +00:00
Michael Pfeiffer
bc9665753b * Use Layout API
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 09:43:26 +00:00
Michael Pfeiffer
299710a731 * Style changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 08:54:52 +00:00
Michael Pfeiffer
54336e821e * Use Layout API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 08:40:04 +00:00
Michael Pfeiffer
42c36e9fd3 * Style changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 08:06:55 +00:00
Michael Pfeiffer
239c0190af * Use namespace "std" to fix build-o-matic error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 08:05:02 +00:00
Michael Pfeiffer
ae83b2f10a * Use check box to enable "Print preview" instead of a button.
The button did make sense in BeOS where there was no printer
  selection dialog. The dialog is enabled in Haiku per default
  and clicking the "Preview" button closes the job setup dialog
  and returns to the printer selection dialog.
  The preview is shown after the printer selection dialog is
  closed clicking on the "OK" button.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 07:06:55 +00:00
Michael Pfeiffer
de18d919e7 * Added driver specific settings to job data and job
setup dialog.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 06:54:16 +00:00
Michael Pfeiffer
961e35fb58 * Changed BaseCap ID type from int to int32.
* Removed unused printer ID from PrinterCap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-26 13:06:29 +00:00
Michael Pfeiffer
56c20e828b * Style changes.
* Removed unused code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-26 09:56:56 +00:00
Michael Pfeiffer
308f0e195d * Enable halftone configuration options if requested by printer driver
only.
* WIP: Driver specific generic capabilities.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-26 09:48:36 +00:00
Michael Pfeiffer
f412257ccb * Store resolution ID in libprint specific field in JobData;
as the pair of x/y resolutions might not be unique in all
  supported Gutenprint printer models 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-25 14:46:26 +00:00
Michael Pfeiffer
f53abcbdf8 * Added field fKey to BaseCap (will be required for Gutenprint printer
driver add-on).
* Added ability to search for a PrinterCap by ID to class PrinterCap
  (for Gutenprint driver add-on).
* Moved code for searching a PrinterCap by name into class PrinterCap.
* Refactored code in JobSetupDlg to use the new method.
* Refactored duplicated code in JobSetupDlg.
* There is still a lot of refactoring potential in libprint.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-25 14:21:09 +00:00
Michael Pfeiffer
08d759feae * More style changes.
* Removed namespace handling for Metrowerks compiler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-25 11:44:09 +00:00
Michael Pfeiffer
a7dde370f5 * Style changes.
* Unused code removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-25 11:34:31 +00:00
Clemens Zeidler
b23e9af5b5 Thanks to anevilyak, the previous approach was not thread safe. You can specify a friend layout now if you want to connect tabs of different BALMLayout's.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-21 11:19:18 +00:00
Clemens Zeidler
56187df6eb Use a global solver per application. This make it possible to wire different BALMLayout's.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-21 11:05:38 +00:00
Michael Pfeiffer
5a695bce10 * Use layout API in libprint dialogs.
* Use layout API in preview printer add-on.
* Use layout API in some dialogs in PDF Writer.
* Removed unused class PrinterSetupWindow from PDF Writer.
* Improved layout in print_server configuration dialog.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-16 19:56:34 +00:00
Clemens Zeidler
c2f0a314a0 Rename ReplaceObjectiveFunction to SwapObjectiveFunction I think this makes it more clear that the old function is not deleted.
Cleanup Jamfile.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-13 05:44:52 +00:00
Clemens Zeidler
fc691d7de2 - Remove lp_solve dependencies form Variable class and put everything into LinearSpec. As a side effect Variable management is a bit more consistence now. We want to replace lp_solve soon so it will be easier to replace it just in LinearSpec.
- Update copyrights.
- Lot of small things related to the Variable refactoring.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-05 20:15:55 +00:00
Clemens Zeidler
cad0c434c7 Refactor LinearSpec a bit, make it more difficult to leak the objective function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-04 22:27:02 +00:00
Clemens Zeidler
6751b48834 Fix gcc2 build + warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-04 19:10:22 +00:00
Clemens Zeidler
37344020ef - Add a alternative method to setup a group layout. BLayoutItem / BView are wrapped into a GroupItem. GroupItem overloads the | (horizontal tiling) and / (vertical tiling) operators. In this manner you can create a group layout using these operators, e.g. GroupItem item = GroupItem(button1) | (GroupItem(button2) / GroupItem(button3)); would layout button1 at the left and button2 and button3 at the right in a vertical layout. All the layout information is stored in the GroupItem item, to setup the final layout you have to call BuildLayout(item). If you like it it could also be added to the BGroupLayout.
- Add operator test app.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-03 20:05:52 +00:00
Clemens Zeidler
70e2076135 - Add helper functions to get the tabs of a view or a layout item.
- AddView only require the top, left tabs now.
- Remove the TwoViews test and replace it with a slightly more complex test.
- Merge XTab and YTab files into one header file.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-30 01:32:48 +00:00
Clemens Zeidler
5b6fca0639 - Rework the ALM layout api. The AddItemTo* function are now related to the current Area. On default the current Area is the last added Area.
- Add some more const where appreciated.
- Fix some style issues and a leak in Row and Column.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-29 03:30:47 +00:00
Clemens Zeidler
19ddd4f1cb SetDefaultBehavior is not needed since all views handled in this function have min and max size equal the pref size (despite of the status bar length, which is ok). As a result they don't grow or shrink undesirable as assumed previously. As a result also the AutoPreferredContentSize is not needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:57:40 +00:00
Clemens Zeidler
21f083af82 - Implement all Add* function of the BLayout class properly. If the Add* functions of the BLayout class are called add the item to the right upper corner of the previous area. That is at least better than ignore this functions.
- Add more convenience AddViewTo{Right, Left, Top, Bottom} functions to add a item to the sides of an existing area.
- Need to add the Jamfile hack again to include the ViewLayoutItem.h header. I thing about to add the ALMLayout.* files to the interface dir when its a little bit more matured. Then the problem will be solved. Till I made a decision or somebody tell me its a bad idea to add the ALMLayout to the official interface stuff or the ViewLayoutItem.h should be in a shared header dir I will keep this hack.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38793 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 07:16:49 +00:00
Clemens Zeidler
96e2013e70 Add inset and spacing to BALMLayout. Each Area is able to overwrite this global values and use his own inset. Add spacing and inset to the tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:53:33 +00:00
Clemens Zeidler
40d939a43f - Add some checks if the Area is initialized.
- Init some more variables in the constructor.
- Rename HasSame*As to Set*As. The old one is more a question. Also add an optional factor and remove the HasSameSizeAs function which tempt the user to leak a BList.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-23 00:04:08 +00:00