App-Chart

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

lib/App/Chart/Gtk2/Ex/GdkColorAlloc.pm
lib/App/Chart/Gtk2/Ex/GdkRectangleBits.pm
lib/App/Chart/Gtk2/Ex/GdkWindowTracker.pm
lib/App/Chart/Gtk2/Ex/GtkGCBits.pm
lib/App/Chart/Gtk2/Ex/LineClipper.pm
lib/App/Chart/Gtk2/Ex/ListModelPos.pm
lib/App/Chart/Gtk2/Ex/ListOfListsModel.pm
lib/App/Chart/Gtk2/Ex/ListStore/DBI.pm
lib/App/Chart/Gtk2/Ex/ListStore/DragByCopy.pm
lib/App/Chart/Gtk2/Ex/ListStoreDBISeq.pm
lib/App/Chart/Gtk2/Ex/MenuBits.pm
lib/App/Chart/Gtk2/Ex/MenuItem/EmptyInsensitive.pm
lib/App/Chart/Gtk2/Ex/NotebookLazyPages.pm
lib/App/Chart/Gtk2/Ex/RadioGroup.pm
lib/App/Chart/Gtk2/Ex/TextViewBits.pm
lib/App/Chart/Gtk2/Ex/ToplevelBits.pm
lib/App/Chart/Gtk2/Ex/ToplevelSingleton.pm
lib/App/Chart/Gtk2/Ex/TreeModelBits.pm
lib/App/Chart/Gtk2/Ex/TreePath/Circular.pm
lib/App/Chart/Gtk2/Ex/TreePath/Subclass.pm
lib/App/Chart/Gtk2/Ex/TreeRowPosition.pm
lib/App/Chart/Gtk2/Ex/WidgetBits.pm

MANIFEST  view on Meta::CPAN

lib/App/Chart/Gtk2/IntradayImage.pm
lib/App/Chart/Gtk2/IntradayModeComboBox.pm
lib/App/Chart/Gtk2/IntradaySave.pm
lib/App/Chart/Gtk2/Job.pm
lib/App/Chart/Gtk2/Job/Download.pm
lib/App/Chart/Gtk2/Job/Intraday.pm
lib/App/Chart/Gtk2/Job/Latest.pm
lib/App/Chart/Gtk2/JobQueue.pm
lib/App/Chart/Gtk2/JobsRunningDialog.pm
lib/App/Chart/Gtk2/JobStatusbarMessage.pm
lib/App/Chart/Gtk2/JobStopMenu.pm
lib/App/Chart/Gtk2/LineStyle/Bars.pm
lib/App/Chart/Gtk2/LineStyle/Candles.pm
lib/App/Chart/Gtk2/LineStyle/HighLow.pm
lib/App/Chart/Gtk2/LineStyle/Line.pm
lib/App/Chart/Gtk2/LineStyle/None.pm
lib/App/Chart/Gtk2/LineStyle/OHLC.pm
lib/App/Chart/Gtk2/LineStyle/Points.pm
lib/App/Chart/Gtk2/LineStyle/Stops.pm
lib/App/Chart/Gtk2/LineStyleComboBox.pm
lib/App/Chart/Gtk2/Main.pm
lib/App/Chart/Gtk2/OpenDialog.pm
lib/App/Chart/Gtk2/OpenModel.pm
lib/App/Chart/Gtk2/PreferencesDialog.pm
lib/App/Chart/Gtk2/RawDialog.pm
lib/App/Chart/Gtk2/RawInfo.pm
lib/App/Chart/Gtk2/RawLatest.pm
lib/App/Chart/Gtk2/SeriesModel.pm
lib/App/Chart/Gtk2/SeriesTreeView.pm
lib/App/Chart/Gtk2/Smarker.pm
lib/App/Chart/Gtk2/Subprocess.pm
lib/App/Chart/Gtk2/SubprocessStopMenu.pm
lib/App/Chart/Gtk2/Symlist.pm
lib/App/Chart/Gtk2/Symlist/Alerts.pm
lib/App/Chart/Gtk2/Symlist/All.pm
lib/App/Chart/Gtk2/Symlist/Alphabetical.pm
lib/App/Chart/Gtk2/Symlist/Constructed.pm
lib/App/Chart/Gtk2/Symlist/Favourites.pm
lib/App/Chart/Gtk2/Symlist/Glob.pm
lib/App/Chart/Gtk2/Symlist/Historical.pm
lib/App/Chart/Gtk2/Symlist/Join.pm
lib/App/Chart/Gtk2/Symlist/User.pm
lib/App/Chart/Gtk2/SymlistComboBox.pm
lib/App/Chart/Gtk2/SymlistListModel.pm
lib/App/Chart/Gtk2/SymlistRadioMenu.pm
lib/App/Chart/Gtk2/SymlistTreeModel.pm
lib/App/Chart/Gtk2/Ticker.pm
lib/App/Chart/Gtk2/TickerMain.pm
lib/App/Chart/Gtk2/TickerMenu.pm
lib/App/Chart/Gtk2/TickerModel.pm
lib/App/Chart/Gtk2/VacuumDialog.pm
lib/App/Chart/Gtk2/View.pm
lib/App/Chart/Gtk2/ViewStyleDialog.pm
lib/App/Chart/Gtk2/WatchlistDialog.pm
lib/App/Chart/Gtk2/WatchlistModel.pm
lib/App/Chart/Gtk2/WatchlistSymbolMenu.pm
lib/App/Chart/Gtk2/WeblinkMenu.pm
lib/App/Chart/IndicatorInfo.pm
lib/App/Chart/Intraday.pm
lib/App/Chart/IntradayHandler.pm
lib/App/Chart/Latest.pm
lib/App/Chart/LatestHandler.pm
lib/App/Chart/LinReg.pm
lib/App/Chart/Manual.pm
lib/App/Chart/Math/Moving.pm
lib/App/Chart/Math/Moving/EMA.pm
lib/App/Chart/Memoize/ConstSecond.pm

MANIFEST  view on Meta::CPAN

t/HAxis.t
t/Heading.t
t/HScale.t
t/Ichimoku.t
t/IndicatorInfo.t
t/IndicatorModel.t
t/IntradayDialog.t
t/IntradayImage.t
t/Job.t
t/JobStatusbarMessage.t
t/JobStopMenu.t
t/KAMA.t
t/LaguerreFilter.t
t/LatestHandler.t
t/ListStoreDBISeq.t
t/LME.t
t/Manual.t
t/MLC.t
t/MX.t
t/MyTestHelpers.pm
t/NoSuffix.t

META.json  view on Meta::CPAN

            "Gtk2::Ex::Dragger" : "2",
            "Gtk2::Ex::EntryBits" : "11",
            "Gtk2::Ex::ErrorTextDialog" : "2",
            "Gtk2::Ex::ErrorTextDialog::Handler" : "2",
            "Gtk2::Ex::GdkBits" : "23",
            "Gtk2::Ex::History" : "1",
            "Gtk2::Ex::History::Action" : "1",
            "Gtk2::Ex::KeySnooper" : "3",
            "Gtk2::Ex::Lasso" : "1",
            "Gtk2::Ex::ListModelConcat" : "1",
            "Gtk2::Ex::MenuBits" : "17",
            "Gtk2::Ex::MenuView" : "1",
            "Gtk2::Ex::NoShrink" : "2",
            "Gtk2::Ex::NumAxis" : "4",
            "Gtk2::Ex::PixbufBits" : "35",
            "Gtk2::Ex::Statusbar::Message" : "47",
            "Gtk2::Ex::Statusbar::MessageUntilKey" : "11",
            "Gtk2::Ex::TableBits" : "47",
            "Gtk2::Ex::TextBufferBits" : "18",
            "Gtk2::Ex::TextView::FollowAppend" : "1",
            "Gtk2::Ex::TickerView" : "7",
            "Gtk2::Ex::TreeModel::ImplBits" : "17",

META.yml  view on Meta::CPAN

  Gtk2::Ex::Dragger: '2'
  Gtk2::Ex::EntryBits: '11'
  Gtk2::Ex::ErrorTextDialog: '2'
  Gtk2::Ex::ErrorTextDialog::Handler: '2'
  Gtk2::Ex::GdkBits: '23'
  Gtk2::Ex::History: '1'
  Gtk2::Ex::History::Action: '1'
  Gtk2::Ex::KeySnooper: '3'
  Gtk2::Ex::Lasso: '1'
  Gtk2::Ex::ListModelConcat: '1'
  Gtk2::Ex::MenuBits: '17'
  Gtk2::Ex::MenuView: '1'
  Gtk2::Ex::NoShrink: '2'
  Gtk2::Ex::NumAxis: '4'
  Gtk2::Ex::PixbufBits: '35'
  Gtk2::Ex::Statusbar::Message: '47'
  Gtk2::Ex::Statusbar::MessageUntilKey: '11'
  Gtk2::Ex::TableBits: '47'
  Gtk2::Ex::TextBufferBits: '18'
  Gtk2::Ex::TextView::FollowAppend: '1'
  Gtk2::Ex::TickerView: '7'
  Gtk2::Ex::TreeModel::ImplBits: '17'

Makefile.PL  view on Meta::CPAN

    'Gtk2::Ex::CrossHair' => 17, # v.17 for arrayref copy
    'Gtk2::Ex::Lasso' => 1,

    # my Gtk2-Ex-WidgetBits
    'Gtk2::Ex::WidgetBits'     => 10,
    'Gtk2::Ex::AdjustmentBits' => 47, # v.47 for set_empty()
    'Gtk2::Ex::ActionTooltips' => 10, # new in version 10
    'Gtk2::Ex::EntryBits'      => 11, # new in version 11
    'Gtk2::Ex::GdkBits'        => 23, # v.23 for window_clear_region
    'Gtk2::Ex::KeySnooper'     => 3,
    'Gtk2::Ex::MenuBits'       => 17,             # new in version 17
    'Gtk2::Ex::PixbufBits'     => 35,             # new in version 35
    'Gtk2::Ex::Statusbar::Message'         => 47, # new in version 47
    'Gtk2::Ex::Statusbar::MessageUntilKey' => 11, # new in version 11
    'Gtk2::Ex::TableBits'      => 47,             # new in version 47
    'Gtk2::Ex::TreeModelBits'  => 16,
    'Gtk2::Ex::TreeViewBits'   => 8,              # new in version 8
    'Gtk2::Ex::TextBufferBits' => 18,             # new in version 18
    'Gtk2::Ex::TreeModelFilter::Change' => 9,     # new in version 9
    'Gtk2::Ex::TreeModel::ImplBits'     => 17,    # new in version 17
    'Gtk2::Ex::Units'          => 13,             # new in version 13

Makefile.PL  view on Meta::CPAN

    # my Gtk2-Ex-ErrorTextDialog
    # version 2 for warnings with compile errors
    'Gtk2::Ex::ErrorTextDialog' => 2,
    'Gtk2::Ex::ErrorTextDialog::Handler' => 2,
    'Gtk2::Ex::TextView::FollowAppend' => 1,

    'Gtk2::Ex::History' => 1,
    'Gtk2::Ex::History::Action' => 1,

    'Gtk2::Ex::ListModelConcat' => 1,
    'Gtk2::Ex::MenuView' => 1,
    'Gtk2::Ex::NoShrink' => 2,     # version 2 losing dubious "-1" bits
    'Gtk2::Ex::NumAxis' => 4,      # version 4 preferred for scrolling
    'Gtk2::Ex::TickerView' => 7,   # version 7 for bug fixes
    'Gtk2::Ex::TreeModelFilter::Draggable' => 0,
    'Gtk2::Ex::WidgetCursor' => 8, # version 8 to get SpinButton in Gtk 2.14

    # FIXME: version 2.10 has Gtk '-init' which tries to open the display ...
    'Gtk2::Ex::Datasheet::DBI' => 0,

    'HTML::LinkExtor' => 0, # part of HTML::Parser, only for RBA actually

