summaryrefslogtreecommitdiff
path: root/project/src
diff options
context:
space:
mode:
Diffstat (limited to 'project/src')
-rw-r--r--project/src/AppResourceId.cpp50
-rw-r--r--project/src/BaseForm.cpp17
-rw-r--r--project/src/ExpandableEditAreaForm.cpp11
-rw-r--r--project/src/FormFactory.cpp8
-rw-r--r--project/src/GalleryForm.cpp10
-rw-r--r--project/src/MainForm.cpp35
-rw-r--r--project/src/OverlayKeypadForm.cpp26
-rw-r--r--project/src/QuickPanelFrameForm.cpp2
-rw-r--r--project/src/SceneRegister.cpp2
-rw-r--r--project/src/SectionTableViewForm.cpp367
-rw-r--r--project/src/TextBoxForm.cpp3
11 files changed, 461 insertions, 70 deletions
diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp
index 2b060e8..820628b 100644
--- a/project/src/AppResourceId.cpp
+++ b/project/src/AppResourceId.cpp
@@ -17,33 +17,82 @@
#include "AppResourceId.h"
+const wchar_t* IDC_BUTTON = L"IDC_BUTTON";
const wchar_t* IDC_BUTTON2 = L"IDC_BUTTON2";
+const wchar_t* IDC_BUTTON_BACKGROUND = L"IDC_BUTTON_BACKGROUND";
const wchar_t* IDC_BUTTON_CLEAR = L"IDC_BUTTON_CLEAR";
const wchar_t* IDC_BUTTON_CLEAR2 = L"IDC_BUTTON_CLEAR2";
+const wchar_t* IDC_BUTTON_COLOR = L"IDC_BUTTON_COLOR";
+const wchar_t* IDC_BUTTON_DATEPICKER = L"IDC_BUTTON_DATEPICKER";
+const wchar_t* IDC_BUTTON_DATETIMEPICKER = L"IDC_BUTTON_DATETIMEPICKER";
+const wchar_t* IDC_BUTTON_DISABLE = L"IDC_BUTTON_DISABLE";
const wchar_t* IDC_BUTTON_DOWN = L"IDC_BUTTON_DOWN";
const wchar_t* IDC_BUTTON_EDITAREA_CLEAR = L"IDC_BUTTON_EDITAREA_CLEAR";
+const wchar_t* IDC_BUTTON_GRID = L"IDC_BUTTON_GRID";
+const wchar_t* IDC_BUTTON_LIST = L"IDC_BUTTON_LIST";
+const wchar_t* IDC_BUTTON_MESSAGEBOX = L"IDC_BUTTON_MESSAGEBOX";
+const wchar_t* IDC_BUTTON_PANEL = L"IDC_BUTTON_PANEL";
+const wchar_t* IDC_BUTTON_PAUSE = L"IDC_BUTTON_PAUSE";
+const wchar_t* IDC_BUTTON_PLAY = L"IDC_BUTTON_PLAY";
+const wchar_t* IDC_BUTTON_POPUP = L"IDC_BUTTON_POPUP";
+const wchar_t* IDC_BUTTON_PRESSED_BACKGROUND = L"IDC_BUTTON_PRESSED_BACKGROUND";
+const wchar_t* IDC_BUTTON_PROGRESSPOPUP = L"IDC_BUTTON_PROGRESSPOPUP";
+const wchar_t* IDC_BUTTON_SCROLLPANEL = L"IDC_BUTTON_SCROLLPANEL";
+const wchar_t* IDC_BUTTON_STOP = L"IDC_BUTTON_STOP";
+const wchar_t* IDC_BUTTON_TIMEPICKER = L"IDC_BUTTON_TIMEPICKER";
const wchar_t* IDC_BUTTON_UP = L"IDC_BUTTON_UP";
+const wchar_t* IDC_CHECKBUTTON_DISABLE = L"IDC_CHECKBUTTON_DISABLE";
+const wchar_t* IDC_CHECKBUTTON_GROUP_BOTTOM = L"IDC_CHECKBUTTON_GROUP_BOTTOM";
+const wchar_t* IDC_CHECKBUTTON_GROUP_MIDDLE = L"IDC_CHECKBUTTON_GROUP_MIDDLE";
+const wchar_t* IDC_CHECKBUTTON_GROUP_TOP = L"IDC_CHECKBUTTON_GROUP_TOP";
+const wchar_t* IDC_CHECKBUTTON_MARK = L"IDC_CHECKBUTTON_MARK";
+const wchar_t* IDC_CHECKBUTTON_MARK_WITH_DETAILED = L"IDC_CHECKBUTTON_MARK_WITH_DETAILED";
+const wchar_t* IDC_CHECKBUTTON_ONOFF = L"IDC_CHECKBUTTON_ONOFF";
+const wchar_t* IDC_CHECKBUTTON_RADIO = L"IDC_CHECKBUTTON_RADIO";
+const wchar_t* IDC_CHECKBUTTON_RADIO_WITH_DETAILED = L"IDC_CHECKBUTTON_RADIO_WITH_DETAILED";
+const wchar_t* IDC_COLORPICKER = L"IDC_COLORPICKER";
const wchar_t* IDC_EDITAREA = L"IDC_EDITAREA";
+const wchar_t* IDC_EDITDATE = L"IDC_EDITDATE";
+const wchar_t* IDC_EDITDATE_DISABLE = L"IDC_EDITDATE_DISABLE";
+const wchar_t* IDC_EDITDATE_NO_TITLE = L"IDC_EDITDATE_NO_TITLE";
const wchar_t* IDC_EDITFIELD = L"IDC_EDITFIELD";
const wchar_t* IDC_EDITFIELD_DISABLE = L"IDC_EDITFIELD_DISABLE";
const wchar_t* IDC_EDITFIELD_INNERTITLE = L"IDC_EDITFIELD_INNERTITLE";
const wchar_t* IDC_EDITFIELD_TOPTITLE = L"IDC_EDITFIELD_TOPTITLE";
+const wchar_t* IDC_EDITTIME = L"IDC_EDITTIME";
+const wchar_t* IDC_EDITTIME_DISABLE = L"IDC_EDITTIME_DISABLE";
+const wchar_t* IDC_EDITTIME_NO_TITLE = L"IDC_EDITTIME_NO_TITLE";
const wchar_t* IDC_EXPANDABLEEDITAREA1 = L"IDC_EXPANDABLEEDITAREA1";
const wchar_t* IDC_EXPANDABLEEDITAREA2 = L"IDC_EXPANDABLEEDITAREA2";
+const wchar_t* IDC_GALLERY = L"IDC_GALLERY";
const wchar_t* IDC_GROUPEDLISTVIEW = L"IDC_GROUPEDLISTVIEW";
+const wchar_t* IDC_GROUPEDTABLEVIEW = L"IDC_GROUPEDTABLEVIEW";
const wchar_t* IDC_ICONLISTVIEW_HORIZONTAL = L"IDC_ICONLISTVIEW_HORIZONTAL";
const wchar_t* IDC_ICONLISTVIEW_VERTICAL = L"IDC_ICONLISTVIEW_VERTICAL";
const wchar_t* IDC_LABEL1 = L"IDC_LABEL1";
+const wchar_t* IDC_LABEL2 = L"IDC_LABEL2";
+const wchar_t* IDC_LABEL_COLOR = L"IDC_LABEL_COLOR";
const wchar_t* IDC_LABEL_EDITAREA = L"IDC_LABEL_EDITAREA";
const wchar_t* IDC_LABEL_EDITFIELD = L"IDC_LABEL_EDITFIELD";
const wchar_t* IDC_LISTVIEW = L"IDC_LISTVIEW";
+const wchar_t* IDC_PANEL = L"IDC_PANEL";
const wchar_t* IDC_PANEL2 = L"IDC_PANEL2";
const wchar_t* IDC_PROGRESS = L"IDC_PROGRESS";
const wchar_t* IDC_PROGRESS_COLOR = L"IDC_PROGRESS_COLOR";
const wchar_t* IDC_PROGRESS_DISABLE = L"IDC_PROGRESS_DISABLE";
const wchar_t* IDC_SCROLLPANEL = L"IDC_SCROLLPANEL";
const wchar_t* IDC_SEARCHBAR = L"IDC_SEARCHBAR";
+const wchar_t* IDC_SECTIONTABLEVIEW = L"IDC_SECTIONTABLEVIEW";
+const wchar_t* IDC_SECTIONTABLEVIEW1 = L"IDC_SECTIONTABLEVIEW1";
+const wchar_t* IDC_SLIDER = L"IDC_SLIDER";
+const wchar_t* IDC_SLIDER_COLOR = L"IDC_SLIDER_COLOR";
+const wchar_t* IDC_SLIDER_DISABLE = L"IDC_SLIDER_DISABLE";
+const wchar_t* IDC_SLIDER_ICON = L"IDC_SLIDER_ICON";
+const wchar_t* IDC_SLIDER_NO_BACKGROUND = L"IDC_SLIDER_NO_BACKGROUND";
+const wchar_t* IDC_SLIDER_TITLE = L"IDC_SLIDER_TITLE";
const wchar_t* IDC_SPLITPANEL = L"IDC_SPLITPANEL";
+const wchar_t* IDC_TABBAR = L"IDC_TABBAR";
+const wchar_t* IDC_TEXTBOX = L"IDC_TEXTBOX";
const wchar_t* IDF_FORM_ANIMATION = L"IDF_FORM_ANIMATION";
const wchar_t* IDF_FORM_BUTTON = L"IDF_FORM_BUTTON";
const wchar_t* IDF_FORM_CHECKBUTTON = L"IDF_FORM_CHECKBUTTON";
@@ -68,3 +117,4 @@ const wchar_t* IDF_FORM_SLIDER = L"IDF_FORM_SLIDER";
const wchar_t* IDF_FORM_SPLITPANEL = L"IDF_FORM_SPLITPANEL";
const wchar_t* IDF_FORM_TABBAR = L"IDF_FORM_TABBAR";
const wchar_t* IDF_FORM_TABLEVIEW = L"IDF_FORM_TABLEVIEW";
+const wchar_t* IDF_FORM_TEXTBOX = L"IDF_FORM_TEXTBOX";
diff --git a/project/src/BaseForm.cpp b/project/src/BaseForm.cpp
index be09ca8..f390581 100644
--- a/project/src/BaseForm.cpp
+++ b/project/src/BaseForm.cpp
@@ -30,26 +30,9 @@ BaseForm::~BaseForm(void)
{
}
-bool
-BaseForm::SetFooter(void)
-{
- Footer* pFooter = GetFooter();
- pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
- pFooter->SetBackButton();
- return true;
-}
-
void
BaseForm::OnActionPerformed(const Control& source, int actionId)
{
- switch (actionId)
- {
- case ID_EXIT:
- SceneManager* pSceneManager = SceneManager::GetInstance();
- AppAssert(pSceneManager);
- pSceneManager->GoBackward(BackwardSceneTransition());
- break;
- }
}
result
diff --git a/project/src/ExpandableEditAreaForm.cpp b/project/src/ExpandableEditAreaForm.cpp
index f5928d5..2641737 100644
--- a/project/src/ExpandableEditAreaForm.cpp
+++ b/project/src/ExpandableEditAreaForm.cpp
@@ -55,17 +55,6 @@ ExpandableEditAreaForm::OnInitializing(void)
AddOrientationEventListener(*this);
SetFormBackEventListener(this);
- Header* pHeader = GetHeader();
-
- ButtonItem buttonRightItem;
- buttonRightItem.Construct(BUTTON_ITEM_STYLE_TEXT, ID_BUTTON_BACK);
- buttonRightItem.SetText(L"Back");
-
- pHeader->SetStyle(HEADER_STYLE_TITLE);
- pHeader->SetTitleText(L"ExpandableEditArea");
- pHeader->SetButton(BUTTON_POSITION_RIGHT, buttonRightItem);
- pHeader->AddActionEventListener(*this);
-
__pPanel = static_cast<Panel *>(GetControl(IDC_PANEL2, true));
__pLabel = static_cast<Label *>(GetControl(IDC_LABEL1,true));
diff --git a/project/src/FormFactory.cpp b/project/src/FormFactory.cpp
index 9bdefb6..437cdef 100644
--- a/project/src/FormFactory.cpp
+++ b/project/src/FormFactory.cpp
@@ -35,6 +35,7 @@
#include "GroupedListViewForm.h"
#include "IconListViewForm.h"
#include "SearchBarForm.h"
+#include "SectionTableViewForm.h"
#include "EnrichedTextForm.h"
#include "ExpandableEditAreaForm.h"
#include "GalleryForm.h"
@@ -72,6 +73,7 @@ const wchar_t* FORM_OVERLAYKEYPAD = L"Form_OverlayKeypad";
const wchar_t* FORM_PANEL = L"Form_Panel";
const wchar_t* FORM_PROGRESS = L"Form_Progress";
const wchar_t* FORM_SEARCHBAR = L"Form_SearchBar";
+const wchar_t* FORM_SECTIONTABLEVIEW = L"Form_SectionTableView";
const wchar_t* FORM_SLIDER = L"Form_Slider";
const wchar_t* FORM_SPLIT_PANEL = L"Form_SplitPanel";
const wchar_t* FORM_TABLEVIEW = L"Form_TableView";
@@ -224,6 +226,12 @@ FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Sce
pSearchBarForm->Initialize();
pNewForm = pSearchBarForm;
}
+ else if (formId == FORM_SECTIONTABLEVIEW)
+ {
+ SectionTableViewForm* pSectionTableViewForm = new (std::nothrow) SectionTableViewForm();
+ pSectionTableViewForm->Initialize();
+ pNewForm = pSectionTableViewForm;
+ }
else if (formId == FORM_SLIDER)
{
SliderForm* pSliderForm = new (std::nothrow) SliderForm();
diff --git a/project/src/GalleryForm.cpp b/project/src/GalleryForm.cpp
index 6ba6dd7..32665ea 100644
--- a/project/src/GalleryForm.cpp
+++ b/project/src/GalleryForm.cpp
@@ -63,7 +63,7 @@ GalleryForm::OnInitializing(void)
BaseForm::OnInitializing();
result r = E_SUCCESS;
- r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER| FORM_ACTION_BAR_FOOTER, true);
+ r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER, true);
SetOrientation(ORIENTATION_AUTOMATIC);
AddOrientationEventListener(*this);
@@ -250,13 +250,13 @@ GalleryForm::OnGalleryItemClicked(Gallery& view, int index)
{
if (__visible)
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER| FORM_ACTION_BAR_FOOTER, false);
+ SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER, false);
__visible = false;
}
else
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER| FORM_ACTION_BAR_FOOTER, true);
+ SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER, true);
__visible = true;
}
@@ -269,7 +269,7 @@ GalleryForm::OnGallerySlideShowStarted(Gallery& gallery)
PowerManager::KeepScreenOnState(true, false);
if (__visible)
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER| FORM_ACTION_BAR_FOOTER, false);
+ SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER, false);
__visible = false;
}
@@ -285,7 +285,7 @@ GalleryForm::OnGallerySlideShowStopped(Gallery& gallery)
PowerManager::KeepScreenOnState(false, true);
if (!__visible)
{
- SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER| FORM_ACTION_BAR_FOOTER, true);
+ SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR| FORM_ACTION_BAR_HEADER, true);
__visible = true;
}
diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp
index f7a064b..c439be4 100644
--- a/project/src/MainForm.cpp
+++ b/project/src/MainForm.cpp
@@ -25,7 +25,7 @@ using namespace Tizen::Base;
using namespace Tizen::Graphics;
using namespace Tizen::Ui::Scenes;
-static const int ITEM_COUNT = 26;
+static const int ITEM_COUNT = 27;
MainForm::MainForm(void)
: __pList(null)
@@ -39,7 +39,7 @@ MainForm::~MainForm(void)
bool
MainForm::Initialize(void)
{
- Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_INDICATOR| FORM_STYLE_FOOTER);
+ Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_PORTRAIT_INDICATOR);
return true;
}
@@ -47,14 +47,11 @@ result
MainForm::OnInitializing(void)
{
Header* pHeader = GetHeader();
- pHeader->SetTitleText(L"UI CONTROLS");
+ pHeader->SetTitleText(L"UI Controls");
if (!CreateMainList())
{
return false;
}
-
- Footer* pFooter = GetFooter();
- pFooter->SetBackButton();
SetFormBackEventListener(this);
return E_SUCCESS;
@@ -142,21 +139,24 @@ MainForm::OnListViewItemStateChanged(ListView& view, int index, int elementId, L
pSceneManager->GoForward(ForwardSceneTransition(SCENE_SEARCHBAR_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 20:
- pSceneManager->GoForward(ForwardSceneTransition(SCENE_SLIDER_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_SECTION_TABLEVIEW_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 21:
- pSceneManager->GoForward(ForwardSceneTransition(SCENE_SPLIT_PANEL_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_SLIDER_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 22:
- pSceneManager->GoForward(ForwardSceneTransition(SCENE_TABBAR_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_SPLIT_PANEL_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 23:
- pSceneManager->GoForward(ForwardSceneTransition(SCENE_TABLEVIEWER_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_TABBAR_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 24:
- pSceneManager->GoForward(ForwardSceneTransition(SCENE_TEXTBOX_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_TABLEVIEWER_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
case 25:
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_TEXTBOX_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
+ break;
+ case 26:
pSceneManager->GoForward(ForwardSceneTransition(SCENE_QUICK_PANEL_FRAME_FORM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
break;
}
@@ -264,21 +264,24 @@ MainForm::CreateItem(int index, float itemWidth)
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"SearchBar", true);
break;
case 20:
- pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"Slider", true);
+ pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"SectionTableView", true);
break;
case 21:
+ pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"Slider", true);
+ break;
+ case 22:
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"SplitPanel", true);
break;
- case 22:
+ case 23:
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"TabBar", true);
break;
- case 23:
+ case 24:
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"TableView", true);
break;
- case 24:
+ case 25:
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"TextBox", true);
break;
- case 25:
+ case 26:
pItem->AddElement(mainListItemRect, ID_FORMAT_STRING, L"QuickPanelFrame", true);
break;
default:
diff --git a/project/src/OverlayKeypadForm.cpp b/project/src/OverlayKeypadForm.cpp
index fd8ebb8..cf10c5a 100644
--- a/project/src/OverlayKeypadForm.cpp
+++ b/project/src/OverlayKeypadForm.cpp
@@ -192,34 +192,24 @@ OverlayKeypadForm::OnKeypadWillOpen(Control& source)
void
OverlayKeypadForm::OnKeypadOpened(Control& source)
{
+ Footer* pFooter = GetFooter();
+ pFooter->SetItemEnabled(0,true);
+ pFooter->SetItemEnabled(1,true);
+ Invalidate(true);
}
void
OverlayKeypadForm::OnKeypadClosed(Control& source)
{
+ Footer* pFooter = GetFooter();
+ pFooter->SetItemEnabled(0,false);
+ pFooter->SetItemEnabled(1,false);
+ Invalidate(true);
}
void
OverlayKeypadForm::OnTextValueChanged(const Control& source)
{
- Footer* pFooter = GetFooter();
- int cmpEditField, cmpEditArea = -1;
-
- StringComparer strCompare;
- strCompare.Compare(*__pEditFieldPreText,__pEditField->GetText(), cmpEditField);
- strCompare.Compare(*__pEditAreaPreText,__pEditArea->GetText(), cmpEditArea);
-
- if (cmpEditField == 0 && cmpEditArea == 0)
- {
- pFooter->SetItemEnabled(0,false);
- pFooter->SetItemEnabled(1,false);
- }
- else
- {
- pFooter->SetItemEnabled(0,true);
- pFooter->SetItemEnabled(1,true);
- }
- Invalidate(true);
}
void
diff --git a/project/src/QuickPanelFrameForm.cpp b/project/src/QuickPanelFrameForm.cpp
index 2388032..3c16827 100644
--- a/project/src/QuickPanelFrameForm.cpp
+++ b/project/src/QuickPanelFrameForm.cpp
@@ -49,7 +49,7 @@ QuickPanelFrameForm::OnTerminating(void)
bool
QuickPanelFrameForm::Initialize(void)
{
- Form::Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
+ Form::Construct(FORM_STYLE_NORMAL| FORM_STYLE_PORTRAIT_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
return true;
}
diff --git a/project/src/SceneRegister.cpp b/project/src/SceneRegister.cpp
index 4577a30..bcb2a5e 100644
--- a/project/src/SceneRegister.cpp
+++ b/project/src/SceneRegister.cpp
@@ -47,6 +47,7 @@ const wchar_t* SCENE_PANEL_FORM = L"Scene_PanelForm";
const wchar_t* SCENE_PROGRESS_FORM = L"Scene_ProgressForm";
const wchar_t* SCENE_RADIOGROUP_FORM = L"Scene_RadioForm";
const wchar_t* SCENE_SEARCHBAR_FORM = L"Scene_SearchBarForm";
+const wchar_t* SCENE_SECTION_TABLEVIEW_FORM = L"Scene_SectionTableViewForm";
const wchar_t* SCENE_SLIDER_FORM = L"Scene_SliderForm";
const wchar_t* SCENE_SPLIT_PANEL_FORM = L"Scene_SplitPanelForm";
const wchar_t* SCENE_TABBAR_FORM = L"Scene_TabBarForm";
@@ -93,6 +94,7 @@ SceneRegister::RegisterAllScenes(void)
pSceneManager->RegisterScene(SCENE_PANEL_FORM, FORM_PANEL, PANEL_BLANK);
pSceneManager->RegisterScene(SCENE_PROGRESS_FORM, FORM_PROGRESS, PANEL_BLANK);
pSceneManager->RegisterScene(SCENE_SEARCHBAR_FORM, FORM_SEARCHBAR, PANEL_BLANK);
+ pSceneManager->RegisterScene(SCENE_SECTION_TABLEVIEW_FORM, FORM_SECTIONTABLEVIEW, PANEL_BLANK);
pSceneManager->RegisterScene(SCENE_SLIDER_FORM, FORM_SLIDER, PANEL_BLANK);
pSceneManager->RegisterScene(SCENE_SPLIT_PANEL_FORM, FORM_SPLIT_PANEL, PANEL_BLANK);
pSceneManager->RegisterScene(SCENE_TABBAR_FORM, FORM_TABBAR, PANEL_BLANK);
diff --git a/project/src/SectionTableViewForm.cpp b/project/src/SectionTableViewForm.cpp
new file mode 100644
index 0000000..07b3dee
--- /dev/null
+++ b/project/src/SectionTableViewForm.cpp
@@ -0,0 +1,367 @@
+//
+// Tizen native SDK
+// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "SectionTableViewForm.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base;
+
+const wchar_t WIFI_IMAGE[] = L"settings_74_wifi.png";
+const wchar_t BLUETOOTH_IMAGE[] = L"settings_74_bluetooth.png";
+const wchar_t NETWORK_IMAGE[] = L"settings_74_network.png";
+const wchar_t NFC_IMAGE[] = L"settings_74_nfc.png";
+const wchar_t SBEAM_IMAGE[] = L"settings_74_sbeam.png";
+const wchar_t WIFIDIRECT_IMAGE[] = L"settings_74_wifi_direct.png";
+const wchar_t SCREENMIRRORING_IMAGE[] = L"settings_74_allshare.png";
+const wchar_t NEARBYDEVICES_IMAGE[] = L"settings_74_near_device.png";
+const wchar_t KIES_IMAGE[] = L"settings_74_kies_via_wifi.png";
+const wchar_t FLIGHT_IMAGE[] = L"settings_74_flight.png";
+const wchar_t BLOCK_IMAGE[] = L"settings_74_block.png";
+const wchar_t POWER_IMAGE[] = L"settings_74_power_saving_mode.png";
+const wchar_t DRIVEING_IMAGE[] = L"settings_74_driving_mode.png";
+
+SectionTableViewForm::SectionTableViewForm(void)
+ : __pSectionTableView(null)
+ , __pEditField(null)
+ , __pSlider(null)
+ , __pWifiBitmap(null)
+ , __pBluetoothBitmap(null)
+ , __pNetworkBitmap(null)
+ , __pNFCBitmap(null)
+ , __pSBeamBitmap(null)
+ , __pWiFiDirectBitmap(null)
+ , __pScreenMirroringBitmap(null)
+ , __pNearbydevicesBitmap(null)
+ , __pKiesBitmap(null)
+ , __pFlightmodeBitmap(null)
+ , __pBlockingmodeBitmap(null)
+ , __pPowerSavingmodeBitmap(null)
+ , __pDrivingmodeBitmap(null)
+{
+}
+
+SectionTableViewForm::~SectionTableViewForm(void)
+{
+}
+
+bool
+SectionTableViewForm::Initialize(void)
+{
+ Construct(L"IDF_FORM_SECTIONTABLEVIEW");
+ return true;
+}
+
+result
+SectionTableViewForm::OnInitializing(void)
+{
+ BaseForm::OnInitializing();
+ result r = E_SUCCESS;
+
+ GetBitmap();
+
+ __pSectionTableView = static_cast <SectionTableView*> (GetControl("IDC_SECTIONTABLEVIEW", true));
+ __pSectionTableView->SetItemProviderF(this);
+ __pSectionTableView->AddSectionTableViewItemEventListener(*this);
+ AddControl(__pSectionTableView);
+
+ __pEditField = new (std::nothrow) EditField();
+ __pEditField->Construct(FloatRectangle(0, 0, __pSectionTableView->GetWidthF(), GetDefaultItemHeight()), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, true);
+ __pEditField->SetTitleText(L"EditField");
+
+ __pSlider = new (std::nothrow) Slider();
+ __pSlider->Construct(FloatRectangle(0, 0, __pSectionTableView->GetWidthF(), GetDefaultItemHeight()));
+
+ return r;
+}
+
+result
+SectionTableViewForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ delete __pWifiBitmap;
+ delete __pBluetoothBitmap;
+ delete __pNetworkBitmap;
+ delete __pNFCBitmap;
+ delete __pSBeamBitmap;
+ delete __pWiFiDirectBitmap;
+ delete __pScreenMirroringBitmap;
+ delete __pNearbydevicesBitmap;
+ delete __pKiesBitmap;
+ delete __pFlightmodeBitmap;
+ delete __pBlockingmodeBitmap;
+ delete __pPowerSavingmodeBitmap;
+ delete __pDrivingmodeBitmap;
+
+ return r;
+}
+
+int
+SectionTableViewForm::GetSectionCount(void)
+{
+ return SECTION_COUNT;
+}
+
+void
+SectionTableViewForm::GetBitmap(void)
+{
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ __pWifiBitmap = pAppResource->GetBitmapN(WIFI_IMAGE);
+ __pBluetoothBitmap = pAppResource->GetBitmapN(BLUETOOTH_IMAGE);
+ __pNetworkBitmap = pAppResource->GetBitmapN(NETWORK_IMAGE);
+ __pNFCBitmap = pAppResource->GetBitmapN(NFC_IMAGE);
+ __pSBeamBitmap = pAppResource->GetBitmapN(SBEAM_IMAGE);
+ __pWiFiDirectBitmap = pAppResource->GetBitmapN(WIFIDIRECT_IMAGE);
+ __pScreenMirroringBitmap = pAppResource->GetBitmapN(SCREENMIRRORING_IMAGE);
+ __pNearbydevicesBitmap = pAppResource->GetBitmapN(NEARBYDEVICES_IMAGE);
+ __pKiesBitmap = pAppResource->GetBitmapN(KIES_IMAGE);
+ __pFlightmodeBitmap = pAppResource->GetBitmapN(FLIGHT_IMAGE);
+ __pBlockingmodeBitmap = pAppResource->GetBitmapN(BLOCK_IMAGE);
+ __pPowerSavingmodeBitmap = pAppResource->GetBitmapN(POWER_IMAGE);
+ __pDrivingmodeBitmap = pAppResource->GetBitmapN(DRIVEING_IMAGE);
+}
+
+int
+SectionTableViewForm::GetItemCount(int sectionIndex)
+{
+ int itemCount = 0;
+
+ switch (sectionIndex)
+ {
+ case 0:
+ itemCount = 4;
+ break;
+ case 1:
+ itemCount = 5;
+ break;
+ case 2:
+ itemCount = 3;
+ break;
+ default :
+ break;
+ }
+
+ return itemCount;
+}
+
+TableViewItem*
+SectionTableViewForm::CreateItem(int sectionIndex, int itemIndex, float itemWidth)
+{
+ TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ TableViewItem* pItem = new TableViewItem();
+ String text = L"";
+ Label* pLabel = new Label();
+ Label* pBitmap = new (std::nothrow) Label();
+ pBitmap->Construct(FloatRectangle(20.0f, 19.0f, 74.0f, 74.0f), L"");
+ pLabel->Construct(FloatRectangle(0.0f, 0.0f, itemWidth, GetDefaultItemHeight()), text);
+
+ if (sectionIndex % SECTION_COUNT == 0)
+ {
+ switch (itemIndex % 4)
+ {
+ case 0:
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER;
+ text.Format(34, L"Wi-Fi", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pWifiBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 1:
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER;
+ text.Format(34, L"Bluetooth", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pBluetoothBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 2:
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ text.Format(34, L"NFC", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pNFCBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 3:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"Data Network", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pNetworkBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ default:
+ break;
+ }
+ }
+ else if (sectionIndex % SECTION_COUNT == 1)
+ {
+ switch (itemIndex % 5)
+ {
+ case 0:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"S Beam", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pSBeamBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 1:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"Wi-Fi Direct", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pWiFiDirectBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 2:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"Screen Mirroring", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pScreenMirroringBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 3:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"Nearby devices", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pNearbydevicesBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 4:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ text.Format(34, L"Kies via Wi-Fi", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pKiesBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ default:
+ break;
+ }
+ }
+ else if (sectionIndex % SECTION_COUNT == 2)
+ {
+ switch (itemIndex % 3)
+ {
+ case 0:
+ style = TABLE_VIEW_ANNEX_STYLE_DETAILED;
+ text.Format(34, L"Flight mode", itemIndex);
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pBitmap->SetBackgroundBitmap(*__pFlightmodeBitmap);
+ pItem->AddControl(pBitmap);
+ pLabel->SetBounds(FloatRectangle(pBitmap->GetBoundsF().width + 40.0f, 0.0f, itemWidth - pBitmap->GetBoundsF().width, GetDefaultItemHeight()));
+ break;
+ case 1:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pItem->AddControl(__pEditField);
+ break;
+ case 2:
+ style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ pItem->Construct(FloatDimension(itemWidth, GetDefaultItemHeight()), style);
+ pItem->AddControl(__pSlider);
+ break;
+ default:
+ break;
+ }
+ }
+
+ pLabel->SetText(text);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ if (sectionIndex % SECTION_COUNT != 2 || (itemIndex != 1 && itemIndex !=2))
+ pItem->AddControl(pLabel);
+
+ return pItem;
+}
+
+void
+SectionTableViewForm::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
+{
+
+}
+
+float
+SectionTableViewForm::GetDefaultItemHeight(void)
+{
+ return 112.0f;
+}
+
+bool
+SectionTableViewForm::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+
+ return true;
+}
+
+Tizen::Base::String
+SectionTableViewForm::GetSectionHeader(int sectionIndex)
+{
+ String headerText;
+
+ switch (sectionIndex)
+ {
+ case 0:
+ headerText = L"Connectivity";
+ break;
+ case 1:
+ headerText = L"Share and transfer";
+ break;
+ case 2:
+ headerText = L"Mode";
+ break;
+ default :
+ break;
+ }
+
+ return headerText;
+}
+
+bool
+SectionTableViewForm::HasSectionHeader(int sectionIndex)
+{
+ return true;
+}
+
+Tizen::Base::String
+SectionTableViewForm::GetSectionFooter(int sectionIndex)
+{
+ return L"";
+}
+
+bool
+SectionTableViewForm::HasSectionFooter(int sectionIndex)
+{
+ return false;
+}
+
+void
+SectionTableViewForm::OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
+{
+}
+
+void
+SectionTableViewForm::OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
+{
+}
diff --git a/project/src/TextBoxForm.cpp b/project/src/TextBoxForm.cpp
index 83443ac..d07424f 100644
--- a/project/src/TextBoxForm.cpp
+++ b/project/src/TextBoxForm.cpp
@@ -33,8 +33,7 @@ TextBoxForm::~TextBoxForm(void)
bool
TextBoxForm::Initialize(void)
{
- Construct(FORM_STYLE_NORMAL| FORM_STYLE_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
- SetFooter();
+ Construct(FORM_STYLE_NORMAL| FORM_STYLE_PORTRAIT_INDICATOR| FORM_STYLE_HEADER);
return true;
}