By implementing this method in your delegate/datasource, you can test if the selection will be empty after the processing of the proposed index will be done:
and then, according to your needs, turn on/off UI items.
The initial state of these items remain to be set up in some "init" method: only you know if the selection is empty at start of the browsing session or not.