SIGNATURE  view on Meta::CPAN

SHA256 dbba180e27ecc7d07843ff6b39ba458cd6df7d4d4c868b8f306b0143131d88e5 lib/App/Chart/Gtk2/Ex/GdkColorAlloc.pm
SHA256 1408768f052f5ecfb24f5470a242f9de43f77e324ed5db89b2ca692f4a4d6175 lib/App/Chart/Gtk2/Ex/GdkRectangleBits.pm
SHA256 a5f025b743213765048798465bd11f827b1ab9447ab8be1bf73f140401e9c429 lib/App/Chart/Gtk2/Ex/GdkWindowTracker.pm
SHA256 161037feb17f8cb72f67046b39b2b8bb7f977dd0024ca0b06bc72e6dc25770ed lib/App/Chart/Gtk2/Ex/GtkGCBits.pm
SHA256 05e1c0636411d811c3ae235504ce078f5132fd8039536236c87037c6c227d2b2 lib/App/Chart/Gtk2/Ex/LineClipper.pm
SHA256 32e8f31bba618a7385441b9189b58ed00dd1cff45abc531b31797b43dcb40fa7 lib/App/Chart/Gtk2/Ex/ListModelPos.pm
SHA256 399d4531599c3866d561beb758eeb8a3342af121c7c1c0fdae4ac2af63faebd9 lib/App/Chart/Gtk2/Ex/ListOfListsModel.pm
SHA256 22aa051434a8a1104f8fc815b6cbb57d5209c9adc204fd17ecf8f9a35bd219bf lib/App/Chart/Gtk2/Ex/ListStore/DBI.pm
SHA256 5c879cf4b57b4a30da767c8c8e82a71a105151ddf1d23b167c626f3ac54ea3c1 lib/App/Chart/Gtk2/Ex/ListStore/DragByCopy.pm
SHA256 1a0a375f9d067a8440234b2552cc3a09e351a658a9a33c5aa9897a6f1517605b lib/App/Chart/Gtk2/Ex/ListStoreDBISeq.pm
SHA256 563a34a0dfbf6848846d1a8e822e49d9318743bbefd69ed44da1dbaeaf0f5263 lib/App/Chart/Gtk2/Ex/MenuBits.pm
SHA256 f0f55074292b83685e0d885aa803e3b057dfe6bb1a7a26734af66558d0dc6a00 lib/App/Chart/Gtk2/Ex/MenuItem/EmptyInsensitive.pm
SHA256 067dc048a500e307f0645823892909fee91d2d1cbef0276f6568b64c44a08e69 lib/App/Chart/Gtk2/Ex/NotebookLazyPages.pm
SHA256 0eae1d8c340b18827a4f33973637ace5df0cdb618f1c380461dd23ffd70dc128 lib/App/Chart/Gtk2/Ex/RadioGroup.pm
SHA256 329697bf9fa9aef9f29fa3213b1c34b45acf9df566d22cc3155effb67e70624a lib/App/Chart/Gtk2/Ex/TextViewBits.pm
SHA256 aa12f9add424f0f68d078c783d4dd8b74903c978b3207dab22698798610712da lib/App/Chart/Gtk2/Ex/ToplevelBits.pm
SHA256 b39c5bccf4208a4d4daceb2b3338cd901b0e71d485060e92bf757ab4c40163fd lib/App/Chart/Gtk2/Ex/ToplevelSingleton.pm
SHA256 eafac779cd7e124c1c06d167b1b6e9313416bc6d1f5d30bae3e624f25212e379 lib/App/Chart/Gtk2/Ex/TreeModelBits.pm
SHA256 d103cd47040aea3d91fb566f6812b08b1f162cd739a5edd32d3cea0bd31967c7 lib/App/Chart/Gtk2/Ex/TreePath/Circular.pm
SHA256 8adaabed951728a9582510d9617b1d31a12531868318f0a3f2c9feaec3b534a2 lib/App/Chart/Gtk2/Ex/TreePath/Subclass.pm
SHA256 e6d1e081d5d03eae2ca2c76ba6fb41566f37b4894c620d937fdf9f6fbe971c4b lib/App/Chart/Gtk2/Ex/TreeRowPosition.pm
SHA256 2507c4aa0c003caf1004301629639966a204ceb28ca5957cad91b22de2334220 lib/App/Chart/Gtk2/Ex/WidgetBits.pm

SIGNATURE  view on Meta::CPAN

SHA256 eb5b9b65c3255d172a7a3bb84fe89ca0a76b1c7dc999657d983711f03b606ec4 lib/App/Chart/Gtk2/IntradayDialog.pm
SHA256 e74c2be2ad953fca3edad55dab0d6cfa6ccd41e6925916616ed24d9892a526e0 lib/App/Chart/Gtk2/IntradayImage.pm
SHA256 80a924cc664976ae55bf303044145df8d6b222605b169513602343a4342fccf6 lib/App/Chart/Gtk2/IntradayModeComboBox.pm
SHA256 3050cb1979a26829bce7fa2d763305d8578ba69fe716009a7d56d7574e9e947d lib/App/Chart/Gtk2/IntradaySave.pm
SHA256 1f124bb973dd2ebd81e369dff5b2458bcdcfb3fa0ce25c02e27b01a13e9bea54 lib/App/Chart/Gtk2/Job.pm
SHA256 05b78f6924461b91ae582eedf8caca4aa7e2cf367db40332123a47b87a75aabf lib/App/Chart/Gtk2/Job/Download.pm
SHA256 423d514f73b5f277e90488d8507730587aec895a57582c5e400a6c51579eeb18 lib/App/Chart/Gtk2/Job/Intraday.pm
SHA256 131ab718893a76b299ed34270a40d1c1b6b4c0892b90dd61c8056e33902be1ec lib/App/Chart/Gtk2/Job/Latest.pm
SHA256 b127122176c1ea61f68924141160f1ae1cb570ed8fd9aae67d40f8d55af8b5cf lib/App/Chart/Gtk2/JobQueue.pm
SHA256 03425566c5d2b6f2c57cbf1a6a73a285ec487ab076b62e96ddbe90292a6d9418 lib/App/Chart/Gtk2/JobStatusbarMessage.pm
SHA256 1a3b8ea82d947dc8ab8cb9bc5ef13f8d5e2f60b780ce34dccc4cd24d9170285b lib/App/Chart/Gtk2/JobStopMenu.pm
SHA256 944a171eb9f56098aac3de6c1ef1dfd3886ea49b6f820cb6cc8577a6cfcba470 lib/App/Chart/Gtk2/JobsRunningDialog.pm
SHA256 bdc88469d8d778e4e8d27ac57a3cdadb15b4c5290d087514cd1906d1a8cfa0b8 lib/App/Chart/Gtk2/LineStyle/Bars.pm
SHA256 ee747f4456c738369845404a95a0e2fcb71d10f8f6eb7f0884243af545721d55 lib/App/Chart/Gtk2/LineStyle/Candles.pm
SHA256 2039b1270587aeec00de16a5c56d35418c522cf7a52ccaf8cb3c6e1472539332 lib/App/Chart/Gtk2/LineStyle/HighLow.pm
SHA256 1fccc01c038956d8a066616f04b1800a99bd81579a39229dee55ea9065918597 lib/App/Chart/Gtk2/LineStyle/Line.pm
SHA256 edbed6dc2ee997c180ac7a8d04b14f6d07cb017022e80151e2674a26b821ee0b lib/App/Chart/Gtk2/LineStyle/None.pm
SHA256 7652932131d907ee961c9aa385320c9e8392bb023073b0219222ae977706910b lib/App/Chart/Gtk2/LineStyle/OHLC.pm
SHA256 1a68c5326dd8e67825a36131b3f465446c8f4e82a83c38fdd7d8b4e4060c6474 lib/App/Chart/Gtk2/LineStyle/Points.pm
SHA256 dbda038b5d972aaeafa0adddb353e4ed85a6b32efb8726f3610e2dd507616152 lib/App/Chart/Gtk2/LineStyle/Stops.pm
SHA256 985aab0352425aa1ba3f22ffb170dad0c0aee3085a968fcdbdd17ba14fdf8677 lib/App/Chart/Gtk2/LineStyleComboBox.pm

SIGNATURE  view on Meta::CPAN

