Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
407ee055
Kaydet (Commit)
407ee055
authored
Mar 08, 2012
tarafından
Philipp Weissenbacher
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Translate German comments
üst
ac488d58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
87 deletions
+77
-87
calendar.hxx
svtools/inc/svtools/calendar.hxx
+77
-87
No files found.
svtools/inc/svtools/calendar.hxx
Dosyayı görüntüle @
407ee055
...
@@ -49,112 +49,106 @@ class ImplCFieldFloatWin;
...
@@ -49,112 +49,106 @@ class ImplCFieldFloatWin;
/*************************************************************************
/*************************************************************************
Beschreibung
Description
============
============
class Calendar
class Calendar
Diese Klasse erlaubt die Auswahl eines Datum. Der Datumsbereich der
This class allows for the selection of a date. The displayed date range is
angezeigt wird, ist der, der durch die Klasse Date vorgegeben ist.
the one specified by the Date class. We display as many months as we have
Es werden soviele Monate angezeigt, wie die Ausgabeflaeche des
space in the control. The user can switch between months using a ContextMenu
Controls vorgibt. Der Anwender kann zwischen den Monaten ueber ein
(clicking on the month's name) or via two ScrollButtons in-between the months.
ContextMenu (Bei Click auf den Monatstitel) oder durch 2 ScrollButtons
zwischen den Monaten wechseln.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
WinBits
WinBits
WB_BORDER Um das Fenster wird ein Border gezeichnet.
WB_BORDER We draw a border around the window.
WB_TABSTOP Tastatursteuerung ist moeglich. Der Focus wird
WB_TABSTOP Keyboard control is possible. We get the focus, when
sich geholt, wenn mit der Maus in das
the user clicks in the Control.
Control geklickt wird.
WB_QUICKHELPSHOWSDATEINFO Show DateInfo as BallonHelp even if QuickInfo is enabled
WB_QUICKHELPSHOWSDATEINFO DateInfo auch bei QuickInfo als BalloonHelp zeigen
WB_BOLDTEXT We format by bold texts and DIB_BOLD is evaluated by
WB_BOLDTEXT Formatiert wird nach fetten Texten und
AddDateInfo()
DIB_BOLD wird bei AddDateInfo() ausgewertet
WB_FRAMEINFO We format in a way, so that FrameInfo can be displayed
WB_FRAMEINFO Formatiert wird so, das Frame-Info angezeigt
and the FrameColor is evaluated by AddDateInfo()
werden kann und die FrameColor bei AddDateInfo()
WB_RANGESELECT The user can select multiple days, which need to be
ausgewertet wird
consecutive
WB_RANGESELECT Es koennen mehrere Tage selektiert werden, die
WB_MULTISELECT The user can select multiple days
jedoch alle zusammenhaengend sein muessen
WB_WEEKNUMBER We also display the weekdays
WB_MULTISELECT Es koennen mehrere Tage selektiert werden
WB_WEEKNUMBER Es werden die Wochentage mit angezeigt
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Mit SetCurDate() / GetCurDate() wird das ausgewaehlte Datum gesetzt und
We set and get the selected date by SetCurDate()/GetCurDate().
abgefragt. Wenn der Anwnder ein Datum selektiert hat, wird Select()
If the user selects a date Select() is called. If the user double clicks
gerufen. Bei einem Doppelklick auf ein Datum wird DoubleClick() gerufen
.
DoubleClick() is called
.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Mit CalcWindowSizePixel() kann die Groesse des Fensters in Pixel fuer
CalcWindowSizePixel() calculates the window size in pixel that is needed
die Darstellung einer bestimmte Anzahl von Monaten berechnet werden
.
to display a certain number of months
.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Mit SetSaturdayColor() kann eine spezielle Farbe fuer Sonnabende gesetzt
SetSaturdayColor() and SetSundayColor() set a special color for Saturdays
werden und mit SetSundayColor() eine fuer Sonntage. Mit AddDateInfo()
and Sundays.
koennen Tage speziell gekennzeichnet werden. Dabei kann man einem
AddDateInfo() marks special days. With that we can set e.g. public holidays
einzelnen Datum eine andere Farbe geben (zum Beispiel fuer Feiertage)
to another color or encircle them (for e.g. appointments).
oder diese Umranden (zum Beispiel fuer Termine). Wenn beim Datum
If we do not supply a year in the date, the day is used in EVERY year.
kein Jahr angegeben wird, wird der Tag in jedem Jahr benutzt. Mit
AddDateInfo()
kann auch jedem Datum ein Text mitgegeben werden, der
AddDateInfo()
can also add text for every date, which is displayed if the
dann angezeigt wird, wenn Balloon-Hilfe an ist. Um nicht alle Jahre
BalloonHelp is enabled.
mit entsprechenden Daten zu versorgen, wird der RequestDateInfo()-
In order to not have to supply all years with the relevant data, we call
Handler gerufen, wenn ein neues Jahr angezeigt wird. Es kann dann
the RequestDateInfo() handler if a new year is displayed. We can then query
im Handler mit GetRequestYear() das Jahr abgefragt werden
.
the year in the handler with GetRequestYear()
.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Um ein ContextMenu zu einem Datum anzuzeigen, muss man den Command-Handler
In order to display a ContextMenu for a date, we need to override the
ueberlagern. Mit GetDate() kann zur Mouse-Position das Datum ermittelt
Command handler. GetDate() can infer the date from the mouse's position.
werden. Bei Tastaturausloesung sollte das aktuelle Datum genommen werden
.
If we use the keyboard, the current date should be use
.
Wenn ein ContextMenu angezeigt wird, darf der Handler der Basisklasse nicht
gerufen werden
.
If a ContextMenu is displayed, the baseclass' handler must not be called
.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Bei Mehrfachselektion WB_RANGESELECT oder WB_MULTISELECT kann mit
For multiple selection (WB_RANGESELECT or WB_MULTISELECT) SelectDate(),
SelectDate()/SelectDateRange() Datumsbereiche selektiert/deselektiert
SelectDateRange() can select date ranges. SelectDateRange() selects
werden. SelectDateRange() gilt inkl. EndDatum. Mit SetNoSelection() kann
including the end date.
alles deselektiert werden. SetCurDate() selektiert bei Mehrfachselektion
SetNoSelection() deselects everything.
jedoch nicht das Datum mit, sondern gibt nur das Focus-Rechteck vor.
SetCurDate() does not select the current date, but only defines the focus
rectangle.
Den selektierten Bereich kann man mit GetSelectDateCount()/GetSelectDate()
GetSelectDateCount()/GetSelectDate() query the selected range.
abgefragt werden oder der Status von einem Datum kann mit IsDateSelected()
IsDateSelected() queries for the status of a date.
abgefragt werden.
The SelectionChanging() handler is being called while a user selects a
Waehrend der Anwender am selektieren ist, wird der SelectionChanging()-
date. In it, we can change the selected range. E.g. if we want to limit
Handler gerufen. In diesem kann der selektierte Bereich angepasst werden,
or extend the selected range. The selected range is realised via SelectDate()
wenn man beispielsweise den Bereich eingrenzen oder erweitern will. Der
and SelectDateRange() and queried with GetSelectDateCount()/GetSelectDate().
Bereich wird mit SelectDate()/SelectDateRange() umgesetzt und mit
GetSelectDateCount()/GetSelectDate() abgefragt. Wenn man wissen moechte,
IsSelectLeft() returns the direction of the selection:
in welche Richtung selektiert wird, kann dies ueber IsSelectLeft()
sal_True is a selection to the left or up
abgefragt werden. sal_True bedeutet eine Selektion nach links oder oben,
sal_False is a selection to the right or down
sal_False eine Selektion nach rechts oder unten.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Wenn sich der Date-Range-Bereich anpasst und man dort die Selektion
If the DateRange area changes and we want to take over the selection, we
uebernehmen will, sollte dies nur gemacht werden, wenn
should only do this is if IsScrollDateRangeChanged() retruns sal_True.
IsScrollDateRangeChanged() sal_True zurueckliefert. Denn diese Methode liefert
This method returns sal_True if the area change was triggered by using the
sal_True zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons
ScrollButtons and sal_False if it was triggered by Resize(), other method
ausgeloest wurde. Bei sal_False wurde dies durch Resize(), Methoden-Aufrufen
calls or by ending a selection.
oder durch Beendigung einer Selektion ausgeloest.
*************************************************************************/
*************************************************************************/
// ------------------
// ------------------
// - Calendar
-T
ypes -
// - Calendar
t
ypes -
// ------------------
// ------------------
#define WB_QUICKHELPSHOWSDATEINFO ((WinBits)0x00004000)
#define WB_QUICKHELPSHOWSDATEINFO ((WinBits)0x00004000)
#define WB_BOLDTEXT ((WinBits)0x00008000)
#define WB_BOLDTEXT ((WinBits)0x00008000)
#define WB_FRAMEINFO ((WinBits)0x00010000)
#define WB_FRAMEINFO ((WinBits)0x00010000)
#define WB_WEEKNUMBER ((WinBits)0x00020000)
#define WB_WEEKNUMBER ((WinBits)0x00020000)
//
Muss mit den WinBits beim TabBar uebereinstimmen oder mal
//
Needs to in agreement with the WinBits in the TabBar or
//
nach \vcl\inc\wintypes.hxx verlagert werden
//
we move it to \vcl\inc\wintypes.hxx
#ifndef WB_RANGESELECT
#ifndef WB_RANGESELECT
#define WB_RANGESELECT ((WinBits)0x00200000)
#define WB_RANGESELECT ((WinBits)0x00200000)
#endif
#endif
...
@@ -374,43 +368,39 @@ inline const Color& Calendar::GetSundayColor() const
...
@@ -374,43 +368,39 @@ inline const Color& Calendar::GetSundayColor() const
/*************************************************************************
/*************************************************************************
Beschreibung
Description
============
============
class CalendarField
class CalendarField
Bei dieser Klasse handelt es sich um ein DateField, wo ueber einen
This class is a DateField with which one can select a date via a DropDownButton
DropDown-Button ueber das Calendar-Control ein Datum ausgewaehlt werden
and the CalendarControl.
kann.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
WinBits
WinBits
S
ieh
e DateField
S
e
e DateField
Die Vorgaben fuer das CalendarControl koennen ueber SetCalendarStyle()
The preferences for the CalendarControl can be set via SetCalendarStyle().
gesetzt werden.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Mit EnableToday()/EnableNone() kann ein Today-Button und ein None-Button
With EnableToday()/EnableNone() we can enable a TodayButton and a NoneButton.
enabled werden.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Wenn mit SetCalendarStyle() WB_RANGESELECT gesetzt wird, koennen im
If we set WB_RANGESELECT with SetCalendarStyle(), we can select multiple days
Calendar auch mehrere Tage selektiert werden. Da immer nur das Start-Datum
in the Calendar.
in das Feld uebernommen wird, sollte dann im Select-Handler mit
GetCalendar() der Calendar abgefragt werden und an dem mit
Because we only take over the start date into the field, we should query
GetSelectDateCount()/GetSelectDate() der selektierte Bereich abgefragt
with GetCalendar() in the SelectHandler and with GetSelectDateCount()/GetSelectDate()
werden, um beispielsweise diese dann in ein weiteres Feld zu uebernehmen
.
the selected range. We then can e.g. take over that value to another field
.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Wenn ein abgeleiteter Calendar verwendet werden soll, kann am
If a derived Calendar should be used, we can override the CreateCalendar()
CalendarField die Methode CreateCalendar() ueberlagert werden und
method in CalendarField and create an own calendar there ourselves.
dort ein eigener Calendar erzeugt werden.
*************************************************************************/
*************************************************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment