History log of /haiku/headers/private/shared/CalendarView.h
Revision Date Author Comments
# 22d88eb4 01-Sep-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

BCalendarView: Adjust day name format to available space.

* Use BDateFormat::GetDayName() to fetch weekday names.
* Use appropriate symbol width(Mon, Mo, M) depending on the frame width.
* Provide functionality to update day name header in case of locale
preferences change.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 8013f2e0 09-Jul-2017 Akshay Agarwal <agarwal.akshay.akshay8@gmail.com>

Highlight current system date in BCalendarView.

* Issue: In BCalendarView presently, there is no notion of a current date
and the current date is not highlighted. So in the deskbar tray calendar
which uses BCalendarView, we cannot know the current date once we change
the selected day.
* Fix: Make BCalendarView accept pulse messages, check for system date
with every pulse message and update the current date accordingly.
Highlight the current date by rendering its day number text in a
different color.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

ticket : #13592


# 7f9368ca 09-Dec-2015 looncraz <looncraz@looncraz.net>

Set*UIColor, etc.

The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.

BView gains:

HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()

BWindow gains a simple helper method:
IsOffscreenWindow()

BMessage gains:

AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()

Previous private ColorTools methods are made public and moved into GraphicsDefs:

mix_color, blend_color, disable_color

These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.

In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR

These changes are documented in their proper user documentation files.

In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.

On the app_server side, the following has changed:

Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.

Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.

In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.

Decorator changes are live now, which required some reworking.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# afd5ec11 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Add setters to BDate and BCalendarView

* BDate setters don't perform any validation, use with caution.
* BCalendarView setters do perform validation checks, and will adjust
the day so it fits the requested month or year.
* Add tests for the BCalendarView setters.


# 2a5e33a9 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 6846765f 07-Sep-2011 Oliver Tappe <zooey@hirschkaefer.de>

Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
(at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
for day, month and year, such that no more date computation is done
in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87663db4 28-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup: respect 80-chars line length limit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42698 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e07062b 27-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Apply patch by Hamish, closing #7947 - thanks!
* determine first day of week and draw calendarview accordingly
* some cleanup: drop superfluous DateTimeView::Draw()
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42697 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2530274d 05-Jun-2011 Ryan Leavengood <leavengood@gmail.com>

Missed this in my previous Time commit, hence the build break, sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41933 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78092ae7 29-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* move DateTime and CalendarView into shared
* adjust Time preflet to take that into account



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27235 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afd5ec11d21761cb3f1edcd80e5206347fe975c5 30-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Add setters to BDate and BCalendarView

* BDate setters don't perform any validation, use with caution.
* BCalendarView setters do perform validation checks, and will adjust
the day so it fits the requested month or year.
* Add tests for the BCalendarView setters.


# 2a5e33a98056c2b92d46a6c9aae6da808c8524b1 26-Sep-2014 Adrien Destugues <pulkomandy@gmail.com>

Move date formatting from BLocale to BDateFormat

* There is a little code duplication. This will be moved to BFormat once
the time and datetime formatting is also moved out of BLocale
* The way to create a BDateFormat from a BLocale is still open for
discussion. I'm undecided between making BDateFormat a member of
BLocale, or adding a BDateFormat(const BLocale&) constructor.
* Adjust all users of the API.


# 6846765fbf83f501df7ab9b10811971cbb5375a3 07-Sep-2011 Oliver Tappe <zooey@hirschkaefer.de>

Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
(at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
for day, month and year, such that no more date computation is done
in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87663db420980bdfe50101b6d067dea5e4ded7b2 28-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup: respect 80-chars line length limit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42698 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e07062b408258cd82f9590761e8d0fc4ce33765 27-Aug-2011 Oliver Tappe <zooey@hirschkaefer.de>

Apply patch by Hamish, closing #7947 - thanks!
* determine first day of week and draw calendarview accordingly
* some cleanup: drop superfluous DateTimeView::Draw()
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42697 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2530274ddc4451ff6eaf2b1dbf4174741791c193 05-Jun-2011 Ryan Leavengood <leavengood@gmail.com>

Missed this in my previous Time commit, hence the build break, sorry!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41933 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78092ae789179f1b5199224109b17898f68a9f9a 29-Aug-2008 Karsten Heimrich <host.haiku@gmx.de>

* move DateTime and CalendarView into shared
* adjust Time preflet to take that into account



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27235 a95241bf-73f2-0310-859d-f6bbb57e9c96