SHA256 77d06c5be7797c711d9e86c5ee0bb0f331bb35527669336bb894e2fae4278160 lib/App/Chart/Gtk2/OpenDialog.pm
SHA256 32c42c374fa45b65d2d6ce6fc8b80ebf3fef3076e2cb33878ee520a5ef7449eb lib/App/Chart/Gtk2/OpenModel.pm
SHA256 f56ee90e54bf044af0a1558101d422c4b29d4823663cf476c938d67ba55b0c2f lib/App/Chart/Gtk2/PreferencesDialog.pm
SHA256 bc8e034133cac01ced3edd573d253020f9e6a032387127260628ae9e66dc0029 lib/App/Chart/Gtk2/RawDialog.pm
SHA256 1d80e43bd2e9ec4b9e42724f07a74428e8bf7bd19daabf2dee399a66364206e2 lib/App/Chart/Gtk2/RawInfo.pm
SHA256 b9079f39951c44518ab6e05a9a69ed44729805603d481d5d6afc090337e9f81f lib/App/Chart/Gtk2/RawLatest.pm
SHA256 9a39a1cded435d9ffb790aab08131a687305767fca22dcc84ea78f59b7a15577 lib/App/Chart/Gtk2/SeriesModel.pm
SHA256 e9bf1c5e52ff3e1a5e699de8e65208fcae6f931d16f118ef1de9cd7424ff1eb8 lib/App/Chart/Gtk2/SeriesTreeView.pm
SHA256 6a8114e70a22f56bfa9dbced14950054f5b68535f34d27d5eb13a9e2e652c645 lib/App/Chart/Gtk2/Smarker.pm
SHA256 f03efd716ee1652f8e84a2367b7edd9f40626dc9bff5747206a8c65d7dda4dd7 lib/App/Chart/Gtk2/Subprocess.pm
SHA256 bfd26134ec36893b0e61f3a35649a73d34e47991de4ca5493eaf5d2d8c76cc0e lib/App/Chart/Gtk2/SubprocessStopMenu.pm
SHA256 9a71a3470028a487cd94465207de4c9121308733f88e187f11f2652d59d6f8cc lib/App/Chart/Gtk2/Symlist.pm
SHA256 7b9512ad46e0cd34eac5db92d3d7d902fd1634a270ff49ae7adec3a7dbb1ca28 lib/App/Chart/Gtk2/Symlist/Alerts.pm
SHA256 6f26a7bacdf5d670336c8b16273bac11ff6b53d42648015c72d1b4ff43c69a26 lib/App/Chart/Gtk2/Symlist/All.pm
SHA256 4785e2b1d256b0e6e487827b14db5246a74a27fd5300bafa4baf2d02b040d067 lib/App/Chart/Gtk2/Symlist/Alphabetical.pm
SHA256 99225c5ce4491b13489a47a9ed5f1338e9ab3d2a2e7c70a999f31319134df5c4 lib/App/Chart/Gtk2/Symlist/Constructed.pm
SHA256 f6f0e73fab9980b0f4340c4604d4288c77cc87b506ba73ff397aad4ec0264970 lib/App/Chart/Gtk2/Symlist/Favourites.pm
SHA256 c5fbddf12ca88a4c003ba9a51ea7debac1562784c5187384492507206bc95eb7 lib/App/Chart/Gtk2/Symlist/Glob.pm
SHA256 f231665c7401d4871b66a8a56919f5979f5f82d690bd90eee0a3204101e23d48 lib/App/Chart/Gtk2/Symlist/Historical.pm
SHA256 7153755eff28654a6b29272e1654aee3e0448be8eee0f7f264ce690b1d8f3027 lib/App/Chart/Gtk2/Symlist/Join.pm
SHA256 58d5cf195143dccaf7d0241b205f8519290faaa0638ad0637cc5271679b3fe85 lib/App/Chart/Gtk2/Symlist/User.pm
SHA256 efdd75371ab2ebc19940c547c894843fa9b5f00222ea84f54afda08cde59b708 lib/App/Chart/Gtk2/SymlistComboBox.pm
SHA256 47c39d5da0fb160d83f38442285933eae172ce577164c37564fd60999b333f73 lib/App/Chart/Gtk2/SymlistListModel.pm
SHA256 be3fada5f3257373316b5a96445a35472551ce2f1387618852469654bfbf16f8 lib/App/Chart/Gtk2/SymlistRadioMenu.pm
SHA256 15fd118a3d1c172fe8c7ed232ef7f98c4bdc51bc32593b58cda2246b754e9dc9 lib/App/Chart/Gtk2/SymlistTreeModel.pm
SHA256 b76fe485ee46fbfa387aaf9ac47c240c29540047925654ec18ffd0ba93b007c7 lib/App/Chart/Gtk2/Ticker.pm
SHA256 4e65284540ee0d20fa21bcb89a6a1ceef89167cbd3b69805403597553e7eb0c7 lib/App/Chart/Gtk2/TickerMain.pm
SHA256 64b759ee62820dba1a609611dfcb663b47be3a6a643319f9cabc5356ecc59555 lib/App/Chart/Gtk2/TickerMenu.pm
SHA256 75f300f0b00cd514442b29d6320817e890a4375443bd62b520418a01ce5d7d7b lib/App/Chart/Gtk2/TickerModel.pm
SHA256 1d17e599c3f820e4b002292d2b723f3f8930a83ffe8dd164ecc9813afe94257b lib/App/Chart/Gtk2/VacuumDialog.pm
SHA256 757b8670b797aab193e42288c1206990dbd8829f5057fd3928e2028f2cb1971f lib/App/Chart/Gtk2/View.pm
SHA256 33148f15d4ff61c00c7a56bea84899149970107bb63792c95277081d3f354769 lib/App/Chart/Gtk2/ViewStyleDialog.pm
SHA256 e1128198c06f52e1d7ae998689f46b433f550d42da317eabcae59afd3bf20042 lib/App/Chart/Gtk2/WatchlistDialog.pm
SHA256 e1544d62ca70c36e0da5d68561f30202c6717dcffd8400d061d68a03b811a534 lib/App/Chart/Gtk2/WatchlistModel.pm
SHA256 09958a375527c2c4f914a915f4454730daf46a0787acab0a1890e2e70a15fa5e lib/App/Chart/Gtk2/WatchlistSymbolMenu.pm
SHA256 39e45c4674ede607b6fd5d7f95c0c852b4d4fb2b0a3cc37cea442e9ee2b0d30f lib/App/Chart/Gtk2/WeblinkMenu.pm
SHA256 4daf8d66629f7a7ce1fbcd1eb1dc6fdfdfe71d7bcd634bc8a8a3d76edf726f2b lib/App/Chart/IndicatorInfo.pm
SHA256 b9e8e2e43e26f408ffe31b6f23fdf4725bcbc9b601a6a5d8eb33c983c4d7d769 lib/App/Chart/Intraday.pm
SHA256 894a01a52e874ed28dabe7f229d6d8f543c90ceb1d49b8c9ce7db930b0af27f9 lib/App/Chart/IntradayHandler.pm
SHA256 abf79af9765c7e9c46cfb1539a8fd4f481d33eb67040da3ee5e3d853524ba903 lib/App/Chart/Latest.pm
SHA256 53a75b46b847c99ed4f6a05947fb8cd230085da7581c6e3272f1728dadbf4a3f lib/App/Chart/LatestHandler.pm
SHA256 5d2ccaf712c297f47787a85a9aaeccc4bc159b8db60a154591198451f0949c3d lib/App/Chart/LinReg.pm
SHA256 d8f6c5a86de138b69289d96a4c8d4ca490829bf8bea29314b331624d54d085eb lib/App/Chart/Manual.pm
SHA256 8528f7b4387986b817362ced0cd1497ecdb80c7ae2345b5445a0c05e9f5341e1 lib/App/Chart/Math/Moving.pm
SHA256 0781989eb36d57364ee9c806fd2998e259ca6f933b35975d17e01c8552cf2ede lib/App/Chart/Math/Moving/EMA.pm
SHA256 952ce0092be2ce9fe139c6e7369b24596b64dd528dfb21fa0d9fd7af50319411 lib/App/Chart/Memoize/ConstSecond.pm

SIGNATURE  view on Meta::CPAN

SHA256 0aba44b3d64ccc357affdeac9bea4d5b621ed1a73100442cfd723ea80cb262ae t/HAxis.t
SHA256 e03da9da0b05eaf70758e784413bd237d42039919b8e6f4550b6410ef294c44d t/HScale.t
SHA256 229c7b2bccd35a984479efb7cb5bc09b8f4aa1aff04475f2416b8b35fe1ce7fb t/Heading.t
SHA256 3a3a822d45d0c38ab29a9993baf8b5b791db0b8808114cf2bd33f15e911d8b14 t/Ichimoku.t
SHA256 438127afc99f3405e0cce9302336081692b62d00f3255f2d8b75c43e01b603b5 t/IndicatorInfo.t
SHA256 c5275fc0487f410b09fa5e7d3151b80587441fbecd8dcbac61fc85a0c2db6656 t/IndicatorModel.t
SHA256 62c1308253950653c5a0734811b2ffc48150b104c35f2857f7da27c531289ec6 t/IntradayDialog.t
SHA256 2fd2a3d6dabb45e01227f797f5bcadc42fba052e8f4acd42aa139d1f2ecd23ef t/IntradayImage.t
SHA256 6960d07eba9561803e29c163a40ae59734eb5c38226da37bb3e50ead0fb30c62 t/Job.t
SHA256 915a892817d09907fc2251505e6b04f6f88b8d4b4d078e47c54744cc8464b74a t/JobStatusbarMessage.t
SHA256 d4527dd9bd6f3b283166f25621cca83b2f88276f342f383ce91551a76a0d45e2 t/JobStopMenu.t
SHA256 c185a14ac95cb8a966e094d52392fa1b53210a8e6151a1b731b0529dbee3f552 t/KAMA.t
SHA256 957718c5d19ef906cfa89e933992a8c5ce5f8773cab83c95668dcbf1792256ff t/LME.t
SHA256 03e4531d106d216a58f84194afa03b4a8a67266e744e61d76d407074e2956625 t/LaguerreFilter.t
SHA256 8c4602865a6712547a206b788540915ff4ca00d9772b1ea42e8693befb686d62 t/LatestHandler.t
SHA256 cbf93c8873d65c1b677b3afd3c4342f490d63e56dfa9adf70b0af3d6830b3e45 t/ListStoreDBISeq.t
SHA256 28ffc4f2df2123e18187646ac677b9dc0616e13676cd5ef554388aa3e272278e t/MLC.t
SHA256 e44fa16d32a5188535ccd63c2976f14605c1575c286ebc305f5938ee2fb31986 t/MX.t
SHA256 4759cafc860852b8a9e6284c6729c5191ac5c94c0b1f86671db033e41fda5941 t/Manual.t
SHA256 91cd2bba3e246abf05c342ed549ed6d902e8a77a43b6c9c4e092e4c918732ac0 t/MyTestHelpers.pm
SHA256 82c062d32d106788e07cf82b2680c337c09c32d467ba92f8f21be6760f4195c8 t/NZ.t

debian/menu  view on Meta::CPAN

#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with Chart.  If not, see <http://www.gnu.org/licenses/>.


# Crib note: Menu policy is in /usr/share/doc/menu/menu.txt.gz, part
# 3.5 has the possible menu sections.  Applications/Office is for the
# new menu structure in menu 2.1.35.

?package(chart):needs="x11" \
	section="Applications/Office" \
	title="Chart" \
	hints="financial, charting" \
	icon="/usr/share/perl5/App/Chart/chart.xpm" \
	command="chart"

devel/run-symlist-radio.pl  view on Meta::CPAN

#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.


# Run up a SymlistRadioMenu.


use strict;
use warnings;
use Gtk2 '-init';
use App::Chart::Gtk2::SymlistRadioMenu;
use Data::Dumper;

use FindBin;
my $progname = $FindBin::Script;


my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });

my $hbox = Gtk2::HBox->new (0, 0);
$toplevel->add ($hbox);

my $left_vbox = Gtk2::VBox->new (0, 0);
$hbox->pack_start ($left_vbox, 0,0,0);

my $right_vbox = Gtk2::VBox->new (0, 0);
$hbox->pack_start ($right_vbox, 1,1,0);

my $menu = App::Chart::Gtk2::SymlistRadioMenu->new;
$menu->signal_connect
  (notify => sub {
     my ($menu, $pspec) = @_;
     my $pname = $pspec->get_name;
     print "$progname: set $pname to ", $menu->get($pname)||'undef', "\n";
   });

$menu->set (symlist => App::Chart::Gtk2::Symlist->new_from_key ('favourites'));

my $menubar = Gtk2::MenuBar->new;
$left_vbox->pack_start ($menubar, 0,0,0);
my $item = Gtk2::MenuItem->new_with_label ('Menu');
$item->set_submenu ($menu);
$menubar->add ($item);

$toplevel->show_all;
Gtk2->main;
exit 0;

devel/run-weblink-menu.pl  view on Meta::CPAN

# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

use strict;
use warnings;
use Gtk2 '-init';
use App::Chart::Gtk2::WeblinkMenu;

my $symbol = $ARGV[0] || 'BHP.AX';

my $toplevel = Gtk2::Window->new ('toplevel');

my $vbox = Gtk2::VBox->new;
$toplevel->add ($vbox);

my $weblink_menu = App::Chart::Gtk2::WeblinkMenu->new (symbol => $symbol);

my $entry = Gtk2::Entry->new;
$entry->set_text ($symbol);
$entry->signal_connect (activate => sub {
                          $weblink_menu->set (symbol => $entry->get_text);
                        });
$vbox->pack_start ($entry, 1,1,0);

my $menubar = Gtk2::MenuBar->new;
$vbox->pack_start ($menubar, 1,1,0);

my $item = Gtk2::MenuItem->new_with_label ('Web ...');
$item->set_submenu ($weblink_menu);
$menubar->add ($item);

$toplevel->show_all;

# immediate popup, but causes a disconcerting pointer/keyboard grab
# $weblink_menu->popup (undef, undef, undef, undef, 0, 0);

Gtk2->main;
exit 0;

