3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.tizenopensource.org/license
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef _BROWSER_FORM_H_
19 #define _BROWSER_FORM_H_
25 #include "MultiForm.h"
27 using namespace Osp::Base;
29 class BrowserFormParam
38 BrowserFormParam(const Osp::Base::String initDir, const Osp::Base::String filter, bool lock)
40 this->initDir = initDir;
44 this->filter = filter;
51 String fileName; // out
52 String formName; // callback form
53 void* formParam; // callback param
59 , public Osp::Ui::IItemEventListener
63 virtual ~BrowserForm();
64 bool Initialize(void);
66 static result TestFunc(void* pParam);
70 virtual result OnActivate(void* param);
72 result OnInitializing(void);
73 void SetFilter(const Osp::Base::String& filter) { __filter = filter; }
74 result BrowseDirectory(const Osp::Base::String& dirName);
75 void OnItemStateChanged(const Osp::Ui::Control& source, int index, int itemId, Osp::Ui::ItemStatus status);
76 void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
78 bool IsFiltered(const Osp::Base::String& filter, const Osp::Base::String& ext);
81 CONST_INT(ITEM_DIRECTORY);
83 CONST_INT(ITEM_PREV_DIRECTORY);
84 CONST_INT(ITEM_IMAGE_FILE);
85 CONST_INT(ITEM_AUDIO_FILE);
86 CONST_INT(ITEM_VIDEO_FILE);
87 CONST_INT(ITEM_PLS_FILE);
92 Osp::Ui::Controls::List* __pListCtrl;
93 Osp::Media::Image* __pImage;
94 Osp::Graphics::Bitmap* __pFileBmp;
95 Osp::Graphics::Bitmap* __pFolderBmp;
96 Osp::Graphics::Bitmap* __pImageBmp;
97 Osp::Graphics::Bitmap* __pVideoBmp;
98 Osp::Graphics::Bitmap* __pAudioBmp;
100 Osp::Base::Collection::ArrayList* __pEntryList;
101 Osp::Base::String* __pCurDirectory;
102 Osp::Base::String* __pSrcCopyFile;
103 Osp::Base::String __lastPath;
105 Osp::Ui::Controls::Button* __pButtonRecorder;
106 BrowserFormParam* __pParam;
110 #endif // _BROWSER_FORM_H_