|
From: shelarcy <she...@gm...> - 2009-01-02 05:16:59
|
DarcsURL: C:/home/shelarcy/wxhaskell
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=_"
--=_
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Fri Jan 2 14:13:07 =93=8C=8B=9E (=95W=8F=80=8E=9E) 2009 shelarcy <shelarc=
y...@gm...>
* Add toolMenuFromBitmap function (requested by Bernd Holzmueller).
--=_
Content-Type: text/x-darcs-patch; name="add-toolmenufrombitmap-function--_requested-by-bernd-holzmueller__.dpatch"
Content-Transfer-Encoding: quoted-printable
Content-Description: A darcs patch for your repository!
New patches:
[Add toolMenuFromBitmap function (requested by Bernd Holzmueller).
shelarcy <she...@gm...>**20090102051307
Ignore-this: 4554f704bc90617ce767e2cb51816857
] {
hunk ./wx/src/Graphics/UI/WX/Menu.hs 41
, menuItemOnCommandRes, menuLine, menuSub, menuRadioItem
-- * Tool bar
, ToolBar, toolBar, toolBarEx
- , ToolBarItem, toolMenu, toolItem, toolControl, tool
+ , ToolBarItem, toolMenu, toolMenuFromBitmap, toolItem, toolControl, to=
ol
-- * Status bar
, StatusField, statusBar, statusField, statusWidth
-- * Deprecated
hunk ./wx/src/Graphics/UI/WX/Menu.hs 537
-- corresponding menu item.
toolMenu :: ToolBar a -> MenuItem a -> String -> FilePath -> [Prop ToolBar=
Item] -> IO ToolBarItem
toolMenu toolbar menuitem label bitmapPath props
+ =3D withBitmapFromFile bitmapPath $ \bitmap ->
+ toolMenuFromBitmap toolbar menuitem label bitmap props
+
+-- | This is a generalized version of 'toolMenu' function. You can specify=
'Bitmap' that is
+-- loaded from any other place instead of using 'FilePath' directly.
+toolMenuFromBitmap :: ToolBar a -> MenuItem a -> String -> Bitmap b -> [Pr=
op ToolBarItem] -> IO ToolBarItem
+toolMenuFromBitmap toolbar menuitem label bitmap props
=3D do isToggle <- get menuitem checkable
id <- get menuitem identity
lhelp <- get menuitem help
hunk ./wx/src/Graphics/UI/WX/Menu.hs 548
shelp <- get menuitem help
- withBitmapFromFile bitmapPath $ \bitmap ->
- do toolBarAddTool2 toolbar id label bitmap nullBitmap =
- (if isToggle then wxITEM_CHECK else wxITEM_NOR=
MAL)
- shelp lhelp
- let t =3D ToolBarItem (downcastToolBar toolbar) id isToggle
- set t props
- toolBarRealize toolbar
- return t
- =
+ toolBarAddTool2 toolbar id label bitmap nullBitmap =
+ (if isToggle then wxITEM_CHECK else wxITEM_NORMAL)
+ shelp lhelp
+ let t =3D ToolBarItem (downcastToolBar toolbar) id isToggle
+ set t props
+ toolBarRealize toolbar
+ return t
+
-- | Create an /orphan/ toolbar item that is unassociated with a menu. Tak=
es a =
-- label, a flag that is 'True' when the item is 'checkable' and a path to=
an image
-- (bmp,png,gif,ico,etc.) as arguments.
hunk ./wxc/src/eljdc.cpp 663
#endif=0D
}=0D
=0D
-#if (wxVERSION_NUMBER >=3D 2800)=0D
+#if wxCHECK_VERSION (2,8,0)=0D
EWXWEXPORT(void, wxDC_DrawLabel)(void* _obj, void *str, int x, int y, int =
w, int h, int align, int indexAccel)=0D
{=0D
wxRect rect(x, y, w, h);=0D
}
Context:
[Fix: Hardcoded wxNB_* layout style doesn't works well when using wxWidgets=
2.8.x. =
shelarcy <she...@gm...>**20081226144925
Ignore-this: bbc473ee95a5adb12a3706a3991b6ae5
] =
[Set Release version to 0.11.0
shelarcy <she...@gm...>**20081223224013
Ignore-this: 821416dd762e7831bbbddada8ec3f7e6
] =
[Bump version number to 0.11.0
shelarcy <she...@gm...>**20081223223920
Ignore-this: afafd04b0a0f0aac470563a679a71d30
] =
[Add Homepage field to .cabal file.
shelarcy <she...@gm...>**20081223142850
Ignore-this: cc01f7082f7b3d2b5a1083ea02716b0c
] =
[Update change.txt for wxHaskell 0.11.0 release.
shelarcy <she...@gm...>**20081223065839
Ignore-this: 69302b9bc2f16ccb2403d33ab525db9b
] =
[just change indentation in wxWindow_GetChildren function.
shelarcy <she...@gm...>**20081217155236
Ignore-this: a6602734698b0348e5699bc1f730be8d
] =
[Use wxWindowList::compatibility_iterator in wxc to avoid building problem.
h8...@go...**20081217062225] =
[TAG 0.11.0rc1_3
shelarcy <she...@gm...>**20081214235542] =
Patch bundle hash:
05ee7400b8a5ee77628862f0d0c9a2fdc26b4918
--=_--
.
|