emacs/chartprog.el  view on Meta::CPAN

  (set (make-local-variable 'chartprog-header-line-scrolling-str) str)
  (set (make-local-variable 'header-line-format)
       '(:eval (chartprog-header-line-scrolling-eval))))


;;-----------------------------------------------------------------------------
;; watchlist commands

(defvar chartprog-watchlist-menu (make-sparse-keymap "Chart")
  "An internal part of chartprog.el.
Menu for Chart watchlist.")

(defvar chartprog-watchlist-map
  (let ((m (make-sparse-keymap)))
    (define-key m "\C-k" 'chartprog-watchlist-kill-line)
    (define-key m "\C-w" 'chartprog-watchlist-kill-region)
    (define-key m "\C-y" 'chartprog-watchlist-yank)
    (define-key m "\C-_" 'chartprog-watchlist-undo)
    (define-key m "a"    'chartprog-watchlist-add)
    (define-key m "g"    'chartprog-watchlist-refresh)
    (define-key m "n"    'next-line)

lib/App/Chart/Gtk2/DownloadDialog.pm  view on Meta::CPAN

    App::Chart::Gtk2::Subprocess->can('remove_done')  # if loaded
        && List::Util::first {! $_->pid} App::Chart::Gtk2::Subprocess->all_subprocesses;
  };
  $self->set_response_sensitive (RESPONSE_CLEAR, $anything_to_clear);
}

# 'button-press-event' on the treeview
sub _do_proc_treeview_button_press {
  my ($treeview, $event, $self) = @_;
  if ($event->button == 3) {
    require App::Chart::Gtk2::SubprocessStopMenu;
    App::Chart::Gtk2::SubprocessStopMenu->popup_from_treeview ($event, $treeview);
  }
  return Gtk2::EVENT_PROPAGATE;
}

# 'changed' on the treeview selection
sub _do_selection_changed {
  my ($selection, $self) = @_;
  _update_stop_sensitive ($self);
}

lib/App/Chart/Gtk2/DownloadDialog.pm  view on Meta::CPAN

  my ($treecolumn, $renderer, $model, $iter) = @_;
  my $proc = $model->get_value ($iter, 0);
  my $str = $proc->status;
  $renderer->set (text => $str);
}

# 'button-press-event' on the treeview
sub _do_jobs_treeview_button_press {
  my ($treeview, $event) = @_;
  if ($event->button == 3) {
    require App::Chart::Gtk2::JobStopMenu;
    my $self = $treeview->get_toplevel;
    my $menu = ($self->{'job_menu'} ||= App::Chart::Gtk2::JobStopMenu->new);
    $menu->popup_from_treeview ($event, $treeview);
  }
  return Gtk2::EVENT_PROPAGATE;
}


#------------------------------------------------------------------------------
# generic helpers


lib/App/Chart/Gtk2/Ex/MenuBits.pm  view on Meta::CPAN

# version.
#
# Chart is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::Ex::MenuBits;
use 5.008;
use strict;
use warnings;
use Gtk2 1.200; # for Gtk2::GDK_CURRENT_TIME()

# uncomment this to run the ### lines
#use Smart::Comments;

sub position_screen_centre {
  my ($menu) = @_;

lib/App/Chart/Gtk2/Ex/MenuBits.pm  view on Meta::CPAN

  return $event_types_button_press{$event->type};
}

1;
__END__

=for stopwords popup

=head1 NAME

App::Chart::Gtk2::Ex::MenuBits -- miscellaneous Gtk2::Menu helpers

=head1 SYNOPSIS

 use App::Chart::Gtk2::Ex::MenuBits;

=head1 FUNCTIONS

=over 4

=item C<< ($x,$y,$push_in) = App::Chart::Gtk2::Ex::MenuBits::position_screen_centre ($menu, $x, $y, $userdata) >>

Position a menu in the centre of the screen.  The input C<$x>, C<$y> and
C<$userdata> are currently ignored (pass C<undef> for C<$userdata>).

=back

=head1 SEE ALSO

L<Gtk2::Ex::WidgetBits>,
L<Gtk2::Ex::MenuBits>

=cut

lib/App/Chart/Gtk2/Ex/MenuItem/EmptyInsensitive.pm  view on Meta::CPAN

# a subclass of Gtk2::Menu can act on its attached parent item directly ...


# Copyright 2008, 2009, 2010 Kevin Ryde

# This file is part of Chart.
#
# Chart is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3, or (at your option) any
# later version.
#
# Chart is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive;
use 5.008;
use strict;
use warnings;
use Gtk2;
use List::Util;

use App::Chart::Glib::Ex::MoreUtils;
use Glib::Ex::SignalIds;



# 'notify' is a no-hooks signal, so can't use an emission hook to have just
# one handler installed.  The add and remove signals could be done that way
# though.  It'd depend whether the speed lost to seeing every emission was
# was the memory saving of just one handler setup.
#

# if nothing except tearoff and separators visible then consider empty
my @ignored_menuitem_classes = ('Gtk2::SeparatorMenuItem',
                                'Gtk2::TearoffMenuItem');

sub new {
  my ($class, $item) = @_;
  my $self = bless {}, $class;
  my $ref_weak_self = App::Chart::Glib::Ex::MoreUtils::ref_weak($self);

  $self->{'item_ids'} = Glib::Ex::SignalIds->new
    ($item,
     $item->signal_connect ('notify::submenu' => \&_notify_submenu,
                            $ref_weak_self));

lib/App/Chart/Gtk2/Ex/MenuItem/EmptyInsensitive.pm  view on Meta::CPAN

  return List::Util::first {$subitem->isa($_)} @ignored_menuitem_classes;
}

1;
__END__

=for stopwords submenu Gtk ie

=head1 NAME

App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive -- menu item insensitive when submenu empty

=head1 SYNOPSIS

 use App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive;

 my $item = Gtk2::MenuItem->new;
 App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item);

=head1 DESCRIPTION

C<App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive> sets up a C<Gtk2::MenuItem> so that
it's insensitive if its submenu is empty, or all the items are hidden, or
there's no submenu set at all.

Sensitivity updates with items added or removed from the submenu, or made
hidden or visible.  In Gtk 2.12 and the sensitivity is updated for a new
submenu, ie. C<set_submenu>, but in prior versions there's no signal when
that happens and you must call C<setup> below again.

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item) >>

Setup C<$item> to be insensitive if its submenu is empty.

=back

=head1 SEE ALSO

L<Gtk2::MenuItem>, L<Gtk2::Menu>

=cut

lib/App/Chart/Gtk2/JobStopMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::JobStopMenu;
use 5.008;
use strict;
use warnings;
use Gtk2;
# use Locale::TextDomain ('App-Chart');

use App::Chart::Glib::Ex::MoreUtils;
use Glib::Ex::SignalIds;
use App::Chart;
use App::Chart::Gtk2::Job;


use Glib::Object::Subclass
  'Gtk2::Menu',
  properties => [ Glib::ParamSpec->object
                  ('job',
                   'job',
                   'App::Chart::Gtk2::Job object to act on, or undef.',
                   'App::Chart::Gtk2::Job',
                   Glib::G_PARAM_READWRITE),
                ];

sub INIT_INSTANCE {
  my ($self) = @_;

  # avoid selecting Stop too easily
  $self->append (Gtk2::SeparatorMenuItem->new);
  {
    my $item = $self->{'stop'}
      = Gtk2::ImageMenuItem->new_from_stock ('gtk-stop');
    $self->append ($item);
    $item->signal_connect (activate => \&_do_stop);
    $item->show;
  }
  {
    my $item = $self->{'delete'}
      = Gtk2::ImageMenuItem->new_from_stock ('gtk-delete');
    $self->append ($item);
    $item->signal_connect (activate => \&_do_delete);
    $item->show;
  }
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  my $pname = $pspec->get_name;
  $self->{$pname} = $newval;  # per default GET_PROPERTY

lib/App/Chart/Gtk2/JobStopMenu.pm  view on Meta::CPAN

  $self->popup (undef, undef, undef, undef, $event->button, $event->time);
}

1;
__END__

=for stopwords undef

=head1 NAME

App::Chart::Gtk2::JobStopMenu -- menu to stop or delete a Job

=for test_synopsis my ($event, $treeview)

=head1 SYNOPSIS

 use App::Chart::Gtk2::JobStopMenu;
 my $menu = App::Chart::Gtk2::JobStopMenu->new;

 $menu->popup_from_treeview ($event, $treeview);

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::JobStopMenu> is a subclass of C<Gtk::Menu>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            App::Chart::Gtk2::JobStopMenu

=head1 DESCRIPTION

A C<App::Chart::Gtk2::JobStopMenu> displays a little menu to stop or delete a given
C<App::Chart::Gtk2::Job>.

    +--------+
    +--------+
    | Stop   |
    +--------+
    | Delete |
    +--------+

This is used by C<App::Chart::Gtk2::DownloadDialog> and has been split out to
reduce the amount of code there.

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::JobStopMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::JobStopMenu> object.  Optional
key/value pairs set initial properties as per C<< Glib::Object->new >>.

=back

=head1 PROPERTIES

=over 4

=item C<job> (C<App::Chart::Gtk2::Job>, default undef)

The job to be acted on by the menu.  Normally this is set at the time the
menu is popped up.  Changing it while popped up works, but could confuse the
user.

=back

=head1 SEE ALSO

L<App::Chart::Gtk2::Job>, L<Gtk2::Menu>, L<App::Chart::Gtk2::DownloadDialog>

=cut

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

                   'The Gtk2::Statusbar at the bottom of the window.',
                   'Gtk2::Statusbar',
                   ['readable']),
                ];

#------------------------------------------------------------------------------

use constant _ACTION_DATA =>
  [ # name,       stock id,     label,  accelerator,  tooltip
   
   { name => 'FileMenu',  label => '_File'  },
   { name => 'EditMenu',  label => '_Edit'  },
   { name => 'ViewMenu',  label => '_View'  },
   { name => 'ToolsMenu', label => '_Tools' },
   { name => 'HelpMenu',  label => '_Help'  },
   
   { name        => 'Open',
     stock_id    => 'gtk-open',
     accelerator =>  __p('Main-accelerator-key','O'),
     tooltip     => __('View chart for a symbol, or add new symbol to the database'),
     callback    => sub {
       my ($action, $self) = @_;
       App::Chart::Gtk2::Ex::ToplevelBits::popup
           ('App::Chart::Gtk2::OpenDialog',
            transient_for  => $self,

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

                       $vs->set (view => $view,
                                 viewstyle => $view->get('viewstyle'));
                     }
   },
   { name     => 'Raw',
     label    => __('_Raw data'),
     callback => sub { my ($action, $self) = @_;
                       require App::Chart::Gtk2::RawDialog;
                       App::Chart::Gtk2::RawDialog->popup ($self->get_symbol, $self); }
   },
   { name  => "WebMenuItem",
     label => __('_Web')
   },
   
   # Tools menu
   
   { name     => 'Watchlist',
     label    => __('_Watchlist'),
     callback => sub {
       my ($action, $self) = @_;
       App::Chart::Gtk2::Ex::ToplevelBits::popup

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

           $self->{'view'}->set (timebase_class =>
                                 $timebases[$action->get_current_value]);
         },
     $self);

  my $ui = $self->{'ui'} = Gtk2::UIManager->new;
  $ui->insert_action_group ($actiongroup, 0);
  $self->add_accel_group ($ui->get_accel_group);
  $ui->add_ui_from_string (<<'HERE');
<ui>
  <menubar name='MenuBar'>
    <menu action='FileMenu'>
      <menuitem action='Open'/>
      <menuitem action='Delete'/>
      <menuitem action='AddFavourite'/>
      <menuitem action='RemoveFavourite'/>
      <separator/>
      <menuitem action='Prev'/>
      <menuitem action='Next'/>
      <menuitem action='Back'/>
      <menuitem action='Forward'/>
      <separator/>
      <menuitem action='Quit'/>
    </menu>
    <menu action='EditMenu'>
      <menuitem action='Annotations'/>
      <menuitem action='ViewStyle'/>
      <menuitem action='Preferences'/>
      <menuitem action='Raw'/>
    </menu>
    <menu action='ViewMenu'>
      <menuitem action='Daily'/>
      <menuitem action='Weekly'/>
      <menuitem action='Monthly'/>
      <separator/>
      <menuitem action='ZoomInY'/>
      <menuitem action='ZoomOutY'/>
      <menuitem action='ZoomInX'/>
      <menuitem action='ZoomOutX'/>
      <menuitem action='Centre'/>
      <menuitem action='Redraw'/>
      <separator/>
      <menuitem action='Intraday'/>
      <menuitem action='WebMenuItem'/>
    </menu>
    <menu action='ToolsMenu'>
      <menuitem action='Download'/>
      <menuitem action='DownloadUpdate'/>
      <menuitem action='Watchlist'/>
      <menuitem action='Cross'/>
      <menuitem action='Ticker'/>
      <menuitem action='Toolbar'/>
      <menuitem action='History'/>
      <separator/>
      <menuitem action='Vacuum'/>
      <menuitem action='Errors'/>
      <menuitem action='Diagnostics'/>
    </menu>
    <menu action='HelpMenu'>
      <menuitem action='About'/>
      <menuitem action='Manual'/>
      <menuitem action='ManualDataSource'/>
      <menuitem action='ManualMovingAverage'/>
      <menuitem action='ManualIndicator'/>
    </menu>
  </menubar>
  <toolbar  name='ToolBar'>
    <toolitem action='Prev'/>
    <toolitem action='Next'/>

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

</ui>
HERE

  my $vbox = $self->{'vbox'} = Gtk2::VBox->new (0, 0);
  $vbox->show;
  $self->add ($vbox);

  my $menubar = $self->menubar;
  $menubar->show;
  $vbox->pack_start ($menubar, 0,0,0);
  if (my $webitem = $ui->get_widget('/MenuBar/ViewMenu/WebMenuItem')) {
    $webitem->signal_connect (map => \&_webmenuitem_submenu, $self);
  }

  {
    my $toolbar = $ui->get_widget ('/ToolBar');
    $vbox->pack_start ($toolbar, 0,0,0);
    my $action = $actiongroup->get_action ('Toolbar');
    Glib::Ex::ConnectProperties->new ([$toolbar,'visible'],
                                      [$action,'active']);
  }

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

  my ($widget, $y) = @_;
  my $screen = $widget->get_screen
    || croak 'y_mm_to_pixels(): widget not on a screen yet';
  return $y * $screen->get_height / $screen->get_height_mm;
}

sub _webmenuitem_submenu {
  my ($webitem, $self) = @_;
  ### _webmenuitem_submenu() have: $webitem->get_submenu
  unless ($webitem->get_submenu) {
    require App::Chart::Gtk2::WeblinkMenu;
    my $webmenu = $self->{'webmenu'} = App::Chart::Gtk2::WeblinkMenu->new
      (symbol => $self->{'symbol'});
    $webitem->set_submenu ($webmenu);

    # gtk 2.18 bug -- set_submenu doesn't notify attach-widget
    $webmenu->notify ('attach-widget');
  }
}

#------------------------------------------------------------------------------
# broadcast handlers

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN


# return currently displayed symbol, or undef
sub get_symbol {
  my ($self) = @_;
  return $self->{'view'}->get('symbol');
}

# return the menubar widget
sub menubar {
  my ($self) = @_;
  return $self->{'ui'}->get_widget('/MenuBar');
}

# return App::Chart::Gtk2::Main widget, preferring the transient parent of $dialog,
# if $dialog is given
sub find_for_dialog {
  my ($class, $dialog) = @_;
  if ($dialog
      && $dialog->can('get_transient_for')
      && (my $parent = $dialog->get_transient_for)) {
    if ($parent->isa($class)) {

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN


Create and return a C<App::Chart::Gtk2::Main> widget.  Optional key/value pairs can
be given to set initial properties (as per C<< Glib::Object->new >>).  The
widget is not displayed, but can be using C<show> in the usual way.  Eg.

    my $main = App::Chart::Gtk2::Main->new;
    $main->show;

=item C<< $main->menubar() >>

Return the menubar widget (a C<Gtk2::MenuBar>).

=back

=head1 SYMBOL NAVIGATION FUNCTIONS

=over 4

=item C<< $main->goto_symbol ($symbol) >>

Display C<$symbol>.  C<$symbol> can be undef to display nothing.

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

functions are the "Back" and "Forward" menu entries and toolbar items.

=back

=head1 PROPERTIES

...

=head1 SEE ALSO

L<App::Chart::Gtk2::View>, L<App::Chart::Gtk2::WeblinkMenu>

=head1 HOME PAGE

L<http://user42.tuxfamily.org/chart/index.html>

=head1 LICENCE

Copyright 2007, 2008, 2009, 2010, 2011, 2024 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the

lib/App/Chart/Gtk2/RawDialog.pm  view on Meta::CPAN

  my ($treeview, $event) = @_;
  my ($path, $column) = $treeview->get_path_at_pos ($event->x, $event->y);
  if (!$path) { return; }
  if (my $func = $column->{'menu_func'}) {
    $func->($treeview, $event, $path);
  }
  return Gtk2::EVENT_PROPAGATE;
}
sub _do_weblink_menu_popup {
  my ($treeview, $event, $path) = @_;
  my $menu = Gtk2::Menu->new;
  $menu->set_screen ($treeview->get_screen);
  my $url = _do_weblink_row_url ($treeview, $path);
  {
    my $item = Gtk2::ImageMenuItem->new_from_stock ('gtk-open');
    $item->{'url'} = $url;
    $item->signal_connect (activate => \&_do_weblink_menu_open);
    $menu->append ($item);
  }
  # LinkButton of Gtk 2.14 has a "Copy URL" message string (translated etc),
  # could show that
  {
    my $item = Gtk2::ImageMenuItem->new_from_stock ('gtk-copy');
    $item->{'url'} = $url;
    $item->signal_connect (activate => \&_do_weblink_menu_copy);
    $menu->append ($item);
  }
  $menu->show_all;
  $menu->popup (undef, undef, undef, undef,
                $event->button, $event->time);
}
sub _do_weblink_menu_open {
  my ($item) = @_;

lib/App/Chart/Gtk2/SubprocessStopMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::SubprocessStopMenu;
use 5.010;
use strict;
use warnings;
use Carp;
use Glib::Ex::SignalIds;
use Gtk2;
use Scalar::Util;
# use Locale::TextDomain ('App-Chart');

use App::Chart::Glib::Ex::MoreUtils;
use App::Chart;
use App::Chart::Gtk2::Subprocess;

# uncomment this to run the ### lines
#use Smart::Comments;

use Glib::Object::Subclass
  'Gtk2::Menu',
  properties => [ Glib::ParamSpec->object
                  ('subprocess',
                   'subprocess',
                   'App::Chart::Gtk2::Subprocess object to act on, or undef.',
                   'App::Chart::Gtk2::Subprocess',
                   Glib::G_PARAM_READWRITE),
                ];

sub INIT_INSTANCE {
  my ($self) = @_;

  # avoid selecting Stop too easily
  $self->append (Gtk2::SeparatorMenuItem->new);

  {
    my $item = $self->{'stop'}
      = Gtk2::ImageMenuItem->new_from_stock ('gtk-stop');
    $self->append ($item);
    $item->signal_connect (activate => \&_do_stop);
    $item->show;
  }
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  my $pname = $pspec->get_name;
  $self->{$pname} = $newval;  # per default GET_PROPERTY

lib/App/Chart/Gtk2/SubprocessStopMenu.pm  view on Meta::CPAN

                                    \&_do_subprocess_status_change,
                                    App::Chart::Glib::Ex::MoreUtils::ref_weak($self)));
    _update_sensitive ($self);
  }
}

# 'activate' from Stop item
sub _do_stop {
  my ($item) = @_;
  my $self = $item->get_ancestor(__PACKAGE__) || return;
  ### SubprocessStopMenu stop: "$self"
  ### subprocess: "@{[$self->{'subprocess'}//'undef']}"
  if (my $subprocess = $self->{'subprocess'}) {
    if (my $job = $subprocess->get('job')) {
      $job->stop;
    } else {
      $subprocess->stop;
    }
  }
}

lib/App/Chart/Gtk2/SubprocessStopMenu.pm  view on Meta::CPAN

  $self->popup (undef, undef, undef, undef, $event->button, $event->time);
}

1;
__END__

=for stopwords Subprocess undef subprocess

=head1 NAME

App::Chart::Gtk2::SubprocessStopMenu -- menu to stop or delete a Subprocess

=for test_synopsis my ($event, $treeview)

=head1 SYNOPSIS

 use App::Chart::Gtk2::SubprocessStopMenu;
 my $menu = App::Chart::Gtk2::SubprocessStopMenu->new;
 $menu->popup_from_treeview ($event, $treeview);

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::SubprocessStopMenu> is a subclass of C<Gtk::Menu>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            App::Chart::Gtk2::SubprocessStopMenu

=head1 DESCRIPTION

C<App::Chart::Gtk2::SubprocessStopMenu> displays a little menu to stop a given
C<App::Chart::Gtk2::Subprocess>.

    +--------+
    +--------+
    | Stop   |
    +--------+

This is used by C<App::Chart::Gtk2::DownloadDialog> and has been split out
to reduce the amount of code there.

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::SubprocessStopMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::SubprocessStopMenu> object.  Optional
key/value pairs set initial properties as per C<< Glib::Object->new >>.

=back

=head1 PROPERTIES

=over 4

=item C<subprocess> (C<App::Chart::Gtk2::Subprocess> object, default undef)

The subprocess to act on in the menu.  Normally this is set at the time the
menu is popped up.  Changing it while popped up works, but might confuse the
user.

=back

=head1 SEE ALSO

L<App::Chart::Gtk2::Subprocess>, L<Gtk2::Menu>, L<App::Chart::Gtk2::DownloadDialog>

=cut

lib/App/Chart/Gtk2/SymlistRadioMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::SymlistRadioMenu;
use 5.010;
use strict;
use warnings;
use Carp;
use Gtk2;

use App::Chart::Gtk2::Symlist;
use App::Chart::Gtk2::SymlistListModel (qw(COL_KEY COL_NAME));

# uncomment this to run the ### lines
#use Smart::Comments;

use Gtk2::Ex::MenuView;
use Glib::Object::Subclass
  'Gtk2::Ex::MenuView',
  signals => { activate => \&_do_activate,
               item_create_or_update => \&_do_item_create_or_update,
             },
  properties => [ Glib::ParamSpec->object
                  ('symlist',
                   'symlist',
                   'App::Chart::Gtk2::Symlist object selected, or undef.',
                   'App::Chart::Gtk2::Symlist',
                   Glib::G_PARAM_READWRITE),
                ];

lib/App/Chart/Gtk2/SymlistRadioMenu.pm  view on Meta::CPAN

  my $pname = $pspec->get_name;
  if ($pspec->get_name eq 'symlist') {
    $self->set_symlist ($newval);
  } else {
    $self->{$pname} = $newval;  # per default GET_PROPERTY
  }
}

sub _do_item_create_or_update {
  my ($self, $item, $model, $path, $iter) = @_;
  ### SymlistRadioMenu _do_item_create_or_update: $item
  if (! $item) {
    my $group = ($self->get_children)[0];
    $item = Gtk2::RadioMenuItem->new_with_label($group,'');
  }
  ###   label: $item->get_child
  $item->get_child->set_text ($model->get_value ($iter, COL_NAME));
  return $item;
}

# 'activate' signal handler on items
sub _do_activate {
  my ($self, $item, $model, $path, $iter) = @_;
  if ($item->get_active) {
    my $key = $model->get_value ($iter, COL_KEY);
    $self->{'symlist'} = App::Chart::Gtk2::Symlist->new_from_key ($key);
    $self->notify ('symlist');
  }
}

sub set_symlist {
  my ($self, $symlist) = @_;
  ### SymlistRadioMenu set_symlist: $self->get_name." to ".($symlist||'[none]')
  if (($self->{'symlist'}||0) == ($symlist||0)) { return; }

  my $key = $symlist->key;
  my $model = $self->get('model');
  my $pos = liststore_find_pos
    ($model, sub { my ($model, $path, $iter) = @_;
                   return ($model->get_value($iter, COL_KEY) eq $key); });
  if (! defined $pos) {
    croak "SymlistRadioMenu: no such list for set_symlist: $key";
  }

  $self->{'symlist'} = undef;
  require Glib::Ex::FreezeNotify;
  { my $freezer = Glib::Ex::FreezeNotify->new ($self);
    if (my $item = $self->item_at_indices ($pos)) {
      $item->set_active (1);
    }
    $self->notify ('symlist');
  }

lib/App/Chart/Gtk2/SymlistRadioMenu.pm  view on Meta::CPAN

  return $pos;
}

1;
__END__

=for stopwords symlists undef symlist programmatically

=head1 NAME

App::Chart::Gtk2::SymlistRadioMenu -- radio menu of symbol lists

=head1 SYNOPSIS

 use App::Chart::Gtk2::SymlistRadioMenu;
 my $menu = App::Chart::Gtk2::SymlistRadioMenu->new;

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::SymlistRadioMenu> is a subclass of C<Gtk2::Ex::MenuView>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            Gtk2::Ex::MenuView
              App::Chart::Gtk2::SymlistRadioMenu

=head1 DESCRIPTION

A C<App::Chart::Gtk2::SymlistRadioMenu> displays a menu of the available symlists
with C<Gtk2::RadioMenuItem>s, allowing the user to select one of them.  The
currently selected list is in the C<symlist> property.

    +--------------+
    | * Alerts     |
    +--------------+
    |   Favourites |
    +--------------+
    |   All        |
    +--------------+
    |   Historical |
    +--------------+

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::SymlistRadioMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::SymlistRadioMenu> object.  Optional
key/value pairs set initial properties as per C<< Glib::Object->new >>.

=back

=head1 PROPERTIES

=over 4

=item C<symlist> (C<App::Chart::Gtk2::Symlist>, default undef)

The currently selected symlist in the menu radio buttons, or undef for none
selected.  This changes when the user selects a new list, and it can also be
set programmatically.

=back

=head1 SEE ALSO

L<App::Chart::Gtk2::Symlist>, L<Gtk2::Menu>, L<Gtk2::RadioMenuItem>

=cut

lib/App/Chart/Gtk2/Ticker.pm  view on Meta::CPAN


BEGIN {
  Glib::Type->register_enum ('App::Chart::Gtk2::Ticker::menu_position',
                             'centre'  => 0,
                             'pointer' => 1);
}
use Glib::Object::Subclass
  'Gtk2::Ex::TickerView',
  signals => { button_press_event => \&_do_button_press_event,

               menu_created => { param_types => ['Gtk2::Menu'],
                                 return_type => undef,
                               },
               menu_popup => { param_types   => ['Glib::Int',
                                                 'App::Chart::Gtk2::Ticker::menu_position'],
                               return_type   => undef,
                               class_closure => \&_do_menu_popup_action,
                               flags         => [ 'run-last', 'action' ],
                             },
             },
  properties => [Glib::ParamSpec->object

lib/App/Chart/Gtk2/Ticker.pm  view on Meta::CPAN

    my $all = App::Chart::Gtk2::Symlist::All->instance;
    if (! $all->is_empty) {
      $symlist = $all;
    }
  }
  $self->set (symlist => $symlist);
}

sub FINALIZE_INSTANCE {
  my ($self) = @_;
  # Gtk2::Menu doesn't go away just by weakening if currently popped-up
  # (because it's then a toplevel presumably); doing ->popdown() works, but
  # ->destroy() seems the best idea
  if (my $menu = $self->{'menu'}) {
    $menu->destroy;
  }
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  my $pname = $pspec->get_name;

lib/App/Chart/Gtk2/Ticker.pm  view on Meta::CPAN

                             0 => $message);
    $self->set (model => $empty_model);
    $self->{'showing_empty'} = 1;

  } elsif ($self->{'showing_empty'} && ! $empty) {
    $self->set (model => $self->{'symlist_model'});
    $self->{'showing_empty'} = 0;
  }
}

# create and return Gtk2::Menu widget
sub menu {
  my ($self) = @_;
  return ($self->{'menu'} ||= do {
    ### Ticker menu doesn't exist, creating
    require App::Chart::Gtk2::TickerMenu;
    my $menu = App::Chart::Gtk2::TickerMenu->new (ticker => $self);
    $self->signal_emit ('menu-created', $menu);
    $menu;
  });
}

# and also 'activate' signal on Help menu item
sub help {
  require App::Chart::Manual;
  App::Chart::Manual->open(__p('manual-node','Ticker'));
}

#------------------------------------------------------------------------------
# position funcs

sub menu_position_func_centre {
  require Gtk2::Ex::MenuBits;
  goto &Gtk2::Ex::MenuBits::position_widget_topcentre;
}


1;
__END__

=for stopwords symlist submenu Symlist boolean ie

=head1 NAME

lib/App/Chart/Gtk2/Ticker.pm  view on Meta::CPAN

=over 4

=item C<< App::Chart::Gtk2::Ticker->new (key => value, ...) >>

Create and return a C<App::Chart::Gtk2::Ticker> widget.  Optional key/value
pairs can be given to set initial properties as per
C<< Glib::Object->new >>.

=item C<< $ticker->menu() >>

Return the C<Gtk2::Menu> which is popped up by mouse button 3 in the ticker.
An application can add items to this, such as "Hide" or "Quit", or perhaps a
submenu to change what's displayed.

=item C<< $ticker->refresh() >>

Download fresh prices for the symbols displayed.  This is the "Refresh" item
in the button-3 menu.

=item C<< $ticker->help() >>

lib/App/Chart/Gtk2/TickerMain.pm  view on Meta::CPAN

sub _do_menu_created {
  my ($ticker, $menu) = @_;
  my $self = $ticker->get_toplevel;

  # remove the Hide item
  foreach my $item (grep {$_->get_name eq 'hide'} $menu->get_children) {
    $item->destroy;
  }

  # add a quit instead
  my $item = Gtk2::ImageMenuItem->new_from_stock
    ('gtk-quit', $menu->get_accel_group);
  $item->signal_connect (activate => \&_do_quit,
                         App::Chart::Glib::Ex::MoreUtils::ref_weak($self));
  $item->show;
  $menu->append ($item);
}

# 'activate' on quit menu item
sub _do_quit {
  my ($item, $ref_weak_self) = @_;

lib/App/Chart/Gtk2/TickerMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::TickerMenu;
use 5.010;
use strict;
use warnings;
use Scalar::Util;
use Gtk2;
use Glib::Ex::ConnectProperties;
use Locale::TextDomain ('App-Chart');

use App::Chart;
use App::Chart::Gtk2::Ticker;

# uncomment this to run the ### lines
#use Smart::Comments;

use Glib::Object::Subclass
  'Gtk2::Menu',
  properties => [ Glib::ParamSpec->string
                  ('symbol',
                   __('Symbol'),
                   'Stock or commodity symbol string.',
                   '', # default
                   Glib::G_PARAM_READWRITE),

                  Glib::ParamSpec->object
                  ('ticker',
                   'Ticker',
                   'Ticker widget.',
                   'App::Chart::Gtk2::Ticker',
                   Glib::G_PARAM_READWRITE),
                ];

sub INIT_INSTANCE {
  my ($self) = @_;
  ### TickerMenu INIT_INSTANCE()

  { my $item = Gtk2::ImageMenuItem->new_from_stock
      ('gtk-refresh', $self->get_accel_group);
    $item->signal_connect (activate => \&_do_menu_refresh);
    $self->append ($item);
  }

  { my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Symbols'));
    $self->append ($item);

    require App::Chart::Gtk2::SymlistRadioMenu;
    my $symlist_menu = $self->{'symlist_menu'}
      = App::Chart::Gtk2::SymlistRadioMenu->new;
    $item->set_submenu ($symlist_menu);
  }

  { my $item = $self->{'run_item'}
      = Gtk2::CheckMenuItem->new_with_mnemonic (__('R_un'));
    $self->append ($item);
  }

  $self->append (Gtk2::SeparatorMenuItem->new);

  my @symbol_items;
  $self->{'symbol_items'} = \@symbol_items;
  {
    my $label = $self->{'symbol_label'} = Gtk2::Label->new (' ');
    $label->set_alignment (0.5, 0);  # centre horizontally

    my $item = Gtk2::MenuItem->new;
    $item->add ($label);
    $self->append ($item);
    push @symbol_items, $item;
  }
  {
    my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Chart'));
    $item->set_tooltip_text (__('Go to this symbol in the main Chart window'));
    $item->signal_connect (activate => \&_do_chart);
    $self->append ($item);
  }
  {
    my $item = $self->{'menu_intraday'}
      = Gtk2::MenuItem->new_with_mnemonic (__('_Intraday'));
    $item->set_tooltip_text (__('View intraday graphs for this symbol'));
    $item->signal_connect (activate => \&_do_intraday);
    $self->append ($item);
    push @symbol_items, $item;
  }
  {
    my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Web'));
    $self->append ($item);

    require App::Chart::Gtk2::WeblinkMenu;
    my $webmenu = $self->{'weblinkmenu'} = App::Chart::Gtk2::WeblinkMenu->new;
    $item->set_submenu ($webmenu);
    push @symbol_items, $item;
  }

  $self->append (Gtk2::SeparatorMenuItem->new);

  {
    my $item = Gtk2::ImageMenuItem->new_from_stock
      ('gtk-help', $self->get_accel_group);
    $item->signal_connect (activate => \&_do_help);
    $self->append ($item);
  }
  {
    my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Hide'));
    $item->set_name ('hide');
    $item->signal_connect ('activate', \&_do_hide);
    $self->append ($item);
  }

  foreach ($self->get_children) {
    $_->show_all;
  }

  $self->show_all;
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  ### TickerMenu SET_PROPERTY(): $pspec->get_name
  my $pname = $pspec->get_name;
  $self->{$pname} = $newval;  # per default GET_PROPERTY

  if ($pname eq 'symbol') {
    $self->{'symbol_label'}->set_text (defined $newval ? $newval : '--');
    $self->{'weblinkmenu'}->set (symbol => $newval);

    my $sens = (defined $newval && $newval ne '');
    foreach my $item (@{$self->{'symbol_items'}}) {
      $item->set_sensitive ($sens);

lib/App/Chart/Gtk2/TickerMenu.pm  view on Meta::CPAN

sub _do_help {
  my ($menuitem) = @_;
  my $self = $menuitem->get_parent || return;
  my $ticker = $self->get('ticker') || return;
  $ticker->help;
}

# 'activate' signal on Hide menu item
sub _do_hide {
  my ($menuitem) = @_;
  ### TickerMenu _do_hide()
  my $self = $menuitem->get_parent || return;
  my $ticker = $self->get('ticker') || return;
  $ticker->hide;
}

sub _do_intraday {
  my ($menuitem) = @_;
  my $self = $menuitem->get_parent || return;
  ### TickerMenu intraday: $self->{'symbol'}
  require  App::Chart::Gtk2::Ex::ToplevelBits;
  App::Chart::Gtk2::Ex::ToplevelBits::popup
      ('App::Chart::Gtk2::IntradayDialog',
       properties => { symbol => $self->get('symbol') },
       screen => $self);
}

# open the main chart display on the current symbol
sub _do_chart {
  my ($menuitem) = @_;

lib/App/Chart/Gtk2/TickerMenu.pm  view on Meta::CPAN

#   my $symbol = $symlist->get_value ($iter, $model->COL_SYMBOL);
#   $self->set (symbol => $symbol,
#               symlist => $symlist);
#   $self->set_screen ($treeview->get_screen);
#   $self->popup (undef, undef, undef, undef, $event->button, $event->time);
# }

1;
__END__

=for stopwords watchlist Watchlist TickerMenu Popup undef clickable symlist

=head1 NAME

App::Chart::Gtk2::TickerMenu -- menu for ticker

=for test_synopsis my ($event, $ticker)

=head1 SYNOPSIS

 use App::Chart::Gtk2::TickerMenu;

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::TickerMenu> is a subclass of C<Gtk::Menu>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            App::Chart::Gtk2::TickerMenu

=head1 DESCRIPTION

A C<App::Chart::Gtk2::TickerMenu> shows the following things which can be done
from a symbol in the ticker.  It's split out from the main Ticker code to
keep the size there down and since it may not be needed at all if not used.

    +----------+
    | Refresh  |    update quotes
    | Symbols  |    the symlist to display
    | Run      |    whether to scroll the ticker
    +----------+
    | <SYMBOL> |
    | Intraday |    view an intraday graph
    | Web >    |    web links from App::Chart::Gtk2::WeblinkMenu
    +----------+
    | Help     |
    | Quit     |    or hide
    +----------+

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::TickerMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::TickerMenu> object.  Optional
key/value pairs set initial properties as per C<< Glib::Object->new >>.

=back

=head1 PROPERTIES

=over 4

=item C<symbol> (C<App::Chart::Gtk2::Job>, default undef)

lib/App/Chart/Gtk2/WatchlistDialog.pm  view on Meta::CPAN

  my ($self) = @_;
  $self->set_response_sensitive (RESPONSE_EDIT_NAME,
                                 defined $self->get_symlists_selected_key);
}

sub _do_symbols_tab_button_press {
  my ($symbols_tab_eventbox, $event) = @_;
  my $self = $symbols_tab_eventbox->get_toplevel;

  if ($event->button == 3) {
    require App::Chart::Gtk2::SymlistRadioMenu;
    my $symlist_menu = App::Chart::Gtk2::SymlistRadioMenu->new;
    ### menu destroy connection: $symlist_menu->signal_connect (destroy => sub { print "Watchlist symlist menu destroyed\n" })
    Glib::Ex::ConnectProperties->new ([$self, 'symlist'],
                                      [$symlist_menu, 'symlist']);
    $symlist_menu->set_screen ($self->get_screen);
    $symlist_menu->popup (undef,  # parent menushell
                          undef,  # parent menuitem
                          undef,  # position func
                          undef,  # position userdata
                          $_,     # button
                          $event->time);

lib/App/Chart/Gtk2/WatchlistDialog.pm  view on Meta::CPAN

  Gtk2::Ex::WidgetCursor->busy;
  if (my $symlist = $self->{'symlist'}) {
    require App::Chart::Gtk2::Job::Latest;
    App::Chart::Gtk2::Job::Latest->start_symlist ($symlist);
  }
}

sub _do_symbol_menu_popup {
  my ($treeview, $event) = @_;
  if ($event->button == 3) {
    require App::Chart::Gtk2::WatchlistSymbolMenu;
    App::Chart::Gtk2::WatchlistSymbolMenu->popup_from_treeview ($event, $treeview);
  }
  return Gtk2::EVENT_PROPAGATE;
}

sub _do_symlist_menu_popup {
  # nothing yet ...
  #   my ($treeview, $event) = @_;
  #   my $self = $treeview->get_toplevel;
  return Gtk2::EVENT_PROPAGATE;
}

lib/App/Chart/Gtk2/WatchlistDialog.pm  view on Meta::CPAN

=over 4

=item C<< App::Chart::Gtk2::WatchlistDialog->new (key=>value,...) >>

Create and return a new Watchlist dialog widget.

=back

=head1 SEE ALSO

L<App::Chart::Gtk2::WatchlistSymbolMenu>

=cut

#  App::Chart::Gtk2::WatchlistDialog->popup();
# =item C<< App::Chart::Gtk2::WatchlistDialog->popup () >>
# 
# =item C<< App::Chart::Gtk2::WatchlistDialog->popup ($parent) >>
# 
# Popup a C<Watchlist> dialog.  This function creates a C<Watchlist> widget
# the first time it's called, and then on subsequent calls just presents that

lib/App/Chart/Gtk2/WatchlistSymbolMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::WatchlistSymbolMenu;
use 5.010;
use strict;
use warnings;
use Gtk2;
use Locale::TextDomain ('App-Chart');

use App::Chart;
use App::Chart::Gtk2::Symlist;
use App::Chart::Gtk2::Ex::ToplevelBits;

use Glib::Object::Subclass
  'Gtk2::Menu',
  properties => [ Glib::ParamSpec->string
                  ('symbol',
                   __('Symbol'),
                   'Stock or commodity symbol string.',
                   '', # default
                   Glib::G_PARAM_READWRITE),

                  Glib::ParamSpec->object
                  ('symlist',
                   'symlist',
                   'The symlist the symbol is from.',
                   'App::Chart::Gtk2::Symlist',
                   Glib::G_PARAM_READWRITE),

                ];

sub INIT_INSTANCE {
  my ($self) = @_;
  ### WatchlistSymbolMenu INIT_INSTANCE()
  {
    my $menu_title = $self->{'menu_title'} = Gtk2::Label->new ("X");
    $menu_title->set_alignment (0.5, 0);  # centre horizontally
    my $item = Gtk2::MenuItem->new;
    $item->add ($menu_title);
    $self->append ($item);
  }
  $self->append (Gtk2::SeparatorMenuItem->new);

  {
    my $item = Gtk2::ImageMenuItem->new_from_stock ('gtk-refresh');
    $item->set_tooltip_text (__('Download a new quote for this symbol'));
    $item->signal_connect (activate => \&_do_refresh);
    $self->append ($item);
  }
  {
    my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Chart'));
    $item->set_tooltip_text (__('Go to this symbol in the main Chart window'));
    $item->signal_connect (activate => \&_do_chart);
    $self->append ($item);
  }
  {
    my $item = $self->{'menu_intraday'}
      = Gtk2::MenuItem->new_with_mnemonic (__('_Intraday'));
    $item->set_tooltip_text (__('View intraday graphs for this symbol'));
    $item->signal_connect (activate => \&_do_intraday);
    $self->append ($item);
  }
  {
    my $item = Gtk2::MenuItem->new_with_mnemonic (__('_Web'));
    $self->append ($item);
    require App::Chart::Gtk2::WeblinkMenu;
    my $weblinkmenu = $self->{'weblinkmenu'} = App::Chart::Gtk2::WeblinkMenu->new;
    $item->set_submenu ($weblinkmenu);
  }
  $self->show_all;
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  my $pname = $pspec->get_name;
  $self->{$pname} = $newval;  # per default GET_PROPERTY

lib/App/Chart/Gtk2/WatchlistSymbolMenu.pm  view on Meta::CPAN

sub _do_refresh {
  my ($menuitem) = @_;
  my $self = $menuitem->get_ancestor (__PACKAGE__);
  require App::Chart::Gtk2::Job::Latest;
  App::Chart::Gtk2::Job::Latest->start ([$self->{'symbol'}]);
}

sub _do_intraday {
  my ($menuitem) = @_;
  my $self = $menuitem->get_ancestor(__PACKAGE__) || return;
  ### WatchlistSymbolMenu intraday: $self->{'symbol'}
  App::Chart::Gtk2::Ex::ToplevelBits::popup
      ('App::Chart::Gtk2::IntradayDialog',
       properties => { symbol => $self->get('symbol') },
       screen => $self);
}

sub popup_from_treeview {
  my ($class_or_self, $event, $treeview) = @_;
  my $self = ref $class_or_self ? $class_or_self : $class_or_self->new;

lib/App/Chart/Gtk2/WatchlistSymbolMenu.pm  view on Meta::CPAN

  my $symbol = $symlist->get_value ($iter, $model->COL_SYMBOL);
  $self->set (symbol => $symbol,
              symlist => $symlist);
  $self->set_screen ($treeview->get_screen);
  $self->popup (undef, undef, undef, undef, $event->button, $event->time);
}

1;
__END__

=for stopwords watchlist Watchlist WatchlistSymbolMenu Popup undef clickable symlist

=head1 NAME

App::Chart::Gtk2::WatchlistSymbolMenu -- menu for watchlist symbol

=for test_synopsis my ($event, $treeview)

=head1 SYNOPSIS

 use App::Chart::Gtk2::WatchlistSymbolMenu;
 App::Chart::Gtk2::WatchlistSymbolMenu->popup_from_treeview ($event, $treeview);

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::WatchlistSymbolMenu> is a subclass of C<Gtk::Menu>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            App::Chart::Gtk2::WatchlistSymbolMenu

=head1 DESCRIPTION

A C<App::Chart::Gtk2::WatchlistSymbolMenu> shows the following things which can be
done from a symbol in the Watchlist.  It's split out from the main Watchlist
code to keep the size there down and since it may not be needed at all if
not used.

    +----------+
    | <SYMBOL> |
    +----------+
    | Chart    |    view the full chart
    | Refresh  |    get a new quote
    | Intraday |    view an intraday graph
    | Web >    |    web links from App::Chart::Gtk2::WeblinkMenu
    +----------+

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::WatchlistSymbolMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::WatchlistSymbolMenu> object.  Optional
key/value pairs set initial properties as per C<< Glib::Object->new >>.

=item C<< App::Chart::Gtk2::WatchlistSymbolMenu->popup_from_treeview ($event, $treeview) >>

=item C<< $wsmenu->popup_from_treeview ($event, $treeview) >>

Popup the given C<$wsmenu>, or as a class method create and popup a new
menu, in both cases for the symbol under the mouse pointer in C<$treeview>.

C<$event> should be a C<Gtk2::Gdk::Event> giving the mouse position and the
model in C<$treeview> is expected to be a C<App::Chart::Gtk2::WatchlistModel>.

=back

lib/App/Chart/Gtk2/WeblinkMenu.pm  view on Meta::CPAN

# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::WeblinkMenu;
use 5.010;
use strict;
use warnings;
use Glib;
use Gtk2;
use Locale::TextDomain ('App-Chart');

use Glib::Ex::ObjectBits 'set_property_maybe';;
use Glib::Ex::ConnectProperties 13;  # v.13 for model-rows
use Gtk2::Ex::MenuView;

use App::Chart::Weblink;

# uncomment this to run the ### lines
#use Smart::Comments;

use Glib::Object::Subclass
  'Gtk2::Ex::MenuView',
  signals => { activate  => \&_do_activate,
               item_create_or_update => \&_do_item_create_or_update,
               notify => \&_do_notify },
  properties => [Glib::ParamSpec->string
                 ('symbol',
                   __('Symbol'),
                  'The stock or commodity symbol to display weblinks for.',
                  '',  # default
                  Glib::G_PARAM_READWRITE)];


sub INIT_INSTANCE {
  my ($self) = @_;
  ### WeblinkMenu INIT_INSTANCE()
  $self->set (model => Gtk2::ListStore->new ('Glib::Scalar'));
}

sub SET_PROPERTY {
  my ($self, $pspec, $newval) = @_;
  my $pname = $pspec->get_name;
  ### WeblinkMenu SET_PROPERTY(): $pname
  $self->{$pname} = $newval;  # per default GET_PROPERTY

  # $pname eq 'symbol'
  _update_model_contents ($self);
  _update_parent_sensitive ($self);
}

sub _do_notify {
  my ($self, $pspec) = @_;
  ### WeblinkMenu _do_notify: $pspec->get_name
  if ($pspec->get_name eq 'attach_widget') {
    my $parent = $self->get_attach_widget;
    ### attached: "$parent"
    ### model: $self->get('model')
    $self->{'connp'} = Glib::Ex::ConnectProperties->dynamic
      ([$self->get('model'), 'model-rows#not-empty'],
       [$parent, 'sensitive']);
  }
  # return shift->signal_chain_from_overridden(@_);
}

sub _update_model_contents {
  my ($self) = @_;
  ### WeblinkMenu _update_model_contents()
  my $model = $self->get('model');
  my $symbol = $self->get('symbol');
  my $i = 0;
  if (defined $symbol) {
    foreach my $weblink (App::Chart::Weblink->links_for_symbol ($symbol)) {
      my $iter = $model->iter_nth_child(undef,$i++) || $model->append;
      $model->set ($iter, 0 => $weblink);
    }
  }
  while (my $iter = $model->iter_nth_child(undef,$i)) {
    $model->remove ($iter);
  }
}
sub _update_parent_sensitive {
  my ($self) = @_;
  return;

  ### WeblinkMenu _update_parent_sensitive: $self->get_attach_widget
  my $parent_item = $self->get_attach_widget || return;
  my $model = $self->get('model');
  $parent_item->set_sensitive ($model->get_iter_first);
}

# 'item-create-or-update' class closure handler
sub _do_item_create_or_update {
  my ($self, $item, $model, $path, $iter) = @_;
  my $weblink = $model->get_value ($iter, 0);
  if (! $item) {
    $item = Gtk2::MenuItem->new_with_label ('');
    $item->show;
  }
  $item->get_child->set_text_with_mnemonic ($weblink->name);
  set_property_maybe
    ($item,
     sensitive      => $weblink->sensitive($self->get('symbol')),
     # tooltip-markup new in 2.12
     tooltip_markup => Glib::Markup::escape_text($weblink->{'desc'} || ''));
  return $item;
}

lib/App/Chart/Gtk2/WeblinkMenu.pm  view on Meta::CPAN

sub _do_activate {
  my ($self, $item, $model, $path, $iter) = @_;
  my $weblink = $model->get_value ($iter, 0);
  my $symbol = $self->get('symbol');
  $weblink->open ($symbol);
}

1;
__END__

=for stopwords weblinks weblink WeblinkMenu

=head1 NAME

App::Chart::Gtk2::WeblinkMenu -- menu of weblinks for stock symbol

=head1 SYNOPSIS

 use App::Chart::Gtk2::WeblinkMenu;
 my $menu = App::Chart::Gtk2::WeblinkMenu->new;

=head1 DESCRIPTION

A App::Chart::Gtk2::WeblinkMenu widget displays a menu of the weblinks (see
L<App::Chart::Weblink>) for a given stock symbol.  Clicking on one of the
menu items opens the corresponding weblink in a browser as per
C<< $weblink->open >>.

    +---------------------------+
    | FOOEX Company Information |
    | Google Stock Page         |
    | Yahoo Stock Page          |
    +---------------------------+

Any parent menu item holding the WeblinkMenu is set sensitive or insensitive
according to whether there's weblinks for the given symbol, including
insensitive when the symbol is the empty string.

=head1 WIDGET HIERARCHY

C<App::Chart::Gtk2::WeblinkMenu> is a subclass of C<Gtk2::Menu>,

    Gtk2::Widget
      Gtk2::Container
        Gtk2::MenuShell
          Gtk2::Menu
            App::Chart::Gtk2::WeblinkMenu

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::WeblinkMenu->new (key=>value,...) >>

Create and return a new C<App::Chart::Gtk2::WeblinkMenu> object.  Optional
key/value pairs can be given to set initial properties as per
C<< Glib::Object->new >>.

=back

=head1 PROPERTIES

=over 4

=item C<symbol> (string, default empty "")

The stock or commodity symbol (a string) to display links for.  This can be
an empty string "" for no symbol (and hence no links showing).

=back

=head1 SEE ALSO

L<App::Chart::Weblink>, L<Gtk2::Menu>, L<Gtk2::MenuItem>

=cut

lib/App/Chart/Texinfo/Util.pm  view on Meta::CPAN

    App::Chart::Texinfo::Util::node_to_html_anchor ('My Node-Name')
    # returns 'My-Node_002dName'

Perl utf8 wide-char strings can be passed here.  Characters beyond 255 are
taken to be unicode and encoded as 4 or 6 hex digits per the Texinfo spec.

=back

=head1 SEE ALSO

L<Texinfo::Menus>

=head1 HOME PAGE

L<http://user42.tuxfamily.org/chart/index.html>

=head1 LICENCE

Copyright 2007, 2008, 2009, 2010, 2011, 2016 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the

lib/App/Chart/Weblink.pm  view on Meta::CPAN

C<$symbol>, ie. there's a target URL for that symbol.

=item C<< $weblink->open ($symbol) >>

Open a web browser to show C<$weblink> for C<$symbol>.

=back

=head1 SEE ALSO

L<App::Chart::Weblink::SandP>, L<App::Chart::Gtk2::WeblinkMenu>

=cut

maybe/SymbolHistory.pm  view on Meta::CPAN

                     __('Chart: Back'));
}
sub forward_menu {
  my ($self) = @_;
  return _make_menu ($self, 'forward_menu', 'forward_model',
                     __('Chart: Forward'));
}
sub _make_menu {
  my ($self, $menu_key, $model_key, $tearoff_title) = @_;
  return ($self->{$menu_key} ||= do {
    require Gtk2::Ex::MenuView;
    require Gtk2::Ex::Dashes::MenuItem;
    my $menuview = Gtk2::Ex::MenuView->new
      (model          => $self->{$model_key},
#        tearoff_items  => 'top',
#        tearoff_title  => $tearoff_title,
#        tearoff_type   => 'Gtk2::Ex::Dashes::MenuItem',
      );
    $menuview->signal_connect
      (item_create_or_update => \&_do_item_create_or_update);
    $menuview->signal_connect
      (activate => \&_do_menu_activate, App::Chart::Glib::Ex::MoreUtils::ref_weak($self));
#     $menuview->signal_connect
#       (tearoff => \&_do_menu_tearoff, App::Chart::Glib::Ex::MoreUtils::ref_weak($self));
    $menuview;
  });
}

# MenuView 'tearoff'
# sub _do_menu_tearoff {
#   my ($menuview, $ref_weak_self) = @_;
#   my $self = $$ref_weak_self || return;
#   require App::Chart::BrowseHistoryDialog;
#   my $dialog = App::Chart::BrowseHistoryDialog->new
#     (back_model    => $self->{'back_model'},
#      forward_model => $self->{'forward_model'});
#   $dialog->present;
# }

# MenuView 'item-create-or-update'
sub _do_item_create_or_update {
  my ($menuview, $item, $model, $path, $iter) = @_;
  $item ||= Gtk2::MenuItem->new_with_label ('');
  $item->show;
  my $symbol = $model->get_value ($iter, COL_SYMBOL);
  require App::Chart::Database;
  my $name = App::Chart::Database->symbol_name ($symbol);
  $item->get_child->set_text ($symbol . ($name ? ' - ' . $name : ''));
  return $item;
}

sub _do_menu_activate {
  my ($menuview, $model, $path, $iter, $ref_weak_self) = @_;

maybe/SymbolHistory.pm  view on Meta::CPAN

=item C<< $history->forward() >>

Go back or forward in C<$history>.  The return is values C<($symbol,
$symlist)> which is where to go to, or C<(undef,undef)> if nothing further
to go to.

=item C<< $history->back_menu >>

=item C<< $history->forward_menu >>

Return a C<Gtk2::Menu> of symbols to go back or forward to.

=back

=head1 PROPERTIES

=over 4

=item C<back-action> (C<Gtk2::Action>, default undef)

=item C<forward-action> (C<Gtk2::Action>, default undef)

maybe/SymbolHistory.pm  view on Meta::CPAN


=item C<menu-activate> (parameters: history, symbol, symlist)

Emitted when an item symbol+symlist is selected from the back or forward
menus (as created by the C<back_menu> etc functions above).

=back

=head1 SEE ALSO

L<Gtk2::Ex::MenuView>

=cut

maybe/SymbolHistory.t  view on Meta::CPAN

  $have_display or skip 'due to no DISPLAY available', 4;

  my $history = App::Chart::SymbolHistory->new;

  $history->goto ('AAA');
  $history->goto ('BBB');
  $history->goto ('CCC');

  {
    my $menu = $history->back_menu;
    isa_ok ($menu, 'Gtk2::Menu');
    $menu->popup (undef, undef, undef, undef, 0, 0);
    my @children = $menu->get_children;
    is (scalar @children, 2);
  }
  {
    my $menu = $history->forward_menu;
    isa_ok ($menu, 'Gtk2::Menu');
    $menu->popup (undef, undef, undef, undef, 0, 0);
    my @children = $menu->get_children;
    is (scalar @children, 0);
  }
}

#------------------------------------------------------------------------------

# Test::Weaken 3 for "contents"
my $have_test_weaken = eval "use Test::Weaken 3; 1";

misc/gtk-proxies-foo.pl  view on Meta::CPAN


use strict;
use warnings;
use Gtk2 '-init';

my $toplevel = Gtk2::Window->new ('toplevel');

my $actions = Gtk2::ActionGroup->new ("Actions");
$actions->add_actions
  ([
    [ 'FileMenu',   undef,    '_File'  ],
    [ 'Quit',     'gtk-quit',             undef,
      undef, # accelerator -- don't really want the usual Control-Q
      undef, \&_do_action_quit
    ],
   ]);
sub _do_action_quit {
  Gtk2->main_quit;
}

$actions->signal_connect (connect_proxy => \&_do_connect_proxy);

misc/gtk-proxies-foo.pl  view on Meta::CPAN

  print "connect_proxy $widget\n";
  my @widgets = $action->get_proxies;
  print @widgets,"\n";
}

my $ui = Gtk2::UIManager->new;
$ui->insert_action_group ($actions, 0);

$ui->add_ui_from_string (<<'HERE');
<ui>
  <menubar name='MenuBar'>
    <menu action='FileMenu'>
      <menuitem action='Quit'/>
    </menu>
  </menubar>
</ui>
HERE

my $menubar = $ui->get_widget('/MenuBar');
$toplevel->add ($menubar);

$toplevel->add_accel_group ($ui->get_accel_group);

$toplevel->show_all;
Gtk2->main;
exit 0;

misc/t-menu-tearoff-resize.pl  view on Meta::CPAN

my $progname = $FindBin::Script;


my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
print "my toplevel $toplevel\n";

my $vbox = Gtk2::VBox->new (0, 0);
$toplevel->add ($vbox);

my $menu = Gtk2::Menu->new;
{
  my $tearoff = Gtk2::TearoffMenuItem->new;
  $tearoff->show;
  $menu->prepend ($tearoff);
}
{
  my $item = Gtk2::MenuItem->new_with_label ("foo");
  $item->show;
  $menu->add ($item);
}
{
  my $button = Gtk2::Button->new_with_label ('Popup');
  $button->signal_connect
    (clicked => sub {
       print "$progname: popup\n";
       $menu->popup (undef,undef,undef,undef, 0,0);
     });

misc/t-reorder.pl  view on Meta::CPAN

#
#     $test = make_reorder_test();
#     foreach my $newpos (0 .. $#$reorder_array) {
#       my $oldpos = $reorder_array->[$newpos];
#       if ($test->($newpos,$oldpos)) {
#         my $item = $original_items[$oldpos];
#         move ($item, $newpos);
#       }
#     }
#
# The move is expected to be in the style of Gtk2::Menu::reorder_child(),
# shifting items at and beyond $newpos upwards.
#
# Basically $test keeps track of how much items at and beyond newpos have
# been moved up due to that shifting.  If an item is in its correct position
# due to that shifting then there's no need for a move() call.
#
# This move call suppression is geared towards Gtk2::Menu::reorder_child()
# because as of Gtk 2.12 that function doesn't notice when a reorder request
# is asking for an unchanged position, it does some linear time linked-list
# searches anyway, and looping that over 0 to N ends up as O(N^2) time.  A
# loop over 0 to N is not optimal, but it's simple, and in particular the
# supression test 


sub make_reorder_test {
  my $offset = 0;
  return sub {



( run in 1.190 second using v1.01-cache-2.11-cpan-49f99fa48dc )